@layer components {
    /* =============================================================
     * About Us — CMS page /about-us
     * Patrón devlab: hero full-bleed + secciones storytelling
     * verticales (concepto / historia / misión / gansoinside /
     * valores carrusel / compromiso / squad).
     * ============================================================= */

    .elg-about {
        color: rgb(4 29 64);
        font-family: inherit;
    }

    /* Página a ancho completo, sin el padding lateral global de #maincontent
     * ni el max-width de .columns (mismo patrón que la home en 01-base.css). */
    .cms-about-us #maincontent {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: none !important;
        margin-block: 0 !important;
    }
    .cms-about-us .columns {
        max-width: none !important;
        padding-inline: 0 !important;
        margin-inline: 0 !important;
        display: block !important;
        width: 100% !important;
    }
    .cms-about-us .column.main {
        max-width: none !important;
        width: 100% !important;
    }
    .cms-about-us .breadcrumbs { display: none; }

    /* Hero — foto full-bleed + título superpuesto abajo-izquierda */
    .elg-about-hero {
        position: relative;
        width: 100%;
        aspect-ratio: 3 / 2;
        max-height: 80vh;
        overflow: hidden;
        background: #1a1a1a;
    }
    @media (max-width: 768px) {
        .elg-about-hero { aspect-ratio: 3 / 4; max-height: none; }
    }
    .elg-about-hero-img {
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        object-fit: cover; object-position: center;
    }
    .elg-about-hero-overlay {
        position: absolute; inset: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 40%);
    }
    .elg-about-hero-caption {
        position: absolute;
        left: 0; right: 0; bottom: 1.75rem;
        padding: 0 2rem;
        display: flex;
        align-items: end;
        gap: 2rem;
        color: var(--color-on-primary);
    }
    /* Móvil: "ABOUT US" y "SINCE 2004" en la misma línea, el lema debajo */
    @media (max-width: 768px) {
        .elg-about-hero-caption {
            display: grid;
            grid-template-columns: 1fr auto;
            grid-template-areas: "title since" "tagline tagline";
            align-items: end;
            column-gap: 1rem;
            row-gap: 0.5rem;
            bottom: 1.25rem;
            padding: 0 1.25rem;
        }
        .elg-about-hero-title { grid-area: title; }
        .elg-about-hero-since { grid-area: since; }
        .elg-about-hero-tagline { grid-area: tagline; font-size: 0.6875rem; }
        .elg-about-hero-tagline::after { display: none; }
    }
    .elg-about-hero-title {
        font-size: clamp(2.25rem, 6vw, 4.5rem);
        font-weight: 700;
        letter-spacing: 0.01em;
        line-height: 1;
        margin: 0;
        text-transform: uppercase;
    }
    .elg-about-hero-tagline {
        font-size: 0.9375rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        opacity: 0.92;
        flex: 1;
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    .elg-about-hero-tagline::after {
        content: '';
        flex: 1;
        height: 1px;
        background: rgba(255,255,255,0.6);
    }
    .elg-about-hero-since {
        font-size: 0.875rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-weight: 500;
    }

    /* Bloque sección texto + foto (concepto / misión) */
    .elg-about-split {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        align-items: stretch;
        margin: 0; /* en escritorio las fotos se tocan esquina con esquina */
    }
    @media (max-width: 768px) {
        .elg-about-split { grid-template-columns: 1fr; gap: 1.5rem; margin: 2.5rem 0; }
    }
    .elg-about-split--reverse { direction: rtl; }
    .elg-about-split--reverse > * { direction: ltr; }

    .elg-about-text {
        padding: 2rem 3rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
        max-width: 36rem;
    }
    @media (max-width: 768px) {
        .elg-about-text { padding: 0 1.25rem; }
    }
    .elg-about-eyebrow {
        font-size: 1rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-weight: 500;
        color: rgb(4 29 64);
        margin: 0 0 0.75rem 0;
    }
    .elg-about-h2 {
        font-size: clamp(1.875rem, 4vw, 3rem);
        font-weight: 700;
        line-height: 1.05;
        margin: 0 0 1rem 0;
        text-transform: uppercase;
        letter-spacing: 0.005em;
    }
    .elg-about-p {
        font-size: 0.9375rem;
        line-height: 1.65;
        color: rgb(4 29 64 / 0.78);
        margin: 0 0 0.85rem 0;
    }

    .elg-about-img-wrap {
        position: relative;
        width: 100%;
        aspect-ratio: 4 / 5;
        overflow: hidden;
        background: #f4f4f4;
    }
    .elg-about-img {
        width: 100%; height: 100%;
        object-fit: cover; object-position: center;
        display: block;
    }

    /* Concepto — en escritorio el texto va seguido (eyebrow, título, 4 párrafos):
     * los dos contenedores no generan caja y se reordena con `order`. En móvil
     * el intro va arriba y el título + párrafos 3-4 encima de la foto. */
    .elg-about-concepto .elg-about-text-intro,
    .elg-about-concepto .elg-about-text-overlay { display: contents; }
    .elg-about-concepto .elg-about-eyebrow { order: -2; }
    .elg-about-concepto .elg-about-h2 { order: -1; }
    .elg-about-concepto .elg-about-text { max-width: none; width: 100%; }
    @media (max-width: 768px) {
        .elg-about-concepto {
            grid-template-areas: "intro" "media";
        }
        .elg-about-concepto .elg-about-text { display: contents; }
        .elg-about-concepto .elg-about-text-intro {
            display: block;
            grid-area: intro;
            padding: 0 1.25rem;
        }
        .elg-about-concepto .elg-about-img-wrap { grid-area: media; }
        .elg-about-concepto .elg-about-text-overlay {
            display: block;
            grid-area: media;
            align-self: end;
            position: relative;
            z-index: 1;
            padding: 3rem 1.25rem 1.5rem;
            background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
        }
        .elg-about-concepto .elg-about-text-overlay .elg-about-h2 {
            font-size: 1.125rem;
            margin-bottom: 0.75rem;
            color: var(--color-on-primary);
        }
        .elg-about-concepto .elg-about-text-overlay .elg-about-p { color: rgb(255 255 255 / 0.92); }
    }

    /* Historia — foto a un lado y los hitos al otro. En escritorio la columna de
     * hitos mide lo mismo que la foto y hace scroll por dentro (height:0 +
     * min-height:100% para que no estire la fila). En móvil, lista completa y
     * la foto entre 2006 y 2007 (copia dentro de la lista, oculta en escritorio). */
    .elg-about-historia-panel {
        height: 0;
        min-height: 100%;
        overflow-y: auto;
        padding: 3rem;
        scrollbar-width: thin;
        scrollbar-color: rgb(4 29 64 / 0.3) transparent;
    }
    .elg-about-historia-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2.5rem;
        align-items: start;
    }
    .elg-about-historia-item.elg-about-historia-photo { display: none; }
    @media (max-width: 768px) {
        .elg-about-historia-panel {
            height: auto;
            min-height: 0;
            overflow: visible;
            padding: 0 1.25rem;
        }
        .elg-about-historia-grid { gap: 2rem; }
        .elg-about-historia-side { display: none; }
        .elg-about-historia-item.elg-about-historia-photo {
            display: block;
            margin: 0 -1.25rem;
            aspect-ratio: 4 / 5;
            overflow: hidden;
        }
    }
    .elg-about-historia-item {
        display: block;
    }

    /* Misión y visión — en escritorio es la sección texto | foto. En móvil va
     * entre 2020 y 2021 (copia dentro de la lista de hitos, oculta en escritorio)
     * con el texto centrado sobre la foto, y la sección original se oculta. */
    .elg-about-mision .elg-about-eyebrow { display: none; }
    .elg-about-historia-mision { display: none; }
    @media (max-width: 768px) {
        .elg-about-mision { display: none; }
        .elg-about-historia-mision {
            display: grid;
            grid-template-areas: "media";
            margin: 0 -1.25rem;
            aspect-ratio: 4 / 5;
            overflow: hidden;
            background: #1a1a1a;
        }
        .elg-about-historia-mision .elg-about-img { grid-area: media; }
        .elg-about-historia-mision::after {
            content: '';
            grid-area: media;
            background: rgba(0,0,0,0.35);
        }
        .elg-about-historia-mision-text {
            grid-area: media;
            align-self: center;
            position: relative;
            z-index: 1;
            padding: 2rem 1.75rem;
            text-align: center;
            color: var(--color-on-primary);
        }
        .elg-about-historia-mision .elg-about-h2 { font-size: 1.125rem; color: var(--color-on-primary); }
        .elg-about-historia-mision .elg-about-p { color: rgb(255 255 255 / 0.92); font-size: 0.8125rem; }
    }
    .elg-about-historia-year {
        font-size: clamp(2.25rem, 4.5vw, 3.25rem);
        font-weight: 700;
        line-height: 1;
        margin: 0 0 1rem 0;
    }
    .elg-about-historia-label {
        font-size: 0.6875rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        font-weight: 600;
        margin: 0 0 0.75rem 0;
        color: rgb(4 29 64);
    }
    .elg-about-historia-body {
        font-size: 0.875rem;
        line-height: 1.6;
        color: rgb(4 29 64 / 0.78);
        margin: 0;
    }

    /* GansoInside callout — tarjeta oscura con márgenes laterales y CTA */
    .elg-about-gi {
        position: relative;
        aspect-ratio: 3 / 1.2;
        max-height: 480px;
        overflow: hidden;
        background: #0a0a0a;
        margin: 4rem 2rem;
    }
    @media (max-width: 768px) {
        .elg-about-gi { aspect-ratio: 4 / 5; max-height: none; margin: 2.5rem 1.25rem; }
    }
    .elg-about-gi-img {
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        object-fit: cover; object-position: center;
        opacity: 0.85;
    }
    .elg-about-gi-overlay {
        position: absolute; inset: 0;
        background: linear-gradient(to right, rgba(0,0,0,0.55), rgba(0,0,0,0.15));
    }
    .elg-about-gi-head {
        position: absolute;
        top: 2rem; left: 2rem; right: 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 2rem;
        color: var(--color-on-primary);
    }
    @media (max-width: 768px) {
        .elg-about-gi-head { top: 1.25rem; left: 1.25rem; right: 1.25rem; flex-direction: column; align-items: start; gap: 0.75rem; }
    }
    .elg-about-gi-brand {
        font-size: clamp(1.25rem, 2.5vw, 1.875rem);
        font-weight: 700;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        margin: 0;
        flex: 0 0 auto;
        position: relative;
        padding-right: 2rem;
    }
    .elg-about-gi-brand::after {
        content: '';
        position: absolute;
        right: -1.5rem;
        top: 50%;
        width: 18vw;
        height: 1px;
        background: rgba(255,255,255,0.55);
    }
    /* Móvil: la línea va debajo del título, a todo el ancho */
    @media (max-width: 768px) {
        .elg-about-gi-head { align-items: stretch; }
        .elg-about-gi-brand {
            padding: 0 0 0.75rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.55);
        }
        .elg-about-gi-brand::after { display: none; }
        .elg-about-gi-cta { align-self: center; }
    }
    .elg-about-gi-cta {
        font-size: 0.6875rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        font-weight: 600;
        color: var(--color-on-primary);
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        white-space: nowrap;
    }
    .elg-about-gi-cta:hover { opacity: 0.75; }
    .elg-about-gi-body {
        position: absolute;
        bottom: 2rem; left: 2rem; right: 2rem;
        max-width: 36rem;
        color: var(--color-on-primary);
        font-size: 0.9375rem;
        line-height: 1.55;
        opacity: 0.92;
    }
    @media (max-width: 768px) {
        .elg-about-gi-body { bottom: 1.25rem; left: 1.25rem; right: 1.25rem; font-size: 0.875rem; }
    }

    /* Newsletter inline — versión compacta dentro del About */
    .elg-about-newsletter {
        text-align: center;
        margin: 5rem auto 4rem;
        max-width: 36rem;
        padding: 0 1.25rem;
    }
    .elg-about-newsletter-title {
        font-size: clamp(1.5rem, 2.5vw, 1.875rem);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        margin: 0 0 0.5rem 0;
    }
    .elg-about-newsletter-sub {
        font-size: 0.75rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: rgb(4 29 64 / 0.7);
        margin: 0 0 1.5rem 0;
    }
    .elg-about-newsletter-form {
        display: flex;
        gap: 0;
        border-bottom: 1px solid rgb(4 29 64 / 0.3);
        padding: 0.5rem 0;
    }
    .elg-about-newsletter-input {
        flex: 1;
        border: 0;
        background: transparent;
        font-size: 0.9375rem;
        padding: 0.375rem 0;
        outline: none;
        color: rgb(4 29 64);
    }
    .elg-about-newsletter-input::placeholder { color: rgb(4 29 64 / 0.5); }
    .elg-about-newsletter-btn {
        background: transparent;
        border: 0;
        font-size: 0.6875rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        font-weight: 600;
        color: rgb(4 29 64);
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
    .elg-about-newsletter-btn:hover { opacity: 0.7; }

    /* Compromiso — split mountains | jacket con título centrado */
    .elg-about-compromiso {
        position: relative;
        width: 100%;
        aspect-ratio: 3 / 1.3;
        max-height: 520px;
        overflow: hidden;
        background: #1a1a1a;
        margin: 4rem 0 0 0;
    }
    @media (max-width: 768px) {
        .elg-about-compromiso { aspect-ratio: 3 / 4; max-height: none; }
    }
    .elg-about-compromiso-img {
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        object-fit: cover; object-position: center;
    }
    .elg-about-compromiso-overlay {
        position: absolute; inset: 0;
        background: rgba(0,0,0,0.25);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;
        color: var(--color-on-primary);
        padding: 2rem;
    }
    .elg-about-compromiso-title {
        font-size: clamp(1.5rem, 3vw, 2.25rem);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        line-height: 1.2;
        margin: 0 0 1rem 0;
    }
    .elg-about-compromiso-body {
        font-size: 0.875rem;
        line-height: 1.6;
        max-width: 32rem;
        margin: 0 0 1.5rem 0;
        opacity: 0.92;
    }
    .elg-about-compromiso-cta {
        font-size: 0.6875rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        font-weight: 600;
        color: var(--color-on-primary);
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
    .elg-about-compromiso-cta:hover { opacity: 0.75; }

    /* Squad — banda azul + grid Instagram */
    .elg-about-squad {
        background: rgb(4 29 64);
        color: var(--color-on-primary);
        padding: 2rem 0 0 0;
    }
    .elg-about-squad-head {
        padding: 0 2rem 1.5rem;
    }
    @media (max-width: 768px) {
        .elg-about-squad-head { padding: 0 1.25rem 1rem; }
    }
    .elg-about-squad-title {
        font-size: clamp(1.5rem, 3vw, 2.25rem);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        margin: 0;
    }
    .elg-about-squad-sub {
        font-size: 0.8125rem;
        letter-spacing: 0.04em;
        opacity: 0.75;
        margin: 0.25rem 0 0 0;
    }
    .elg-about-squad-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 0;
    }
    @media (max-width: 900px) { .elg-about-squad-grid { grid-template-columns: repeat(2, 1fr); } }

    /* =============================================================
     * Valores — carrusel horizontal de 5 cards portrait
     * ============================================================= */
    .elg-values {
        margin: 5rem 0 4rem;
        position: relative;
    }
    .elg-values-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 2rem;
        margin: 0 0 1.5rem 0;
    }
    @media (max-width: 768px) {
        .elg-values-head { padding: 0 1.25rem; }
    }
    .elg-values-title {
        font-size: clamp(1.5rem, 3vw, 2.25rem);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        margin: 0;
        color: rgb(4 29 64);
    }
    .elg-values-arrows {
        display: flex;
        gap: 0.75rem;
    }
    .elg-values-arrow {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 9999px;
        border: 1px solid rgb(4 29 64 / 0.2);
        background: transparent;
        color: rgb(4 29 64);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .elg-values-arrow:hover:not(:disabled) {
        background: rgb(4 29 64);
        color: var(--color-on-primary);
    }
    .elg-values-arrow:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

    /* Escritorio: carrusel pegado a los bordes y tarjetas sin hueco entre ellas */
    .elg-values-track-wrap {
        overflow: hidden;
        padding: 0;
    }
    @media (max-width: 768px) {
        .elg-values-track-wrap { padding: 0 1.25rem; }
    }
    .elg-values-track {
        display: flex;
        gap: 0;
        scroll-behavior: smooth;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .elg-values-track::-webkit-scrollbar { display: none; }
    @media (max-width: 768px) {
        .elg-values-track { gap: 1rem; }
    }

    .elg-values-card {
        flex: 0 0 25%;
        scroll-snap-align: start;
        position: relative;
        aspect-ratio: 3 / 4;
        overflow: hidden;
        background: #1a1a1a;
        color: var(--color-on-primary);
    }
    @media (max-width: 1100px) {
        .elg-values-card { flex: 0 0 calc(100% / 3); }
    }
    @media (max-width: 768px) {
        .elg-values-card { flex: 0 0 calc((100% - 1rem) / 2); }
    }
    @media (max-width: 540px) {
        .elg-values-card { flex: 0 0 100%; }
    }
    /* Móvil: sin cabecera ni flechas (se desliza); "Nuestros valores" dentro de cada tarjeta */
    .elg-values-card-eyebrow {
        display: none;
        font-size: 0.625rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        margin: 0 0 0.5rem 0;
        opacity: 0.9;
    }
    @media (max-width: 768px) {
        .elg-values-head { display: none; }
        .elg-values-card-eyebrow { display: block; }
    }
    .elg-values-card-img {
        position: absolute; inset: 0;
        width: 100%; height: 100%;
        object-fit: cover; object-position: center;
    }
    .elg-values-card-overlay {
        position: absolute; inset: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
    }
    .elg-values-card-body {
        position: absolute;
        bottom: 1.25rem; left: 1.25rem; right: 1.25rem;
        text-align: center;
    }
    .elg-values-card-title {
        font-size: 1rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        line-height: 1.2;
        margin: 0 0 0.5rem 0;
    }
    .elg-values-card-tagline {
        font-size: 0.75rem;
        line-height: 1.45;
        opacity: 0.88;
        margin: 0;
    }
}
