:root {
    /* --- PALETA AZUL CLARO REFINADA --- */
    
    /* Fondos */
    --bg-main: #B8C8E8;          /* Azul claro principal */
    --bg-surface: #C8D6EE;       /* Superficie ligeramente más clara */
    --bg-card: #FFFFFF;          /* Tarjetas blancas */
    --bg-card-hover: #F5F8FF;    /* Hover en tarjetas */
    --bg-elevated: #0F1E35;      /* Marquee y elementos oscuros */
    
    /* Textos */
    --text-main: #0F1E35;        /* Azul muy oscuro: máximo contraste sobre azul claro */
    --text-muted: #2A3F5E;       /* Azul medio: textos secundarios */
    --text-dim: #4A6080;         /* Atenuado: labels, metadatos */
    --text-light: #FFFFFF;       /* Blanco puro */
    
    /* Acentos */
    --accent-primary: #C45F10;   /* Naranja tostado oscuro: legible sobre fondo azul claro */
    --accent-primary-soft: rgba(196, 95, 16, 0.12);
    --accent-glow: rgba(196, 95, 16, 0.2);
    --accent-secondary: #1A3A7A; /* Azul marino: contraste firme */
    --accent-secondary-soft: rgba(26, 58, 122, 0.12);
    --accent-dark: #0A1628;      /* Azul muy oscuro: footer */

    /* Bordes */
    --border-subtle: rgba(15, 30, 53, 0.08);
    --border-medium: rgba(15, 30, 53, 0.15);
    --border-accent: rgba(196, 95, 16, 0.35);

    /* Fuentes */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- AMBIENT LIGHTING --- */
.ambient-light {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -2;
    pointer-events: none;
    animation: float 25s infinite ease-in-out;
}

.light-1 {
    top: -20%; left: -15%;
    width: 55vw; height: 55vw;
    background: radial-gradient(circle, rgba(196, 95, 16, 0.18), transparent 70%);
}

.light-2 {
    bottom: -20%; right: -15%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(26, 58, 122, 0.20), transparent 70%);
    animation-delay: -12s;
}

.grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(15, 30, 53, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 30, 53, 0.06) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, 25px); }
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(184, 200, 232, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.logo span { color: var(--accent-primary); }

.logo-icon {
    width: 22px; height: 22px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.25s;
    letter-spacing: 0.01em;
}

.nav-menu a:hover { color: var(--text-main); }

.btn-nav {
    background-color: var(--accent-primary) !important;
    color: white !important;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700 !important;
    transition: all 0.25s !important;
}
.btn-nav:hover {
    background-color: #A84E0C !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* --- HERO SECTION --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

/* VIDEO BACKGROUND */
.hero-video-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

/* Overlay degradado sobre el video */
.hero-video-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(to right, rgba(184, 200, 232, 0.92) 40%, rgba(184, 200, 232, 0.5) 100%),
        linear-gradient(to top, rgba(184, 200, 232, 0.7) 0%, transparent 50%);
}

/* Placeholder cuando no hay video */
.hero-video-bg .video-placeholder {
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 70% 50%, rgba(74, 108, 247, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 80%, rgba(232, 131, 26, 0.06) 0%, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8%;
}

.hero-video-bg .video-placeholder .reel-hint {
    border: 2px dashed var(--border-medium);
    border-radius: 16px;
    padding: 40px 50px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    max-width: 280px;
    line-height: 1.8;
}

.hero-video-bg .video-placeholder .reel-hint span {
    display: block;
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.hero-container {
    position: relative;
    z-index: 1;
}

.tagline {
    font-family: var(--font-display);
    color: var(--accent-primary);
    letter-spacing: 3px;
    font-weight: 700;
    font-size: 0.78rem;
    display: block;
    margin-bottom: 24px;
    text-transform: uppercase;
}

h1 {
    font-family: var(--font-display);
    font-size: 5.5rem;
    line-height: 1.05;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

h1 .highlight {
    color: var(--accent-primary);
    position: relative;
    z-index: 1;
}

h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: 4px; left: -4px; width: 108%; height: 28%;
    background: var(--accent-primary);
    z-index: -1;
    opacity: 0.15;
    transform: rotate(-1.5deg);
    border-radius: 2px;
}

.hero-desc {
    max-width: 520px;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 50px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 50px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 30px;
}

.stat-item { display: flex; flex-direction: column; gap: 4px; }

.stat-num { 
    font-family: var(--font-display); 
    font-size: 2.4rem; 
    font-weight: 700; 
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.stat-label { 
    font-size: 0.75rem; 
    color: var(--text-dim); 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    font-weight: 600; 
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px; right: 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--text-dim);
    font-weight: 600;
    z-index: 1;
}

.scroll-indicator .line {
    width: 1px; height: 60px;
    background: linear-gradient(to bottom, var(--text-dim), transparent);
}

/* --- MARQUEE --- */
.marquee-container {
    background: var(--bg-elevated);
    color: var(--text-muted);
    padding: 18px 0;
    overflow: hidden;
    white-space: nowrap;
    transform: rotate(-1deg) scale(1.02);
    width: 102%;
    margin-left: -1%;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.marquee-content {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 3px;
    animation: marquee 40s linear infinite;
}

/* Acentuar algunas palabras del marquee via CSS */
.marquee-content { color: var(--text-dim); }

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- SECCIONES GENERALES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-pad { padding: 130px 20px; scroll-margin-top: 80px; }

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: 1.1;
    color: var(--text-main);
    letter-spacing: -0.02em;
    font-weight: 700;
}

.section-subtitle {
    max-width: 400px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.link-arrow {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s;
    border-bottom: 1px solid var(--border-accent);
    padding-bottom: 2px;
}
.link-arrow:hover {
    color: #F0921F;
    border-bottom-color: #F0921F;
}

/* --- ECOSISTEMA CARDS --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    padding: 40px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-accent);
}

.service-card .icon { font-size: 2rem; margin-bottom: 24px; }
.service-card h3 { 
    font-family: var(--font-display); 
    font-size: 1.35rem; 
    margin-bottom: 14px; 
    color: var(--text-main);
    font-weight: 600;
    letter-spacing: -0.01em;
}
.service-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* --- SOCIOS GRID --- */
.socios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.card-socio {
    background: #dfebfc;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s ease;
    border: 1px solid rgba(15, 30, 53, 0.08);
    display: flex;
    flex-direction: column;
}

.card-socio:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(15, 30, 53, 0.14);
    border-color: rgba(15, 30, 53, 0.14);
}

.img-wrapper {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.92) saturate(0.85);
}

.card-socio:hover .img-wrapper img { 
    transform: scale(1.07); 
    filter: brightness(0.92) saturate(1.05);
}

/* Overlay degradado sobre imagen */
.img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 0%;
    background: linear-gradient(to top, #EEF3FA, transparent);
}

.card-body { 
    padding: 18px 22px 24px; 
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

/* Badges */
.badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 11px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
}

.badge-blue { 
    background: #DDE7F5; 
    color: #1A3A7A;
    border: 1px solid #B8CAE8;
}
.badge-orange { 
    background: #FCEEDD; 
    color: #8C3D0A;
    border: 1px solid #F0C090;
}
.badge-rust { 
    background: #FBEAEA; 
    color: #8C2020;
    border: 1px solid #E8AAAA;
}
.badge-dark { 
    background: #DDE7F5;
    color: #1A3A7A;
    border: 1px solid #B8CAE8;
}

.location { 
    font-size: 0.7rem; 
    color: var(--text-dim); 
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 10px;
}

.card-body h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    font-family: var(--font-display);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.card-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
}

/* CTA Button */
.card-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 18px;
    background: var(--accent-secondary);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    transition: all 0.22s ease;
    font-family: var(--font-display);
    box-shadow: 0 4px 14px rgba(26, 58, 122, 0.25);
}
.card-link-btn:hover {
    background: var(--accent-primary);
    box-shadow: 0 6px 20px rgba(196, 95, 16, 0.35);
    transform: translateY(-1px);
    color: #fff;
}
.card-link-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s;
}
.card-link-btn:hover svg {
    transform: translate(2px, -2px);
}

/* --- SECCIÓN UBICACIÓN --- */
.location-layout {
    display: flex;
    align-items: center;
    gap: 80px;
    justify-content: space-between;
}

.location-text {
    flex: 1;
    max-width: 500px;
}

.location-list {
    list-style: none;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.location-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.92rem;
    color: var(--text-muted);
    padding: 14px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.location-list li:hover {
    background: var(--bg-surface);
}

.dot-indicator {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
}

/* Mapa SVG */
.map-container {
    flex: 1;
    position: relative;
    padding: 20px;
}

.hub-map {
    width: 100%;
    height: auto;
    max-height: 500px;
    overflow: visible;
}

/* Ajustar colores del mapa SVG en la paleta oscura */
.hub-map path[d*="M120,80"] {
    fill: var(--bg-card) !important;
    stroke: var(--border-medium) !important;
}

.connector-line {
    stroke: var(--text-dim);
    stroke-width: 1.5;
    stroke-dasharray: 8;
    animation: dash-animation 20s linear infinite;
    opacity: 0.5;
}

.city-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    fill: var(--text-muted);
    text-anchor: middle;
    letter-spacing: 1px;
}

.main-label {
    font-size: 13px;
    fill: var(--text-main);
    font-weight: 800;
}

.map-container:hover .connector-line { 
    stroke: var(--accent-primary); 
    opacity: 0.8; 
}

@keyframes dash-animation {
    to { stroke-dashoffset: -1000; }
}

/* --- CONTACTO --- */
.contact-box {
    background: var(--accent-secondary);
    border: 1px solid rgba(26, 58, 122, 0.3);
    padding: 80px 70px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.contact-box::before {
    content: '';
    position: absolute;
    top: -40%; right: -5%;
    width: 350px; height: 350px;
    background: var(--accent-primary);
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.15;
    pointer-events: none;
}

.contact-box::after {
    content: '';
    position: absolute;
    bottom: -30%; left: 30%;
    width: 250px; height: 250px;
    background: #4A7FDD;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.12;
    pointer-events: none;
}

.contact-text h2 { 
    font-family: var(--font-display); 
    font-size: 2.4rem; 
    margin-bottom: 14px; 
    color: var(--text-light);
    letter-spacing: -0.02em;
}
.contact-text p { 
    color: rgba(255,255,255,0.75); 
    max-width: 380px; 
    font-size: 1rem;
    line-height: 1.7;
}

.simple-form { display: flex; gap: 10px; width: 100%; max-width: 450px; z-index: 2; }

.simple-form input {
    flex: 1;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.simple-form input::placeholder { color: rgba(255,255,255,0.45); }
.simple-form input:focus { 
    outline: none; 
    border-color: var(--accent-primary); 
    box-shadow: 0 0 0 3px rgba(196, 95, 16, 0.25);
}

.simple-form button {
    background: var(--accent-primary);
    color: #0D0D14;
    border: none;
    padding: 0 28px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.simple-form button:hover {
    background: #A84E0C;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

/* --- FOOTER --- */
/* --- FOOTER --- */
footer {
    background-color: var(--accent-dark);
    margin-top: 0;
    color: var(--text-dim);
    position: relative;
}

.footer-wave {
    display: block;
    line-height: 0;
    margin-bottom: -2px;
    background: var(--bg-main); /* color de la sección anterior */
}

.footer-wave svg {
    width: 100%;
    height: 80px;
    display: block;
}

.footer-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 50px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
}

/* Iconos sociales */
.footer-socials {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: rgba(255,255,255,0.55);
    transition: all 0.25s;
    text-decoration: none;
}

.footer-socials a:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(196, 95, 16, 0.35);
}

/* Nav links */
.footer-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
    letter-spacing: 0.02em;
}

.footer-nav a:hover { color: var(--accent-primary); }

.footer-nav span {
    color: rgba(255,255,255,0.2);
    font-size: 0.8rem;
    user-select: none;
}

/* Copyright */
.footer-copy {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.02em;
}

/* --- ANIMACIONES --- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.visible { opacity: 1; transform: translate(0); }

/* --- MENÚ MÓVIL --- */
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.menu-toggle .bar {
    display: block;
    width: 24px; height: 2px;
    background-color: var(--text-muted);
    border-radius: 2px;
    transition: all 0.3s;
}

/* --- RESPONSIVE --- */
@media (max-width: 1100px) {
    .socios-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .location-layout { flex-direction: column; gap: 40px; }
    .location-text { text-align: center; max-width: 100%; }
    .location-list { text-align: left; }
}

@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    .hero-stats { display: none; }
    .socios-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-box { flex-direction: column; text-align: center; padding: 50px 30px; }
    .simple-form { flex-direction: column; width: 100%; }
    .simple-form button { padding: 16px; }
    .footer-content { flex-direction: column; gap: 20px; text-align: center; }
    .socials a { margin: 0 12px; }

    /* Menú Móvil */
    .menu-toggle { display: flex; z-index: 101; }
    .nav-menu {
        position: fixed; right: -100%; top: 0;
        width: 100%; height: 100vh;
        background: var(--bg-main);
        display: flex;
        flex-direction: column; justify-content: center; padding: 40px;
        transition: right 0.3s; z-index: 100;
    }
    .nav-menu.active { right: 0; }
    .nav-menu ul { flex-direction: column; gap: 30px; }
    .nav-menu a { font-size: 1.4rem; color: var(--text-main); }

    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
