/**
 * CEMEBA Hero Slider
 *
 * @package Cemeba_Crecienta
 */

.cmx-hero {
    position: relative;
    overflow: hidden;
    background-color: #f1f8f7;
    min-height: clamp(520px, 75vh, 680px);
}

.cmx-hero__slider {
    position: relative;
    width: 100%;
    min-height: inherit;
}

.cmx-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    display: flex;
    align-items: center;
    z-index: 1;
}

.cmx-hero__slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.cmx-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.18;
    z-index: 1;
}

.cmx-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(255, 255, 255, 0.96) 35%, rgba(240, 249, 247, 0.82) 100%);
    z-index: 2;
}

.cmx-hero__container {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: clamp(20px, 4vw, 50px);
    padding-top: clamp(2.5rem, 5vw, 4rem);
    padding-bottom: clamp(4.5rem, 6.5vw, 6rem);
    min-height: inherit;
}

.cmx-hero__content {
    max-width: 620px;
}

.cmx-hero__eyebrow {
    display: inline-block;
    color: var(--cmx-teal);
    font-family: var(--cmx-font-heading);
    font-size: clamp(0.85rem, 0.4vw + 0.75rem, 0.98rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
    background: var(--cmx-teal-light);
    padding: 4px 14px;
    border-radius: var(--cmx-radius-pill);
}

.cmx-hero__title {
    color: var(--cmx-navy);
    font-size: var(--cmx-fs-h1);
    line-height: var(--cmx-lh-tight);
    margin-bottom: 1.2rem;
}

.cmx-hero__desc {
    font-size: clamp(1rem, 0.4vw + 0.9rem, 1.15rem);
    line-height: var(--cmx-lh-base);
    color: var(--cmx-text);
    margin-bottom: clamp(1.5rem, 3vw, 2.2rem);
}

.cmx-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.cmx-hero__media {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
}

.cmx-hero__img {
    max-height: clamp(380px, 55vh, 580px);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(34, 58, 102, 0.15));
    animation: cmxFloat 6s ease-in-out infinite;
}

@keyframes cmxFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Controles de slider */
.cmx-hero__controls {
    position: absolute;
    bottom: clamp(18px, 2.5vw, 26px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 10;
}

.cmx-hero__arrow {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--cmx-white);
    color: var(--cmx-navy);
    box-shadow: var(--cmx-shadow-md);
    cursor: pointer;
    transition: var(--cmx-transition);
}

.cmx-hero__arrow:hover {
    background: var(--cmx-teal);
    color: var(--cmx-white);
    transform: scale(1.05);
}

.cmx-hero__arrow svg {
    width: 18px;
    height: 18px;
}

.cmx-hero__dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmx-hero__dot {
    width: 12px;
    height: 12px;
    border-radius: var(--cmx-radius-pill);
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: var(--cmx-transition);
}

.cmx-hero__dot.is-active {
    width: 32px;
    background: var(--cmx-teal);
}

/* Responsive Hero */
@media (max-width: 991px) {
    .cmx-hero__container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-bottom: clamp(5rem, 8vw, 6.5rem);
    }

    .cmx-hero__content {
        max-width: 100%;
        margin: 0 auto;
    }

    .cmx-hero__actions {
        justify-content: center;
    }

    .cmx-hero__media {
        display: none;
    }
}

