/* ====================================================================
   TLSHive - GLOBAL CORE STYLES (Variables, Resets & Navigation)
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-deep: #050810;
    --bg-card: rgba(15, 21, 35, 0.45); 
    --border-subtle: rgba(255, 255, 255, 0.08); 
    --accent-tech: #00E5FF;
    --primary: #38bdf8;
    --secondary: #F59E0B;
    --accent-moon: #E2E8F0;
    --accent-sun: #F59E0B;
    --accent-error: #ef4444;
    --accent-success: #10b981;
    --text-main: #F9FAFB;
    --text-muted: #9CA3AF;
    --whatsapp: #25d366;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #facc15;
    --purple: #c084fc;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-tech: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { 
    overflow-x: hidden; 
    width: 100%; 
    margin: 0; 
    padding: 0; 
    scroll-behavior: smooth; 
}

/* Animaciones Reutilizables */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInSimple { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(5px); } 60% { transform: translateY(3px); } }

/* Componentes Útiles Comunes */
.glass-card { 
    background: var(--bg-card); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border: 1px solid var(--border-subtle); 
}

/* =========================================
   NAVEGACIÓN UNIFICADA (Header & Footer)
   ========================================= */
.unified-header { 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    background: rgba(5, 8, 16, 0.85); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    border-bottom: 1px solid var(--border-subtle); 
    display: flex; 
    justify-content: center; 
    width: 100%; 
}

.unified-header .header-container { 
    max-width: 1200px; 
    width: 100%; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 5%; 
}

.unified-header .logo-container { display: flex; align-items: center; gap: 5px; }
.unified-header .logo { font-size: 1.8rem; font-weight: 800; color: var(--accent-tech); text-decoration: none; letter-spacing: -0.5px; z-index: 1001; }
.unified-header .env-title { font-size: 1.4rem; font-weight: 800; color: var(--text-muted); letter-spacing: -0.5px; z-index: 1001; user-select: none; }
.unified-header .header-actions { display: flex; align-items: center; gap: 20px; }
.unified-header .main-nav { display: flex; gap: 25px; align-items: center; }
.unified-header .main-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 600; transition: color 0.3s; }
.unified-header .main-nav a:hover, .unified-header .main-nav a.active-link { color: var(--text-main); }
.unified-header .nav-buttons { display: flex; align-items: center; gap: 15px; }
.unified-header .client-login-nav { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; border: 1px solid var(--border-subtle); padding: 8px 16px; border-radius: 6px; transition: all 0.3s ease; display:flex; align-items:center; gap:8px; }
.unified-header .client-login-nav:hover { border-color: var(--text-muted); color: var(--text-main); background: rgba(255,255,255,0.05); }
.unified-header .mobile-menu-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1001; }
.unified-header .mobile-menu-toggle span { width: 30px; height: 3px; background-color: var(--text-main); border-radius: 3px; transition: all 0.3s ease; }

.back-to-top { 
    position: fixed; 
    bottom: 25px; 
    right: 25px; 
    background: var(--accent-sun); 
    color: #000; 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    text-decoration: none; 
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3); 
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.3s ease; 
    z-index: 9999; 
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5); background: #fff; }

.unified-footer { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    background: rgba(5, 8, 16, 0.95); 
    backdrop-filter: blur(10px); 
    padding: 10px 5%; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    color: rgba(255,255,255,0.5); 
    font-size: 0.75rem; 
    z-index: 900; 
    text-align: center; 
    transform: translateY(100%); 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}
.unified-footer.visible { transform: translateY(0); }
.unified-footer .footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.unified-footer .intranet-link { color: rgba(255,255,255,0.4); text-decoration: none; font-family: var(--font-tech); transition: color 0.3s; }
.unified-footer .intranet-link:hover { color: var(--accent-sun); }

/* BORDES POR ENTORNO */
body.env-son .unified-header { border-bottom: 1px solid rgba(245, 158, 11, 0.4); box-shadow: 0 4px 20px rgba(245, 158, 11, 0.08); }
body.env-dad .unified-header { border-bottom: 1px solid rgba(16, 185, 129, 0.4); box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08); }
body.env-prod .unified-header { border-bottom: 1px solid rgba(0, 229, 255, 0.3); box-shadow: 0 4px 20px rgba(0, 229, 255, 0.08); }

@media (max-width: 1024px) {
    .unified-header .mobile-menu-toggle { display: flex; }
    .unified-header .header-actions { position: fixed; top: 0; right: -100%; width: 300px; height: 100vh; background: rgba(5, 8, 16, 0.95); backdrop-filter: blur(20px); border-left: 1px solid var(--border-subtle); flex-direction: column; justify-content: center; align-items: flex-start; padding: 40px; transition: right 0.3s ease; box-shadow: -5px 0 20px rgba(0,0,0,0.5); }
    .unified-header .header-actions.active { right: 0; }
    .unified-header .main-nav { flex-direction: column; align-items: flex-start; gap: 20px; width: 100%; margin-bottom: 30px; }
    .unified-header .nav-buttons { flex-direction: column; width: 100%; align-items: flex-start; }
    .unified-header .client-login-nav { width: 100%; text-align: center; justify-content:center;}
}