/* EcuApex - Estilos Finales V7 (Completo: Modos + Footer + Nosotros) */

:root {
    /* --- VARIABLES BASE (MODO OSCURO) --- */
    --primary-blue: #0A3054;
    --secondary-green: #1DD1A1;
    --accent-blue: #0B5374;
    --cyan-accent: #0CBDD5;
    
    /* --- PALETA DINÁMICA --- */
    --bg-body: radial-gradient(circle at 80% 20%, #0B5374 0%, #0A3054 40%, #02050a 100%);
    --glass-bg: rgba(2, 13, 26, 0.9);
    --glass-border: rgba(29, 209, 161, 0.3);
    
    /* Textos */
    --text-main: rgba(255, 255, 255, 0.95);
    --text-muted: rgba(255, 255, 255, 0.85);
    --text-heading: #FFFFFF;
    --text-hero-sub: rgba(255, 255, 255, 0.9);
    
    /* Componentes */
    --card-hover-bg: rgba(15, 58, 94, 0.95);
    --input-bg: rgba(0, 0, 0, 0.6);
    --nav-bg: rgba(2, 13, 26, 0.95);
    --shadow-color: rgba(0,0,0,0.5);
    --footer-bg: #00050a;
    --footer-text: rgba(255, 255, 255, 0.6);
}

/* --- MODO CLARO (LIGHT MODE) --- */
[data-theme="light"] {
    /* Fondo Ejecutivo */
    --bg-body: linear-gradient(135deg, #F5F7FA 0%, #E4E8EB 100%);
    
    /* Cristales Claros */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(10, 48, 84, 0.15);
    
    /* Inversión de Textos */
    --text-main: #0A3054;
    --text-muted: #334155;
    --text-heading: #0A3054;
    --text-hero-sub: #1e293b;
    
    /* Componentes */
    --card-hover-bg: #FFFFFF;
    --input-bg: rgba(255, 255, 255, 0.9);
    --nav-bg: rgba(255, 255, 255, 0.98);
    --shadow-color: rgba(10, 48, 84, 0.15);
    --footer-bg: #0A3054;
    --footer-text: #FFFFFF;
    
    --secondary-green: #00B894; 
}

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

body {
    font-family: 'Quattrocento Sans', sans-serif;
    background: var(--bg-body);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.7;
    transition: background 0.5s ease, color 0.3s ease;
}

.font-display { font-family: 'Oranienbaum', serif; }

/* --- HERO SECTION (FIX FANTASMA) --- */
html[data-theme="light"] #home .hero-title,
html[data-theme="light"] #home .hero-title span,
html[data-theme="light"] #home .hero-subtitle,
html[data-theme="light"] #home .typewriter {
    color: #0A3054 !important;
    text-shadow: none !important;
    opacity: 1 !important;
}

html:not([data-theme="light"]) #home .hero-title,
html:not([data-theme="light"]) #home .hero-title span,
html:not([data-theme="light"]) #home .hero-subtitle,
html:not([data-theme="light"]) #home .typewriter {
    color: #FFFFFF !important;
    text-shadow: 0 2px 15px rgba(0,0,0,0.5) !important;
}

/* --- TEXTOS GENERALES (Reset de Tailwind) --- */
.text-gray-600, .text-gray-700, .text-gray-500, .text-gray-800, .text-gray-900,
.text-gray-200, .text-gray-300, .text-gray-400 {
    color: var(--text-muted) !important;
}

[data-theme="light"] .text-white {
    color: var(--text-main) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading) !important;
}

/* --- FONDOS Y CAJAS --- */
.bg-white, .bg-gray-50, .bg-gray-100, .bg-gray-200,
.bg-blue-50, .bg-green-50 {
    background-color: var(--glass-bg) !important;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px var(--shadow-color);
}

/* --- NAVEGACIÓN --- */
.nav-header {
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px var(--shadow-color);
    transition: background 0.3s ease;
}

/* LOGO GENERAL (HEADER) */
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--text-heading), var(--secondary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(29, 209, 161, 0.15);
    color: var(--secondary-green);
}

/* --- CARDS --- */
.service-card, .content-card, .team-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px -10px var(--shadow-color);
    transition: all 0.4s ease;
}

.service-card:hover, .team-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-green);
    background: var(--card-hover-bg) !important;
}

.service-card h3 {
    color: var(--secondary-green) !important;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Estilos para cuadros de gradiente */
.bg-gradient-to-br {
    background: var(--glass-bg) !important;
    border: 1px solid var(--secondary-green);
    border-radius: 16px;
}

.bg-gradient-to-br h3, .bg-gradient-to-br h4, .bg-gradient-to-br p,
.bg-gradient-to-br li, .bg-gradient-to-br span {
    color: var(--text-main) !important;
}

/* --- SECCIÓN NOSOTROS (Línea de Tiempo y Equipo) - RECUPERADA --- */
.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 2rem;
    border-left: 2px solid rgba(29, 209, 161, 0.3);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--secondary-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--secondary-green);
}

.timeline-item h4 {
    color: var(--secondary-green) !important;
    margin-bottom: 0.5rem;
}

/* Fotos Equipo */
.team-card img, .team-card .rounded-full {
    border: 3px solid var(--secondary-green);
    box-shadow: 0 0 20px rgba(29, 209, 161, 0.2);
    transition: all 0.4s ease;
}

.team-card:hover img, .team-card:hover .rounded-full {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(29, 209, 161, 0.5);
    border-color: var(--text-heading);
}

.team-card p.text-green-400 {
    color: var(--cyan-accent) !important;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* --- BOTONES --- */
.btn-primary {
    background: linear-gradient(90deg, var(--secondary-green), var(--accent-blue));
    color: #000000 !important;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(29, 209, 161, 0.6);
}

[data-theme="light"] .btn-primary {
    color: #FFFFFF !important;
}

.btn-primary.bg-transparent {
    background: transparent !important;
    border: 2px solid var(--secondary-green);
    color: var(--secondary-green) !important;
    box-shadow: none;
}

.btn-primary.bg-transparent:hover {
    background: var(--secondary-green) !important;
    color: #000000 !important;
}

/* --- FORMULARIOS --- */
.form-input {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 16px;
    border-radius: 10px;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-green);
    background: var(--input-bg);
}

.form-input option {
    background-color: var(--primary-blue);
    color: white;
}

[data-theme="light"] .form-input option {
    background-color: #FFFFFF;
    color: #0A3054;
}

/* --- FOOTER --- */
.footer {
    background: var(--footer-bg);
    border-top: 1px solid rgba(29, 209, 161, 0.1);
    padding: 4rem 0;
    text-align: center;
    transition: background 0.3s ease;
}

/* FIX: LOGO EN FOOTER (Siempre Blanco) */
.footer .logo-text {
    background: linear-gradient(90deg, #FFFFFF, var(--secondary-green)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.footer p, .footer div, .footer .text-gray-400, .footer a {
    color: var(--footer-text) !important;
    opacity: 1 !important;
}

/* --- ANIMACIONES --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-in { opacity: 1; transform: translateY(0); }

/* Fix para partículas */
#particle-container canvas, #particle-container {
    background: transparent !important;
    background-color: transparent !important;
}

@media (max-width: 768px) {
    .service-card { padding: 1.5rem; }
}