/* IR-2611 - Dynamic Hero Banner Carousel (Bitel Beneficios homepage)
   Every banner is shown in a frame of fixed ratio (the standard banner size), at full width.
   An image of exactly that ratio is shown whole; an image of another ratio fills the frame
   without being stretched (object-fit: cover) and loses its edges, top/bottom or left/right,
   centred. So the carousel keeps the same height whatever image is uploaded.
   Title and Alt Text are drawn over the banner. */
.main_page .banner.hero-carousel {
    --hero-ratio: 1910 / 720;       /* Banner Web standard size */
    position: relative;
    height: auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;   /* the bottom curve of the image is transparent */
}

.hero-carousel .hero-track {
    height: auto;
    margin: 0;
}
.hero-carousel .hero-slide {
    display: block;
}
/* before slick starts, show only the first banner */
.hero-carousel .hero-track:not(.slick-initialized) .hero-slide + .hero-slide {
    display: none;
}
.hero-carousel .hero-link {
    position: relative;
    display: block;
    aspect-ratio: var(--hero-ratio);   /* fixed frame: same height for every banner */
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    outline-offset: -3px;
}
.hero-carousel .hero-link.is-static {
    cursor: default;
}
.hero-carousel picture,
.hero-carousel img {
    display: block;
    width: 100%;
    height: 100%;
}
.hero-carousel img {
    object-fit: cover;          /* fill the frame, never stretch */
    object-position: center;    /* an off-ratio image loses its edges evenly */
    -webkit-user-drag: none;
    user-select: none;
}
.hero-carousel .slick-list,
.hero-carousel .slick-track,
.hero-carousel .slick-slide {
    height: auto;
}
.hero-carousel .slick-list.dragging .hero-link {
    cursor: grabbing;
}

/* ----------------------------------------------------- Title + Alt Text */
.hero-carousel .hero-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 8%;                 /* keep the text above the bottom curve */
    display: flex;
    align-items: center;
    padding-left: 18%;
    pointer-events: none;
}
.hero-carousel .hero-caption-inner {
    max-width: 38%;
}
/* Default sizes = the default sizes of the CMS editor (banner-home-beneficios.js), so a text
   with no size chosen looks the same in the editor and on the banner; a size chosen in the
   editor is inline and is shown as set. On smaller screens the whole caption is scaled
   (zoom), which keeps the sizes chosen in the editor in proportion. */
.hero-carousel .hero-title {
    margin: 0;
    font-size: 48px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.01em;
}
.hero-carousel .hero-text {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.2;
}
@media (max-width: 1399.98px) {
    .hero-carousel .hero-caption-inner { zoom: .85; }
}
@media (max-width: 1199.98px) {
    .hero-carousel .hero-caption-inner { zoom: .7; }
}
/* default colours (design); a colour chosen in the CMS editor is inline and wins */
.hero-carousel .hero-title { color: #FFF200; }
.hero-carousel .hero-text  { color: #FFFFFF; }
.hero-carousel .hero-text p {
    margin: 0;
}
.hero-carousel .hero-title strong,
.hero-carousel .hero-text strong {
    font-weight: 800;
}

/* ----------------------------------------------------- arrows */
.hero-carousel .hero-arrow {
    position: absolute;
    top: 46%;
    z-index: 2;
    /* slick writes style="display: inline-block" on its arrows, which broke the centring */
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);    /* light frosted circle, no border */
    cursor: pointer;
    transition: background .2s;
}
.hero-carousel .hero-arrow:hover,
.hero-carousel .hero-arrow:focus-visible {
    background: rgba(255, 255, 255, .22);
    outline: none;
}
.hero-carousel .hero-arrow:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .6);
}
/* icons: /images/icon/icon-prev.svg and icon-next.svg, shown at their own size (11 x 21) */
/* the icon is centred on its own (absolute), whatever display the button gets */
.hero-carousel .hero-arrow img {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 11px;
    height: 21px;
    margin: 0;
    object-fit: contain;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.hero-carousel .hero-prev { left: 5.5%; }
.hero-carousel .hero-next { right: 5.5%; }
/* the chevron's point sits a little off its box: nudge it to the optical centre */
.hero-carousel .hero-prev img { transform: translate(calc(-50% - 1px), -50%); }
.hero-carousel .hero-next img { transform: translate(calc(-50% + 1px), -50%); }

/* ----------------------------------------------------- dots */
.hero-carousel .slick-dots {
    position: absolute;
    bottom: 25px;               /* PC; mobile overrides it below */
    left: 0;
    right: 0;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}
.hero-carousel .slick-dots li {
    width: auto;
    height: auto;
    margin: 0;
}
.hero-carousel .slick-dots li button {
    display: block;
    width: 11px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .45);
    font-size: 0;
    cursor: pointer;
    transition: width .2s, background .2s;
}
.hero-carousel .slick-dots li button:before {
    display: none;
}
.hero-carousel .slick-dots li.slick-active button {
    width: 23px;
    background: #fff;
}

/* ----------------------------------------------------- tablet */
@media (max-width: 1023.98px) {
    .hero-carousel .hero-caption { padding-left: 12%; }
    .hero-carousel .hero-caption-inner { max-width: 44%; }
    .hero-carousel .hero-prev { left: 3%; }
    .hero-carousel .hero-next { right: 3%; }
}

/* ----------------------------------------------------- mobile (Banner WAP) */
@media (max-width: 767.98px) {
    /* Banner WAP standard size (provisional, to be confirmed by design) */
    .main_page .banner.hero-carousel {
        --hero-ratio: 750 / 860;
    }
    /* text at the top of the WAP image, swipe + dots only */
    .hero-carousel .hero-caption {
        align-items: flex-start;
        padding: 9% 7% 0;
    }
    /* the PC sizes (and the sizes chosen in the editor) scaled down for a phone */
    .hero-carousel .hero-caption-inner {
        max-width: 100%;
        zoom: .55;
    }
    .hero-carousel .hero-arrow {
        display: none !important;
    }
    .hero-carousel .slick-dots {
        bottom: 6%;
    }
    .hero-carousel .slick-dots li button {
        width: 8px;
        height: 4px;
    }
    .hero-carousel .slick-dots li.slick-active button {
        width: 16px;
    }
}
