/* ===================================
   VARIABLES CSS
   =================================== */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #64748b;
    --accent: #3b82f6;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    --radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* ===================================
   RESET Y BASE
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ===================================
   HEADER Y NAVEGACIÓN - SIEMPRE TRANSPARENTE
   =================================== */
.header {
    background-color: rgba(30, 64, 175, 0.25);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.5s ease;
}

/* El header NO cambia al hacer scroll */
.header.scrolled {
    background-color: rgba(30, 64, 175, 0.35);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: var(--transition);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-text {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Menú Desktop */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 0.4rem 0.9rem;
    position: relative;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius);
}

.nav-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: white;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 70%;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Botón de Contacto */
.btn-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.25rem;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 
        0 4px 15px rgba(255, 107, 53, 0.4),
        0 0 20px rgba(255, 107, 53, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-contact:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 6px 25px rgba(255, 107, 53, 0.5),
        0 0 30px rgba(255, 107, 53, 0.3);
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
}

.contact-icon {
    font-size: 1.1rem;
}

/* Botón menú móvil */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Menú móvil */
.mobile-menu {
    display: none;
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    background-color: rgba(30, 64, 175, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    z-index: 999;
}

.mobile-menu.active {
    max-height: 500px;
}

.mobile-menu-list {
    list-style: none;
    padding: 1.5rem 0;
}

.mobile-link {
    display: block;
    padding: 1.25rem 2rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.mobile-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: white;
}

/* Responsive Header */
@media (max-width: 968px) {
    .nav-menu,
    .btn-contact {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .nav-container {
        padding: 0.625rem 1.5rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    background-image: url('/images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 0;
    text-align: center;
    overflow: hidden;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Overlay del hero (Ajustado para continuidad vertical) */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom, /* ¡CAMBIO CLAVE! Ahora es vertical */
        rgba(30, 64, 175, 0.75) 0%,   /* Color inicial del hero (más oscuro) */
        rgba(30, 64, 175, 0.55) 100% /* Color final del hero: DEBE COINCIDIR con el inicio de .areas-section */
    );
    z-index: 1;
}

/* Efecto de brillo animado */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    z-index: 2;
    animation: shine 8s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -3px;
    color: white;
    text-shadow: 
        0 3px 15px rgba(0, 0, 0, 0.6),
        0 6px 25px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================
   BOTONES
   =================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: white;
    color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* ===================================
   SECCIÓN DE ÁREAS - CON IMAGEN DE FONDO CONTINUA
   =================================== */
.areas-section {
    position: relative;
    padding: 6rem 2rem 5rem;
    background-image: url('/images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Overlay con transición suave (AHORA ES UNA CONTINUACIÓN) */
.areas-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(30, 64, 175, 0.55) 0%, /* <-- COINCIDE CON EL FINAL DEL HERO */
        rgba(30, 64, 175, 0.50) 10%,
        rgba(59, 130, 246, 0.45) 20%,
        /* ...etc... el resto de tu degradado a blanco ... */
        rgba(255, 255, 255, 0.92) 100%
    );
    z-index: 1;
}




.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5);
}

/* ===================================
   GRID DE ÁREAS - CARDS FLOTANTES
   =================================== */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.area-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(30, 64, 175, 0.12);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.08);
}

/* Línea de acento arriba */
.area-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.area-card:hover::before {
    transform: scaleX(1);
}

.area-card:hover {
    transform: translateY(-8px);
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 
        0 20px 40px rgba(30, 64, 175, 0.15),
        0 0 0 1px rgba(30, 64, 175, 0.1);
    border-color: rgba(30, 64, 175, 0.2);
}

.area-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    filter: grayscale(0.2);
    transition: var(--transition);
}

.area-card:hover .area-icon {
    transform: scale(1.1);
    filter: grayscale(0);
}

.area-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.area-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.area-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.area-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.area-link:hover {
    color: var(--primary-dark);
}

.area-link:hover::after {
    transform: translateX(5px);
}

/* ===================================
   SOBRE EL PROYECTO
   =================================== */
.about-section {
    padding: 5rem 2rem;
    background-color: white;
}

.about-content {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-light);
    margin-bottom: 1.75rem;
}

.about-text strong {
    color: var(--primary);
    font-weight: 700;
}

.about-text em {
    color: var(--text-dark);
    font-style: italic;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: linear-gradient(
        to bottom,
        var(--text-dark),
        #0f172a
    );
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: white;
    font-weight: 700;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-column a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .areas-section {
        padding: 4rem 1.5rem 3rem;
    }
    
    .areas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}