:root, [data-theme="light"] {
    --text-xs: clamp(.75rem, .7rem + .2vw, .875rem);
    --text-sm: clamp(.875rem, .82rem + .25vw, 1rem);
    --text-base: clamp(1rem, .97rem + .2vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.04rem + .45vw, 1.35rem);
    --text-xl: clamp(1.55rem, 1.2rem + 1vw, 2.2rem);
    --text-2xl: clamp(1.8rem, 1.3rem + 1.4vw, 2.8rem);
    --text-3xl: clamp(2.5rem, 2rem + 3.8vw, 5.6rem);
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --color-bg: #f7f6f2;
    --color-surface: #fbfaf7;
    --color-surface-2: #f2efe8;
    --color-surface-offset: #e7e2d8;
    --color-border: #ddd8cf;
    --color-divider: #e7e2da;
    --color-text: #231f1a;
    --color-text-muted: #666056;
    --color-text-faint: #989287;
    --color-text-inverse: #f8f6f1;
    --color-primary: #0a666c;
    --color-primary-hover: #075258;
    --color-primary-highlight: #d6e5e3;
    --color-gold: #9e7237;
	--backgrey: #f6f7f9;
--font-body: 'Inter', sans-serif;
--font-display: 'Chivo', sans-serif;
    --content: 1240px;
    --transition: 180ms cubic-bezier(.16, 1, .3, 1);
}

[data-theme="dark"] {
    --color-bg: #151412;
    --color-surface: #1b1a17;
    --color-surface-2: #23211d;
    --color-surface-offset: #2d2924;
    --color-border: #3d3933;
    --color-divider: #322f2a;
    --color-text: #eee6da;
    --color-text-muted: #b7ae9f;
    --color-text-faint: #7d776e;
    --color-text-inverse: #171614;
    --color-primary: #5fa6aa;
    --color-primary-hover: #86bec1;
    --color-primary-highlight: #2b3c3c;
    --color-gold: #c89f69;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --color-bg: #151412;
        --color-surface: #1b1a17;
        --color-surface-2: #23211d;
        --color-surface-offset: #2d2924;
        --color-border: #3d3933;
        --color-divider: #322f2a;
        --color-text: #eee6da;
        --color-text-muted: #b7ae9f;
        --color-text-faint: #7d776e;
        --color-text-inverse: #171614;
        --color-primary: #5fa6aa;
        --color-primary-hover: #86bec1;
        --color-primary-highlight: #2b3c3c;
        --color-gold: #c89f69;
    }
}

/* =========================================
   RESETEO BASE Y ESTILOS GLOBALES
   ========================================= */
*, :before, :after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: clip;
    width: 100%;
}

html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
}

::selection {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}
::-moz-selection {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

body::before {
    content: "";
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}
[data-theme="light"] body::before { opacity: 0.025; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--color-text-muted) 30%, transparent);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

img, video, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -60px;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: .8rem 1rem;
    z-index: 1000;
}
.skip-link:focus { top: 1rem; }

.container {
    width: min(calc(100% - 2rem), var(--content));
    margin-inline: auto;
}
.narrow {
    width: min(calc(100% - 2rem), var(--content));
    margin-inline: auto;
}
.section {
    padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}
.section + .section {
    padding-top: 1rem;
}

/* =========================================
   HEADER Y NAVEGACIÓN
   ========================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--color-bg) 88%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    z-index: 101; 
}

.brand-mark {
    width: 42px;
    height: 42px;
    color: var(--color-primary);
}

.brand-text {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.logo-light,
.logo-dark {
  height: 70px;
  display: none;
}

[data-theme="light"] .logo-light {
  display: block;
}

[data-theme="light"] .logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}
.brand-text strong {
    display: block;
    font-size: 1rem;
    line-height: 1;
}

.brand-text span {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--color-text-muted);
    margin-top: .2rem;
}

@media (min-width: 761px) {
    .nav-menu-wrapper {
        display: contents; 
    }
}

.nav-links > a {
    position: relative;
    padding-bottom: 2px;
}
.nav-links > a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links > a:hover::after { width: 100%; }

.nav-links {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.nav-links a {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.toggle {
    min-width: 44px;
    height: 44px;
    border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
    display: grid;
    place-items: center;
    background: var(--color-surface);
	border-radius: 12px;
}

.lang-toggle {
    padding: 0 .9rem;
    font-size: var(--text-sm);
    font-weight: 600;
}

/* Menú Desplegable */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link-btn {
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: .35rem;
    transition: opacity var(--transition), transform var(--transition);
}

.nav-link-btn::after {
    content: '';
    width: .45rem;
    height: .45rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .7;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: -20px;
    height: 25px;
    z-index: 10;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.9rem);
    left: 0; 
    transform: translateY(-10px);
    min-width: 280px;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--color-surface) 92%, transparent);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
    display: grid;
    gap: 0.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 20;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.nav-dropdown-menu a:hover {
    background: var(--color-surface-2);
    transform: translateX(4px); 
}

.nav-dropdown:hover .nav-dropdown-menu, 
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.backgrey {
  background-color: #f6f7f9;
}

/* =========================================
   HERO Y ANIMACIONES (EXACTAMENTE 500PX Y CENTRADO)
   ========================================= */
.hero-media {
    position: relative;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 500px; 
    overflow: hidden;
}

.hero-media video, .hero-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
    transform: translateZ(0); 
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.75) 100%);
    z-index: 1;
}

.hero-caption {
    position: relative; 
    width: min(calc(100% - 2rem), 700px);
    color: #fff;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;     
}

.hero-caption h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -.03em;
    margin-bottom: 1rem;
    width: 100%;
    
    max-width: none !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    
    background: linear-gradient(110deg, #ffffff 30%, rgba(255, 255, 255, 0.5) 50%, #ffffff 70%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmerText 7s infinite linear;
}

@keyframes shimmerText {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.hero-caption p {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    max-width: 65ch;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}
.hero-caption p + p {
    opacity: .92;
    margin-top: 1rem;
}

/* =========================================
   CARRUSEL (MARQUEE)
   ========================================= */
.logo-strip {
    width: 100%;
    overflow: hidden;
    background: #FFFFFF;
    border-top: 1px solid var(--color-divider);
    border-bottom: 1px solid var(--color-divider);
    position: relative;
    z-index: 10;
    display: flex; 
}

.logo-strip-inner {
    display: flex;
    width: max-content;
    animation: scrollMarquee 35s linear infinite;
    will-change: transform;
}

.logo-strip-inner:hover {
    animation-play-state: paused;
}

.logo-item {
    min-width: 150px; 
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--color-text-muted);
    text-align: center;
    border-right: 1px solid var(--color-divider);
    font-weight: 600;
}

/* ESTILOS PARA IMÁGENES DENTRO DEL CARRUSEL */
.logo-item img {
    max-height: 450px; 
    width: auto;
    object-fit: contain;
    /* Efecto corporativo premium: gris por defecto, color al hover */
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-item:hover img {
    filter: grayscale(0%) opacity(100%);
    transform: scale(1.05);
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* =========================================
   ESTRUCTURA DE SECCIONES (GRID)
   ========================================= */
.hero-copy {
    padding-block: 5rem 2rem;
}

.hero-copy h2, .section-heading h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    line-height: 1;
    letter-spacing: -.03em;
    margin-bottom: 1rem;
}

.hero-copy p, .section-heading p {
    color: var(--color-text-muted);
    max-width: 72ch;
}

.hero-copy p + p { margin-top: 1rem; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.4rem;
}

.stat-block {
    padding-top: 1rem;
    border-top: 1px solid var(--color-divider);
}

.stat-block strong {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    line-height: 1;
    margin-bottom: .4rem;
}

.stat-block span {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    display: block;
    max-width: 17ch;
}

.section-heading { margin-bottom: 2rem; }

.eyebrow {
    display: inline-block;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--color-text-faint);
    margin-bottom: .8rem;
}

.divisions-grid, .values-grid, .news-grid, .metrics-grid, .grid-3 {
    display: grid;
    gap: 1px;
    background: var(--color-border);
    transition: opacity 0.3s ease; 
}

.values-grid:hover .value-card:not(:hover),
.divisions-cards:hover .division-card:not(:hover),
.news-grid:hover .news-card:not(:hover) {
    opacity: 0.4;
    filter: grayscale(30%);
    transform: scale(0.98);
}

.divisions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--color-border);
}

.division-card, .value-card, .news-card, .metric-card, .grid-card {
    background: var(--color-surface);
    padding: 2rem;
}

.division-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.division-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.division-card a::after {
    content: ' →';
    transition: margin-left 0.2s ease;
}

.division-card a:hover::after {
    margin-left: 8px;
}

.division-card .index {
    font-size: var(--text-xs);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    margin-bottom: 1rem;
}

.division-card h3, .grid-card h3 {
    font-family: var(--font-body);
    font-size: 1.5rem;
    line-height: 1.08;
    margin-bottom: 1rem;
}

.division-card p, .grid-card p, .news-card p, .metric-card p {
    color: var(--color-text-muted);
    flex: 1; 
}

.division-card a {
    margin-top: 1.3rem;
    color: var(--color-primary);
    font-weight: 600;
}

.division-card img, .news-card img {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
    will-change: transform;
}

.division-card:hover img, .news-card:hover img {
    transform: scale(1.08);
}

.values-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 1px solid var(--color-border);
}

.value-card {
    min-height: 240px;
    background: var(--color-surface);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border-bottom: 3px solid transparent; 
}

.value-card:hover {
    transform: translateY(-10px);
    background: var(--color-surface-2);
    border-bottom-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    z-index: 2; 
}

.value-card h3 {
    font-size: var(--text-lg);
    transition: color 0.3s ease;
}

.value-card:hover h3 { color: var(--color-primary); }

.value-card p {
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.value-card:hover p { color: var(--color-text); }

.value-card strong { color: var(--color-text); }

/* =========================================
   HISTORIA (TIMELINE)
   ========================================= */
.history-list {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
    border-top: none; 
}

.history-list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: var(--color-divider);
}

.history-item {
    position: relative;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 2rem;
    padding: 3rem 0;
    border-bottom: 1px solid var(--color-divider);
    transition: transform 0.3s ease;
}

.history-item::before {
    content: '';
    position: absolute;
    left: -39px; 
    top: 3.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 3px solid var(--color-gold);
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
}

.history-item:hover::before {
    transform: scale(1.4);
    background: var(--color-gold);
    box-shadow: 0 0 15px color-mix(in srgb, var(--color-gold) 40%, transparent);
}

.history-item:hover { transform: translateX(10px); }

.history-item time {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--color-gold);
    line-height: 1;
    margin-top: 0.2rem;
}

.history-item h3 {
    font-size: var(--text-lg);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.history-item:hover h3 { color: var(--color-primary); }

.history-item p { color: var(--color-text-muted); }

/* =========================================
   FORMULARIOS Y CONTACTO
   ========================================= */
.contact-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-card {
    border: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
    background: var(--color-surface);
    padding: 2rem;
}

.contact-card:first-child { background: var(--color-surface-2); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.field {
    display: grid;
    gap: .4rem;
}

.field label {
    font-size: var(--text-sm);
    font-weight: 600;
}

.field input, .field textarea, .field select {
    padding: .95rem 1rem;
    border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
    background: var(--color-bg);
    border-radius: 0;
}

.field textarea {
    min-height: 140px;
    resize: vertical;
}

.field.full { grid-column: 1/-1; }

.btn-primary {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 1.5rem;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-weight: 600;
    z-index: 1;
    transition: color 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--color-primary-hover);
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-primary:hover::before { height: 100%; }

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

/* =========================================
   OTROS COMPONENTES
   ========================================= */
.news-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--color-border);
}

.news-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.news-card h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.08rem;
    line-height: 1.3;
    margin-bottom: .85rem;
}

.news-card span {
    margin-top: auto;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--color-text-faint);
}

.metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--color-border);
}

.metric-card strong {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    line-height: 1;
    margin-bottom: .4rem;
}

.page-hero {
    padding: 3.5rem 0 2rem;
    border-bottom: 1px solid var(--color-divider);
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    line-height: 1;
    letter-spacing: -.03em;
    margin-bottom: 1rem;
}

.page-hero p {
    color: var(--color-text-muted);
    max-width: 68ch;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--color-border);
}

.sections-divider {
    height: 1px;
    background: var(--color-divider);
    margin-top: 1.8rem;
}

.divisions-layout, .social-layout {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 2rem;
    align-items: start;
}

.divisions-copy h2, .social-layout h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    line-height: 1;
    margin: 0 0 1rem;
}

.divider-line {
    width: 70px;
    height: 4px;
    background: var(--color-primary);
    margin: 1rem 0 1.2rem;
}

.divisions-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    transition: opacity 0.3s ease;
}

.division-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.social-layout { padding: 1rem 0; }
.social-layout p {
    color: var(--color-text-muted);
    max-width: 60ch;
    margin: 0 0 1.4rem;
}
.social-layout .btn-primary { display: inline-flex; }

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* =========================================
   FOOTER
   ========================================= */
main {
    background: var(--color-bg);
    z-index: 2;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4); 
    margin-bottom: 0; 
}

.footer {
    position: sticky;
    bottom: 0;
    z-index: 1; 
    padding: 2rem 0;
    border-top: 1px solid var(--color-divider);
    background: var(--color-bg);
    transform: scale(0.98);
    transition: transform 0.4s ease;
}

body:hover .footer { transform: scale(1); }

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr .8fr;
    gap: 1.5rem;
}

.footer ul {
    list-style: none;
    display: grid;
    gap: .4rem;
}

.footer p, .footer li, .footer a {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
.footer ul a {
    position: relative;
    padding-bottom: 2px;
    text-decoration: none;
}
.footer ul a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.footer ul a:hover::after { width: 100%; }

/* =========================================
   RESPONSIVE (ESCRITORIO MEDIO, TABLETS Y MÓVILES)
   ========================================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100;
}

.hamburger .bar {
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s ease;
}

@media (max-width:1024px) {
    .stats-row, .values-grid, .news-grid, .metrics-grid, .divisions-grid, .grid-3, .contact-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .divisions-layout, .social-layout { grid-template-columns: 1fr; }
    .divisions-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width:760px) {
    .navbar {
        flex-direction: row; 
        align-items: center; 
        justify-content: space-between;
        width: 100%;
    }

    .hamburger { display: flex; }

    .nav-menu-wrapper {
        position: fixed;
        top: 0;
        right: -100%; 
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background: var(--color-surface);
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 2rem 2rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 90;
        overflow-y: auto;
        display: flex;
    }

    .nav-menu-wrapper.active { right: 0; }

    .hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 1.5rem;
    }

    .nav-actions {
        margin-top: 2rem;
        width: 100%;
        justify-content: flex-start;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        background: transparent;
        border: none;
        padding: 0.5rem 0 0 1rem;
        margin-left: 0.5rem;
        border-left: 2px solid var(--color-border);
        pointer-events: auto;
        display: none;
        width: 100%;
    }

    .nav-dropdown:focus-within .nav-dropdown-menu,
    .nav-dropdown.active .nav-dropdown-menu {
        display: grid; 
    }

    .stats-row, .values-grid, .news-grid, .metrics-grid, .divisions-grid, .contact-strip, .grid-3, .form-grid, .footer-grid, .divisions-cards {
        grid-template-columns: 1fr;
    }
    
    .history-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 2rem 0;
    }
    .history-item::before { top: 2.2rem; }

    .division-card, .value-card, .news-card, .metric-card, .grid-card {
        padding: 1.5rem;
    }

    main { box-shadow: none; }
    .footer { position: relative; transform: none; }
}

@media (prefers-reduced-motion:reduce) {
    *, *:before, *:after {
        scroll-behavior: auto;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}