/* Variables de Tema */
:root {
    --primary-color: #1a3a5f;
    --secondary-color: #e9b44c;
    --accent-color: #2a628f;
    --light-color: #f8f9fa;
    --dark-color: #16262e;
    --text-color: #2a628f;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --header-height: 90px;
    --text-glow-light: 0 0 15px rgba(255, 255, 255, 0.895), 0 0 30px rgba(255, 255, 255, 0.887);
    
    /* Variables para modo oscuro */
    --bg-light: #FFFFFF;
    --bg-dark: #222222;
    --text-light: #000000;
    --text-dark: #E0E0E0;
    
    /* Nuevas variables para el brillo */
    --text-glow-light: 0 0 15px rgba(255, 255, 255, 0.7), 0 0 30px rgba(255, 255, 255, 0.4);
    --text-glow-dark: none;
}

body.light-mode {
    --bg-color: var(--bg-light);
    --text-color: var(--text-light);
    --header-bg: rgba(255, 255, 255, 0.8);
    --header-scrolled-bg: rgba(255, 255, 255, 0.95);
    --nav-text-color: var(--primary-color);
    --hamburger-color: var(--primary-color);
    --text-glow: var(--text-glow-light);
}

body.dark-mode {
    --bg-color: #2e2e2e;
    --card-bg: #2e2e2e;
    --text-color: #fff;
    --header-bg: rgba(29, 24, 24, 0.85);
    --header-scrolled-bg: rgba(29, 24, 24, 0.95);
    --nav-text-color: var(--text-dark);
    --hamburger-color: var(--text-dark);
    --text-glow: #fff;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

/* Header - Navbar con efecto de brillo */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    transition: var(--transition);
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header.scrolled {
    background: var(--header-scrolled-bg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: var(--transition);
    position: relative;
    text-shadow: var(--text-glow);
    padding: 5px 15px;
    margin: -5px -15px;
    border-radius: 5px;
}


.logo-highlight {
    color: var(--secondary-color);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 8px 15px;
    margin: -8px -15px;
    transition: var(--transition);
    position: relative;
    border-radius: 4px;
    box-shadow: var(--text-glow); /* Usar box-shadow aquí */
}

body.dark-mode .nav-link {
    box-shadow: none; /* CORRECCIÓN: eliminar el box-shadow en modo oscuro */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    width: calc(100% - 30px);
    height: 3px;
    background: var(--secondary-color);
    border-radius: 3px;
    transition: var(--transition);
    transform: scaleX(0);
    transform-origin: left;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-btn {
    background: var(--secondary-color);
    color: var(--dark-color);
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.nav-btn:hover {
    background: #d9a336;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 180, 76, 0.4);
}

.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--hamburger-color);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 3px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-top: var(--header-height);
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(26, 58, 95, 0.8) 0%, rgba(42, 98, 143, 0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    width: 100%;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 800px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    max-width: 700px;
    font-weight: 300;
    opacity: 0.9;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hero-cta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 16px 35px;
    background: var(--secondary-color);
    color: var(--dark-color);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: #ffcc5e;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    opacity: 0.8;
    text-decoration: none;
    animation: bounce 2s infinite;
}

.hero-scroll i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.hero-scroll span {
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);}
    40% {transform: translateY(-20px) translateX(-50%);}
    60% {transform: translateY(-10px) translateX(-50%);}
}

/* Secciones */
.section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary-color);
    position: relative;
}

body.dark-mode .section-title {
    color: var(--secondary-color);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 15px auto 30px;
    border-radius: 2px;
}

/* Contenido de ejemplo */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

body.dark-mode .feature-title {
    color: var(--secondary-color);
}

.feature-description {
    color: var(--text-color);
    line-height: 1.7;
}

.footer {
    text-align: center;
    padding: 40px 20px;
    background: var(--primary-color);
    color: white;
    margin-top: 80px;
}

body.dark-mode .footer {
    background: #1a1a1a;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .nav-links {
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .nav-links {
        gap: 15px;
    }
    
    .nav-container {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }
    
    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 30px 30px;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        z-index: 1000;
        gap: 15px;
    }
    
    .nav-container.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 12px 0;
        width: 100%;
        text-shadow: none; /* Desactivar brillo en móviles */
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 14px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .hero {
        min-height: 600px;
    }
}

/* Enlaces de navegación en modo oscuro - Color blanco */
body.dark-mode .nav-link {
    color: #FFFFFF !important;
}

body.dark-mode .nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Menú móvil en modo oscuro - Color blanco */
@media (max-width: 768px) {
    body.dark-mode .nav-link {
        color: #FFFFFF !important;
    }
}

/* Añadir estas reglas específicas para el icono de hamburguesa */
.hamburger span {
    background: var(--primary-color); /* Color por defecto en modo claro */
    transition: var(--transition);
}

body.dark-mode .hamburger span {
    background: var(--secondary-color); /* Color dorado en modo oscuro */
}

/* Asegurar que el botón sea visible en móviles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        position: relative;
        z-index: 1002; /* Mayor que el menú desplegado */
    }
    
    .hamburger span {
        background: var(--primary-color); /* Fuerza color en móviles */
    }
    
    body.dark-mode .hamburger span {
        background: var(--secondary-color); /* Fuerza color en móviles modo oscuro */
    }
}

/* Mantener las animaciones existentes */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}




/* Media query para dispositivos móviles */
@media (max-width: 768px) {
    .section-title::after {
        display: none !important;
    }
}



@media (max-width: 768px) {
    /* Ajustar el menú desplegable para que ocupe más espacio */
    .nav-container {
        width: 320px; /* Aumentar el ancho para acomodar dos palabras */
        padding: 100px 30px 30px;
    }
    
    /* Mantener dos palabras juntas en la misma línea */
    .nav-link {
        white-space: nowrap; /* Evitar que se rompan las palabras */
        padding: 12px 15px; /* Más padding para mejor tacto */
        margin: -12px -15px; /* Ajustar márgenes */
        font-size: 1.1rem; /* Tamaño de fuente ligeramente menor */
    }
    
    /* Mejorar el espaciado entre elementos del menú */
    .nav-links {
        gap: 12px;
    }
    
    /* Ajustar el botón de modo oscuro */
    .nav-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        margin-top: 15px;
    }
    
    /* Asegurar que el botón de hamburguesa sea visible */
    .hamburger {
        position: relative;
        z-index: 1002;
    }
}

/* Para pantallas muy pequeñas (menos de 400px) */
@media (max-width: 400px) {
    .nav-container {
        width: 100%; /* Ocupar todo el ancho en móviles pequeños */
    }
    
    .nav-link {
        padding: 12px 10px;
        margin: -12px -10px;
        font-size: 1.05rem;
    }
    
    .hero-title {
        font-size: 1.8rem; /* Reducir tamaño del título en móviles pequeños */
    }
    
    .hero-subtitle {
        font-size: 1rem; /* Reducir tamaño del subtítulo */
    }
}





/* Añadir al final del archivo */
body.dark .nav-link {
    color: #ffffff !important;
}

body.dark .section-title {
    color: #6ba3d8;
}


@media (max-width: 768px) {
    body.dark .nav-link {
        color: #ffffff !important;
    }
}









/* Modo oscuro general */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode .header {
    background: rgba(29, 24, 24, 0.95);
}

body.dark-mode .nav-link {
    color: #ffffff !important;
}

body.dark-mode .section-title {
    color: #6ba3d8;
}

body.dark-mode .section-title::after {
    background: #e9b44c;
}

/* Popup modo oscuro */
body.dark-mode .project-modal {
    background: rgba(0, 0, 0, 0.95);
}

body.dark-mode .modal-content {
    background: #2e2e2e;
    color: #e0e0e0;
}

body.dark-mode .modal-header-content {
    color: #ffffff;
}

body.dark-mode .location-tag {
    background: #e9b44c;
    color: #1a3a5f;
}

body.dark-mode .type-tag {
    background: #2a628f;
    color: #ffffff;
}

body.dark-mode .feature-text {
    color: #e0e0e0;
}

body.dark-mode .btn {
    background: #1a3a5f;
    color: #ffffff;
}

body.dark-mode .btn-contact {
    background: #e9b44c;
    color: #1a3a5f;
}


body.dark-mode .logo-text {
    color: var(--secondary-color);
    text-shadow: none;
}

/* AÑADIR NUEVAS REGLAS AQUÍ */
body.dark-mode .logo-text {
    color: #6ba3d8 !important;
}

body.dark-mode .logo-highlight {
    color: #e9b44c !important;
}
