/* --- CONFIGURACIÓN MAESTRA PREMIUM --- */
:root {
    --primary: #0a1128;      /* Oxford Blue */
    --gold: #c5a059;         /* Gold Champagne */
    --gold-dark: #a68542;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --white: #ffffff;
    --bg-light: #f4f7f6;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

/* Corrección para que la página abarque siempre toda la altura */
html { 
    scroll-behavior: smooth; 
    height: 100%;
}

body { 
    font-family: 'Montserrat', sans-serif; 
    color: var(--text-dark); 
    line-height: 1.7;
    background-color: #fff;
    overflow-x: hidden; 
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* El main se expandirá para empujar el footer hacia abajo si sobra espacio */
main {
    flex: 1;
}

h1, h2, h3, .brand { font-family: 'Prata', serif; font-weight: 400; }

/* --- NAVEGACIÓN (Sticky & Glassmorphism) --- */
.main-nav { 
    padding: 25px 0; 
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.main-nav.scrolled {
    background: rgba(10, 17, 40, 0.98); 
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.nav-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 20px; 
}

.brand { font-size: 1.5rem; letter-spacing: 2px; color: var(--white); text-decoration: none; cursor: pointer; }
.brand span { color: var(--gold); }

.nav-links { display: flex; align-items: center; }
.nav-links a { 
    color: var(--white); 
    text-decoration: none; 
    margin-left: 25px; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    transition: var(--transition);
    font-weight: 400;
}

.nav-links a:hover { color: var(--gold); }

.nav-btn { 
    background: var(--gold); 
    padding: 12px 25px !important; 
    border-radius: 2px; 
    font-weight: 600 !important; 
    color: white !important; 
}

.nav-btn:hover { background: var(--gold-dark); transform: translateY(-2px); }

.menu-toggle { display: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* --- HERO SECTIONS --- */
.hero, .hero-short {
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    position: relative;
    width: 100%;
}

/* Fondo para el Inicio */
.hero {
    background-image: linear-gradient(rgba(10, 17, 40, 0.7), rgba(10, 17, 40, 0.7)), 
                      url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?auto=format&fit=crop&q=80&w=1600');
    height: 90vh;
}

/* Fondo para Nosotros, Áreas y Contacto */
.hero-short {
    background-image: linear-gradient(rgba(10, 17, 40, 0.8), rgba(10, 17, 40, 0.8)), 
                      url('https://images.unsplash.com/photo-1505664194779-8beaceb93744?auto=format&fit=crop&q=80&w=1600');
    min-height: 50vh;
    padding-top: 100px; 
}

.hero-content { 
    max-width: 1200px; 
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    z-index: 5;
}

.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.2; }
.hero-content p { font-size: 1.1rem; max-width: 700px; margin: 0 auto 35px; opacity: 0.9; }

.badge { color: var(--gold); text-transform: uppercase; letter-spacing: 4px; font-size: 0.8rem; margin-bottom: 20px; font-weight: 600; display: block; }

.hero-actions { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* --- BOTONES --- */
.btn { 
    padding: 16px 32px; 
    text-decoration: none; 
    font-size: 0.85rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    transition: var(--transition); 
    border-radius: 2px;
    display: inline-block;
}

.btn-gold { background: var(--gold); color: white !important; }
.btn-gold:hover { background: var(--gold-dark); }

.btn-outline { border: 1px solid white; color: white !important; }
.btn-outline:hover { background: white; color: var(--primary) !important; }

/* --- ESTADÍSTICAS --- */
.stats-bar { 
    display: flex; 
    background: var(--white); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); 
    padding: 30px; 
    max-width: 800px; 
    margin: -50px auto 60px; 
    border-radius: 4px; 
    position: relative; 
    z-index: 20; 
}

.stat-item { flex: 1; text-align: center; border-right: 1px solid #eee; }
.stat-item:last-child { border-right: none; }
.stat-item strong { display: block; font-size: 2rem; color: var(--gold); font-family: 'Prata'; margin-bottom: 5px; }
.stat-item span { text-transform: uppercase; font-size: 0.7rem; letter-spacing: 1px; color: var(--text-light); font-weight: 600; }

/* --- SECCIONES COMUNES --- */
.container-large { max-width: 1200px; margin: 0 auto; padding: 80px 20px; }
.container-small { max-width: 800px; margin: 0 auto; padding: 80px 20px; text-align: center; }
.subtitle { color: var(--gold); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.separador { width: 50px; height: 2px; background: var(--gold); margin: 20px auto; }
.text-center { text-align: center; }

/* --- GRIDS --- */
.tramites-grid, .mision-vision-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
    margin-top: 30px;
}

.tramite-card, .card-mv { 
    background: #fff; 
    padding: 40px; 
    text-align: center; 
    border: 1px solid #f0f0f0; 
    transition: var(--transition);
    border-radius: 4px;
}

.tramite-card:hover, .card-mv:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.08); 
    border-color: var(--gold);
}

.icon-box, .card-mv i { font-size: 2.5rem; color: var(--gold); margin-bottom: 20px; display: block; }
.tramite-card h4, .card-mv h3 { font-size: 1.4rem; margin-bottom: 15px; color: var(--primary); }

/* --- FEATURES EXTRA --- */
.features-extra { background-color: var(--bg-light); padding: 80px 20px; }
.features-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 40px; 
    max-width: 1200px;
    margin: 50px auto 0;
}

.feature-item { text-align: center; }
.feature-item i { font-size: 2.5rem; color: var(--gold); margin-bottom: 20px; }
.feature-item h3 { margin-bottom: 15px; font-size: 1.2rem; }

/* --- UBICACIÓN --- */
.location-section { padding: 80px 20px; }
.location-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 50px; 
    align-items: center; 
    max-width: 1200px;
    margin: 0 auto;
}

.contact-list { list-style: none; margin-top: 25px; }
.contact-list li { margin-bottom: 15px; display: flex; align-items: center; gap: 15px; }
.contact-list i { color: var(--gold); width: 20px; }

/* --- FOOTER (Ajustado para fijarse al fondo) --- */
.footer-dark { 
    background: var(--primary); 
    color: white; 
    padding: 60px 20px 30px; 
    margin-top: auto; 
}
.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 40px; 
    max-width: 1200px; 
    margin: 0 auto 40px; 
}

.footer-section h4 { color: var(--gold); margin-bottom: 25px; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 2px; }
.footer-link { color: rgba(255,255,255,0.7); text-decoration: none; transition: var(--transition); line-height: 2; font-size: 0.9rem; }
.footer-link:hover { color: var(--gold); padding-left: 5px; }

.social-links { margin-top: 20px; display: flex; gap: 15px; }
.social-links a { color: white; font-size: 1.2rem; transition: var(--transition); }
.social-links a:hover { color: var(--gold); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; text-align: center; opacity: 0.5; font-size: 0.75rem; }

/* --- ANIMACIONES --- */
.animate-up { animation: fadeInUp 1s ease forwards; opacity: 0; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* WhatsApp Pulse */
.whatsapp-float { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    background: #25d366; 
    color: white; 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 30px; 
    z-index: 1001; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
    text-decoration: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .hero-content h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; z-index: 1001; }
    
    .nav-links { 
        position: fixed; 
        top: 0; 
        right: -100%; 
        width: 70%; 
        height: 100vh;
        background: var(--primary); 
        flex-direction: column; 
        justify-content: center;
        padding: 40px; 
        gap: 25px; 
        transition: 0.5s;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active { right: 0; }
    .nav-links a { margin: 0; font-size: 1.1rem; }
    
    .hero-content h1 { font-size: 2.2rem; }
    .stats-bar { flex-direction: column; gap: 20px; width: 85%; padding: 20px; }
    .stat-item { border-right: none; border-bottom: 1px solid #eee; padding-bottom: 15px; }
    .stat-item:last-child { border-bottom: none; }
}