/* Variables de Color Premium */
:root {
    --primary-color: #0a192f; /* Azul Marino Profundo */
    --secondary-color: #c5a451; /* Dorado / Cobre */
    --secondary-hover: #b0926a;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

/* Reseteo y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: 100px 0;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.section-subtitle {
    color: var(--secondary-color);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-weight: 600;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(197, 168, 128, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-lg {
    padding: 15px 40px;
    font-size: 1rem;
}

/* Header - Modificado para fondo oscuro por el logo claro */
#main-header {
    background-color: var(--primary-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: var(--transition);
    padding: 15px 0;
}

#main-header.scrolled {
    padding: 10px 0;
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    height: 75px;
    width: auto;
    object-fit: contain;
    transform: scale(1.1); /* Esto hace un "zoom" del 150% a la imagen */
    transform-origin: left center; /* Para que el zoom se haga hacia la derecha y no se salga de la pantalla */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white); /* Cambiado a blanco para fondo oscuro */
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--white); /* Cambiado a blanco */
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
  background-image: url('../img/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.4));
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    max-width: 600px;
}

.hero .subtitle {
    color: var(--secondary-color);
    font-family: var(--font-body);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    font-size: 1rem;
}

.hero .title {
    color: var(--white);
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 30px;
}

/* Identidad: Misión, Visión, Objetivo */
.identidad-section {
    background-color: var(--bg-light);
    padding: 80px 0;
}

.identidad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.identidad-card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.identidad-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.identidad-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.identidad-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.identidad-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Nosotros Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

.experience-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 20px 30px;
    text-align: center;
}

.experience-badge .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

/* Áreas de Práctica */
.text-center {
    text-align: center;
}

.section-header {
    max-width: 600px;
    margin: 0 auto 50px;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.area-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.area-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-bottom-color: var(--secondary-color);
}

.area-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(197, 168, 128, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: var(--transition);
}

.area-card:hover .area-icon {
    background-color: var(--secondary-color);
    color: var(--white);
}

.area-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.area-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* CTA Banner */
.cta-banner {
    background-image: url('../img/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0;
    position: relative;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.85);
}

.cta-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.8);
}

/* Footer */
.main-footer {
    background-color: #061121;
    color: rgba(255,255,255,0.7);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h3 {
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1.1rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand-col p {
    margin: 20px 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a:hover {
    color: var(--secondary-color);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-info i {
    color: var(--secondary-color);
    margin-top: 5px;
}

.footer-bottom {
    background-color: #040b16;
    padding: 20px 0;
    text-align: center;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom p, .footer-bottom a {
    font-size: 0.9rem;
}

.footer-bottom a:hover {
    color: var(--secondary-color);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible, .fade-in-left.visible, .fade-in-right.visible {
    opacity: 1;
    transform: translate(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Responsive */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .hero .title {
        font-size: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
        text-align: center;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero .title {
        font-size: 2.5rem;
    }
    
    .identidad-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom .container {
        flex-direction: column;
    }
}
/* Ventana Emergente de Privacidad */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 25, 47, 0.9); z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: #fff; width: 90%; max-width: 800px; max-height: 80vh;
    border-radius: 8px; padding: 40px; position: relative;
    transform: translateY(50px); transition: all 0.4s ease;
    overflow-y: auto; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close {
    position: absolute; top: 20px; right: 20px;
    background: transparent; border: none; font-size: 2rem;
    color: #666; cursor: pointer; transition: 0.2s;
}
.modal-close:hover { color: #c5a880; transform: scale(1.1); }
.modal-body h2 { margin-bottom: 20px; color: #0a192f; font-family: 'Playfair Display', serif; }
.modal-body p { margin-bottom: 15px; font-size: 0.95rem; color: #333; }
/* Justificar todos los párrafos de la página */
p {
    text-align: justify;
}
/* === EVALUADOR DE CASOS (ESTILOS Y ANIMACIÓN) === */
.btn-ai-floating {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: linear-gradient(270deg, #0a192f, #112240, #c5a880, #0a192f);
    background-size: 600% 600%;
    color: #ffffff;
    border: 2px solid #c5a880;
    padding: 15px 25px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: gradientAI 8s ease infinite; /* Animación lenta y elegante */
    transition: transform 0.3s ease;
}
.btn-ai-floating:hover {
    transform: scale(1.05); /* Se hace un poquito más grande al pasar el mouse */
}

/* El motor de la animación del color */
@keyframes gradientAI {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Diseño de la ventanita de preguntas */
/* Pantalla oscura de fondo */
.modal-overlay {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7); 
    overflow: auto;
    padding-top: 50px;
}
/* Diseño de la ventanita de preguntas */
.ai-modal {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px !important;
    text-align: left;
    border-top: 5px solid #c5a880;
} 

.eval-question {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0a192f;
    margin-bottom: 20px;
}
.eval-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: #fdfbf7;
    border: 1px solid #c5a880;
    border-radius: 8px;
    color: #333;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}
.eval-btn:hover {
    background: #0a192f;
    color: #ffffff;
    border-color: #0a192f;
}

/* Ajuste para celulares */
@media (max-width: 768px) {
    .btn-ai-floating {
        bottom: 20px;
        left: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}
/* === MODO NOCHE === */
/* Fondo General Oscuro y Secciones */
body.dark-mode,
body.dark-mode section,
body.dark-mode header,
body.dark-mode footer {
    background-color: #0f172a !important; 
}

/* Oscurecer Tarjetas Blancas y Formularios */
body.dark-mode .identidad-card,
body.dark-mode .area-card,
body.dark-mode .team-member,
body.dark-mode .contact-section {
    background-color: #1e293b !important; 
    border: 1px solid #334155 !important;
}

/* Títulos en Modo Noche (Forzados a ser blancos) */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode .section-title {
    color: #f8fafc !important; 
}

/* Párrafos en Modo Noche (Gris claro elegante) */
body.dark-mode p,
body.dark-mode .section-subtitle,
body.dark-mode .section-desc,
body.dark-mode li,
body.dark-mode label {
    color: #cbd5e1 !important;
}

/* Colores de las Cajas de Texto del Formulario */
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="tel"],
body.dark-mode select,
body.dark-mode textarea {
    background-color: #334155 !important;
    color: #ffffff !important;
    border: 1px solid #475569 !important;
}

/* Efecto de Hover para la Lunita */
#dark-mode-toggle {
    font-size: 1.2rem;
    transition: color 0.3s;
}
#dark-mode-toggle:hover {
    color: #c5a880;
}
/* Forzar que la caja del formulario se vuelva oscura */
body.dark-mode .contact-form-container {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
}

/* Forzar que las cajitas para escribir texto sean oscuras */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #334155 !important;
    color: #ffffff !important;
    border: 1px solid #475569 !important;
}

/* Para que las letritas de ejemplo (Nombre, Correo...) se vean bien */
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #94a3b8 !important;
}
/* === CORRECCIÓN MAESTRA DE BOTONES OCULTOS === */
/* Botones transparentes o con bordes (como el de 'Conoce más') */
body.dark-mode .btn,
body.dark-mode a.btn {
    color: #c5a880 !important; /* Letras doradas */
    border-color: #c5a880 !important; /* Borde dorado */
}

/* Botones principales sólidos (por si tienes otros) */
body.dark-mode .btn.btn-primary {
    background-color: #c5a880 !important; /* Fondo dorado */
    color: #0a192f !important; /* Letras oscuras elegantes */
    border: none !important;
}
/* Oscurecer TODAS las ventanas flotantes (Privacidad, IA, etc) */
body.dark-mode div[id*="modal"] > div {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
}

/* Oscurecer los botones dentro de las ventanas flotantes */
body.dark-mode div[id*="modal"] button {
    background-color: #334155 !important;
    color: #f8fafc !important;
    border: 1px solid #475569 !important;
}

body.dark-mode div[id*="modal"] button:hover {
    background-color: #c5a880 !important; /* Dorado al pasar el mouse */
    color: #0a192f !important;
}

/* === ESTILOS SECCIÓN ESTADÍSTICAS (DÍA Y NOCHE) === */
.stats-section {
    background-color: #f8fafc; /* Fondo clarito y limpio de día */
    padding: 80px 0;
    text-align: center;
}

/* El grid para que se acomoden en 4 columnas en PC y 1 en celular */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.stat-box {
    padding: 20px;
    text-align: center !important;

}

/* Íconos dorados */
.stat-icon {
    font-size: 3.5rem;
    color: #c5a880; 
    margin-bottom: 20px;
}

/* Números (Azul marino de día) */
.stat-number {
    font-size: 3.5rem;
    font-weight: 300;
    color: #c5a880; 
    margin-bottom: 10px;
 font-family: 'Cocomat Pro', sans-serif !important; /* <--- Usamos tu fuente elegante favorita */
}

/* Textos (Gris oscuro de día) */
.stat-text { 
    font-size: 1.1rem;
    color: #475569; 
    font-weight: 500;
    text-align: center !important;
}

/* --- MAGIA DEL MODO NOCHE AUTOMÁTICO --- */
body.dark-mode .stats-section { background-color: #0f172a !important; }
body.dark-mode .stat-number { color: #f8fafc !important; }
body.dark-mode .stat-text { color: #cbd5e1 !important; }
/* Íconos dorados para Misión, Visión, Objetivo y Áreas (Día y Noche) */
.identidad-card i,
.area-card i {
    color: #c5a880 !important;
}
/* Ocultar el cuadro de 100% de compromiso de la foto */
.experience-badge {
    display: none !important;
}
/* === ESTILOS ACORDEÓN FAQ (DÍA Y NOCHE) === */
.faq-section {
    padding: 80px 0;
    background-color: #ffffff; /* Blanco limpio de día */
}

.faq-container {
    max-width: 800px; /* Centrado y elegante, no abarca toda la pantalla */
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e2e8f0; /* Línea separadora sutil */
    margin-bottom: 5px;
}

/* Botón de la pregunta */
.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 20px 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0a192f;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
    font-family: inherit;
}

.faq-question:hover {
    color: #c5a880; /* Se pinta de dorado al pasar el mouse */
}

.faq-question i {
    transition: transform 0.3s ease; /* Giro de flechita suave */
    color: #c5a880;
}

/* Cuando la pregunta está abierta */
.faq-question.active i {
    transform: rotate(180deg); /* Voltea la flecha hacia arriba */
}
.faq-question.active {
    color: #c5a880; 
}

/* La caja de la respuesta (Oculta por defecto) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out; /* Animación de despliegue */
    padding: 0 10px;
}

.faq-answer p {
    padding-bottom: 20px;
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* --- MAGIA DEL MODO NOCHE AUTOMÁTICO PARA FAQ --- */
body.dark-mode .faq-section { background-color: #0a192f !important; }
body.dark-mode .faq-item { border-bottom: 1px solid #1e293b; }
body.dark-mode .faq-question { color: #f8fafc; }
body.dark-mode .faq-question:hover, body.dark-mode .faq-question.active { color: #c5a880; }
body.dark-mode .faq-answer p { color: #cbd5e1; }

