/*<--------------------------------------------------->
<!-- Que Es Section — full component styles         -->
<!----------------------------------------------------->
* Description: DEV year cards (3-col desktop / carousel mobile)
*              + IA LAB always-carousel subsection.
* Dependencies: style.css (custom properties, sectionHeader)
<!--------------------------------------------------->*/

/* The section is display:flex (from global styles). Without an explicit width
   the .content flex item sizes to max-content (wide carousel tracks), then gets
   centered with justify-content:center — causing a negative left offset. */
.que-es > .content {
    width: 100%;
    min-width: 0;
}

/*###################################################*/
/*...................................................*/
/* SECTION SUBHEADLINE                               */
/*...................................................*/
/*###################################################*/

.queEsSubheadline {
    margin: 0.75rem 0 0;
    font-family: var(--font-body);
    font-size: clamp(0.78rem, 0.9vw, 0.9rem);
    line-height: 1.65;
    color: hsla(0, 30%, 96%, 0.45);
    max-width: 640px;
}

/*###################################################*/
/*...................................................*/
/* SHARED: IA LAB BADGE                              */
/*...................................................*/
/*###################################################*/

.queEsIaBadge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: hsla(0, 30%, 96%, 0.75);
    background: hsla(0, 0%, 100%, 0.06);
    border: 1px solid hsla(0, 0%, 100%, 0.12);
    border-radius: 100px;
    padding: 0.22rem 0.7rem;
}

.queEsIaBadgeDot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/*###################################################*/
/*...................................................*/
/* SHARED: CAROUSEL NAVIGATION                       */
/*...................................................*/
/*###################################################*/

.queEsCarouselNav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.queEsDevNav {
    @media (min-width: 768px) {
        display: none;
    }
}

.queEsCarouselBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid hsla(0, 0%, 100%, 0.15);
    border-radius: 50%;
    background: hsla(0, 0%, 100%, 0.04);
    color: hsla(0, 30%, 96%, 0.55);
    cursor: pointer;
    font-size: 1rem;
    touch-action: manipulation;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;

    &:hover:not(:disabled) {
        background: hsla(0, 0%, 100%, 0.09);
        color: hsla(0, 30%, 96%, 0.9);
        border-color: hsla(0, 0%, 100%, 0.28);
    }

    &:disabled {
        opacity: 0.25;
        cursor: not-allowed;
    }

    &:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 3px;
    }
}

.queEsCarouselDots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.queEsDot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: hsla(0, 0%, 100%, 0.2);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: width 0.28s ease, background 0.28s ease;

    &.active {
        width: 22px;
        background: var(--primary);
    }

    &:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 3px;
    }
}

/*###################################################*/
/*...................................................*/
/* DEV YEAR CARDS                                    */
/*...................................................*/
/*###################################################*/

.queEsDevWrapper {
    margin-top: 3rem;
}

.queEsDevViewport {
    overflow-x: auto;
    overflow-y: hidden;
    /* pan-x for horizontal carousel swipe; pan-y keeps vertical page scroll working. */
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;

    &::-webkit-scrollbar {
        display: none;
    }

    @media (min-width: 768px) {
        overflow: visible;
        scroll-snap-type: none;
    }
}

.queEsDevTrack {
    display: flex;
    gap: 0.85rem;

    @media (min-width: 768px) {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

.queEsDevCard {
    flex: 0 0 min(88%, 24rem);
    min-width: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: hsla(0, 0%, 100%, 0.02);
    transition: border-color 0.22s ease, background 0.22s ease;

    &:hover {
        border-color: hsla(0, 0%, 100%, 0.22);
        background: hsla(0, 0%, 100%, 0.045);
    }

    @media (min-width: 768px) {
        scroll-snap-align: none;
    }
}

.queEsDevCardUpper {
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.75rem 1.5rem;
    flex: 1;

    @media (min-width: 991px) {
        padding: 2rem 2rem 1.75rem;
    }
}

.queEsDevLabel {
    display: block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: hsla(0, 30%, 96%, 0.3);
    margin-bottom: 0.75rem;
}

.queEsDevLogo {
    display: block;
    width: clamp(4.75rem, 35%, 6rem);
    height: auto;
}

.queEsDevTitle {
    margin: 0 0 0.5rem;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 1.5vw, 1.55rem);
    font-weight: 700;
    line-height: 1.15;
    color: hsla(0, 0%, 100%, 1);
}

.queEsDevSubtitle {
    margin: 0 0 1.25rem;
    font-family: var(--font-body);
    font-size: clamp(0.7rem, 0.82vw, 0.82rem);
    line-height: 1.45;
    color: hsla(0, 30%, 96%, 0.4);
}

.queEsDevList {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;

    li {
        font-family: var(--font-body);
        font-size: clamp(0.72rem, 0.85vw, 0.85rem);
        line-height: 1.65;
        color: hsla(0, 30%, 96%, 0.65);
        padding-left: 0.85rem;
        position: relative;

        &::before {
            content: '·';
            position: absolute;
            left: 0;
            color: hsla(0, 30%, 96%, 0.3);
            font-size: 1.1em;
            line-height: 1.5;
        }

        strong {
            color: hsla(0, 30%, 96%, 0.9);
            font-weight: 600;
        }
    }
}

.queEsDevIncluye {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.queEsDevIncluyeLabel {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: hsla(0, 30%, 96%, 0.35);
}

.queEsDevCardLower {
    padding: 1.25rem 1.75rem 1.75rem;
    border-top: 1px solid hsla(0, 0%, 100%, 0.07);

    @media (min-width: 991px) {
        padding: 1.5rem 2rem 2rem;
    }
}

.queEsResultsLabel {
    margin: 0 0 0.9rem;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: hsla(0, 30%, 96%, 0.28);
    text-transform: uppercase;
}

.queEsResultsList {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    li {
        display: flex;
        align-items: flex-start;
        gap: 0.65rem;
        font-family: var(--font-body);
        font-size: clamp(0.7rem, 0.82vw, 0.82rem);
        line-height: 1.55;
        color: hsla(0, 30%, 96%, 0.6);
    }
}

.queEsResultIcon {
    flex-shrink: 0;
    width: 1.1em;
    font-size: 0.85rem;
    margin-top: 0.1em;
}

.queEsResultIcon--blue  { color: hsla(210, 80%, 65%, 1); }
.queEsResultIcon--amber { color: hsla(38, 92%, 62%, 1);  }
.queEsResultIcon--teal  { color: hsla(170, 68%, 52%, 1); }
.queEsResultIcon--primary { color: var(--primary); }

/*###################################################*/
/*...................................................*/
/* IA LAB SECTION                                    */
/*...................................................*/
/*###################################################*/

.queEsIaSection {
    margin-top: 6rem;
    margin-bottom: 8rem;
    border: 1px solid hsla(0, 0%, 100%, 0.1);
    border-radius: 14px;
    padding: 2rem 1.75rem 1.75rem;
    background: hsla(0, 0%, 100%, 0.025);

    @media (min-width: 768px) {
        padding: 2.5rem 2.25rem 2rem;
    }

    @media (min-width: 991px) {
        /* 65% at ~991px, smoothly narrows to 50% at ~1600px+ */
        max-width: clamp(50%, calc(600px + 10vw), 65%);
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 16rem;
    }
}

.queEsIaHeader {
    margin-bottom: 2rem;
}

.queEsIaQuestion {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0 0 0.85rem;
}

.queEsIaQuestionText {
    font-family: var(--font-body);
    font-size: clamp(0.75rem, 0.88vw, 0.88rem);
    color: hsla(0, 30%, 96%, 0.45);
}

.queEsIaTitle {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 1.6vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
    color: hsla(0, 0%, 100%, 1);
}

.queEsIaDesc {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(0.78rem, 0.9vw, 0.9rem);
    line-height: 1.7;
    color: hsla(0, 30%, 96%, 0.48);
    max-width: 720px;
    padding-left: 0.75rem;
    border-left: 2px solid hsla(0, 0%, 100%, 0.1);
}

.queEsIaViewport {
    overflow: hidden;
    touch-action: pan-y;
    width: 100%;
    max-width: 100%;
    border: 1px solid hsla(0, 0%, 100%, 0.09);
    border-radius: 12px;
    background: hsla(0, 0%, 100%, 0.02);
}

.queEsIaTrack {
    display: flex;
    will-change: transform;
    transition: transform 0.4s ease;
}

.queEsIaSlide {
    flex: 0 0 100%;
    min-width: 0;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;

    @media (min-width: 768px) {
        padding: 2.5rem 2.25rem;
    }
}

.queEsIaSlideTag {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: hsla(0, 30%, 96%, 0.3);
}

.queEsIaSlideTitle {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.3vw, 1.3rem);
    font-weight: 700;
    line-height: 1.25;
    color: hsla(0, 0%, 100%, 1);
}

.queEsIaSlideHighlight {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(0.78rem, 0.9vw, 0.9rem);
    line-height: 1.65;
    color: var(--contrast-mono);

    em {
        font-style: italic;
    }
}

.queEsIaMiniCards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    @media (min-width: 600px) {
        flex-direction: row;
        gap: 1rem;
    }
}

.queEsIaMiniCard {
    flex: 1;
    padding: 1rem 1.1rem;
    border: 1px solid hsla(0, 0%, 100%, 0.08);
    border-radius: 8px;
    background: hsla(0, 0%, 100%, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.queEsIaMiniLabel {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: hsla(0, 30%, 96%, 0.28);
    text-transform: uppercase;
}

.queEsIaMiniText {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(0.72rem, 0.82vw, 0.82rem);
    line-height: 1.6;
    color: hsla(0, 30%, 96%, 0.6);

    strong {
        color: hsla(0, 30%, 96%, 0.85);
        font-weight: 600;
    }
}

.queEsIaSlideFooter {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(0.7rem, 0.82vw, 0.82rem);
    line-height: 1.6;
    color: hsla(0, 30%, 96%, 0.35);
    padding-top: 0.75rem;
    border-top: 1px solid hsla(0, 0%, 100%, 0.06);
}

.queEsIaNav {
    margin-top: 1.25rem;
}

.queEsTagline {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 1.75rem 0 0;
    padding: 0;

    span {
        font-family: var(--font-body);
        font-size: clamp(0.72rem, 0.82vw, 0.82rem);
        color: hsla(0, 30%, 96%, 0.4);
        line-height: 1.7;

        strong {
            color: hsla(0, 30%, 96%, 0.75);
            font-weight: 600;
        }
    }
}
