/*
 Theme Name:   Triskelwellness (Independiente)
 Theme URI:    https://triskelwellness.com/
 Description:  Estilos Cabecera y Pie de Página (Nexus Navigator Edition)
 Version:      24.2.0 (FIX: Botón Cortado en Móvil)
*/

:root {
    --header-glass-bg: rgba(255, 255, 255, 0.98);
    --header-glass-blur: blur(16px);
    --header-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    --orb-size: 50px;
    --orb-color-primary: #2271b1;
    --orb-color-secondary: #1a5c8e;
    --text-dark: #000000;
    
    --nexus-bg: #ffffff;
    --nexus-accent: #2271b1;
    --nexus-gray: #f8fafc;
    --nexus-border: #e2e8f0;
}

.container {
    max-width: 1200px;
    margin-left: auto; margin-right: auto;
    padding-left: 20px; padding-right: 20px;
}

/* ==========================================================================
   1. HEADER PRINCIPAL (Morphing Glass + Safe Area Total)
   ========================================================================== */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 10000;
    background: var(--header-glass-bg);
    backdrop-filter: var(--header-glass-blur); -webkit-backdrop-filter: var(--header-glass-blur);
    
    /* [GEMINI 3.0] Padding inteligente TOTAL (Arriba y Lados) 
       Esto evita que el header se pegue a los bordes curvos o al notch lateral */
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: 20px;
    padding-right: env(safe-area-inset-right); /* Protección lateral derecha */
    padding-left: env(safe-area-inset-left);   /* Protección lateral izquierda */
    
    box-shadow: none; 
    border-bottom: 4px solid var(--orb-color-primary);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Asegura que el padding no sume al ancho y desborde */
    box-sizing: border-box;
}

.site-header.is-scrolled {
    /* Al hacer scroll, reducimos padding vertical pero MANTENEMOS el safe area */
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
    
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
}

.header-container {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; height: 100%; position: relative;
}

/* ==========================================================================
   2. BRANDING
   ========================================================================== */
.site-branding {
    display: flex; flex-direction: column; justify-content: center;
    flex-grow: 1; min-width: 0; position: relative; z-index: 2; padding-right: 10px;
}
.branding-wrapper { display: flex; align-items: center; gap: 15px; }
.custom-logo-link img {
    max-height: 85px; width: auto; display: block;
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}
.site-header.is-scrolled .custom-logo-link img { max-height: 50px; }
.title-container { display: flex; flex-direction: column; justify-content: center; }
.site-title {
    margin: 0; line-height: 1.1; font-weight: 800; font-family: 'Lora', serif;
    color: #000000; white-space: normal; font-size: 1.8rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: font-size 0.4s ease, text-shadow 0.3s ease;
}
.site-title a { text-decoration: none; color: inherit; display: inline-block; }
.site-header.is-scrolled .site-title { font-size: 1.4rem; text-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.brand-main, .brand-sub { color: inherit; }

/* ==========================================================================
   3. NAVEGACIÓN Y HERRAMIENTAS
   ========================================================================== */
.main-navigation { display: none !important; }
.header-tools { display: flex; align-items: center; gap: 15px; flex-shrink: 0; }
.header-socials { display: none; }
@media (min-width: 992px) {
    .header-socials { display: flex; gap: 12px; }
    .header-social-link { color: #94a3b8; font-size: 1.4rem; transition: all 0.3s; }
    .site-header.is-scrolled .header-social-link { font-size: 1.2rem; }
    .header-social-link:hover { color: var(--orb-color-primary); transform: translateY(-3px); }
}
.menu-trigger-wrapper { position: relative; display: flex; align-items: center; justify-content: center; z-index: 20000; }
.triskel-orb-menu {
    appearance: none; border: none; outline: none; cursor: pointer;
    width: 55px; height: 55px; border-radius: 50%; padding: 0;
    background: radial-gradient(circle at 35% 35%, #64b5f6, var(--orb-color-primary));
    box-shadow: 0 8px 20px rgba(34, 113, 177, 0.3), 0 4px 10px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.orb-content { font-size: 28px; color: #fff; z-index: 3; transition: transform 0.3s; }
.site-header.is-scrolled .triskel-orb-menu { width: 45px; height: 45px; box-shadow: 0 4px 10px rgba(34, 113, 177, 0.2); }
.site-header.is-scrolled .orb-content { font-size: 24px; }
.triskel-orb-menu:hover { transform: scale(1.1) rotate(5deg); }
.triskel-orb-menu.is-active { background: #1d2327; }

/* ==========================================================================
   4. NEXUS NAVIGATOR (Sistema Móvil Mejorado)
   ========================================================================== */
.mobile-menu-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px);
    z-index: 9998; opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.mobile-menu-backdrop.is-active { opacity: 1; visibility: visible; }

.mobile-nav-panel {
    position: fixed; top: 0; left: 0; width: 90%; max-width: 380px; height: 100%;
    background: var(--nexus-bg); z-index: 9999;
    transform: translateX(-105%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 50px rgba(0,0,0,0.15);
    display: flex; flex-direction: column;
    
    /* Respetar Notch en Menú Abierto */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav-panel.is-open { transform: translateX(0); }

/* Cabecera del Panel */
.mobile-nav-header {
    padding: 30px 25px; border-bottom: 1px solid var(--nexus-border);
    display: flex; justify-content: space-between; align-items: center;
    background: var(--nexus-gray);
}
.mobile-brand { display: flex; flex-direction: column; line-height: 1; }
.brand-ver { font-size: 0.65rem; color: var(--nexus-accent); text-transform: uppercase; font-weight: 800; margin-bottom: 4px; letter-spacing: 1px; }
.brand-text { font-family: 'Lora', serif; font-size: 1.4rem; font-weight: 700; color: #1e293b; }
.mobile-nav-close {
    background: #fff; border: 1px solid var(--nexus-border); width: 40px; height: 40px;
    border-radius: 50%; color: #64748b; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
    transition: all 0.3s;
}
.mobile-nav-close:hover { transform: rotate(90deg); color: #ef4444; border-color: #ef4444; }

/* Área de Scroll */
.mobile-nav-scroll-area {
    padding: 25px; overflow-y: auto; flex: 1;
    background: linear-gradient(180deg, #fff 0%, #fcfcfc 100%);
    /* Scrollbar oculto */
    scrollbar-width: none;
}
.mobile-nav-scroll-area::-webkit-scrollbar { display: none; }

/* TARJETA GLOBAL GATEWAY (Idioma) */
.global-gateway {
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 16px;
    padding: 20px; margin-bottom: 30px; position: relative; overflow: hidden;
}
.global-gateway::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: var(--nexus-accent);
}
.gateway-header { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.gateway-icon { font-size: 1.8rem; color: var(--nexus-accent); }
.gateway-text { display: flex; flex-direction: column; }
.gateway-title { font-weight: 800; font-size: 0.9rem; text-transform: uppercase; color: #0f172a; }
.gateway-subtitle { font-size: 0.8rem; color: #475569; }
.gateway-selector-wrapper { position: relative; z-index: 2; }

/* Estilización GTranslate dentro del panel */
.gateway-selector-wrapper select {
    width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #cbd5e1;
    background: #fff; font-size: 0.9rem; color: #334155;
}

/* NAVEGACIÓN DE CÁPSULAS */
.nexus-menu-container { margin-bottom: 30px; }
.section-label {
    display: block; font-size: 0.75rem; text-transform: uppercase; color: #94a3b8;
    margin-bottom: 15px; font-weight: 700; letter-spacing: 1px;
}
.triskel-mobile-list { list-style: none; padding: 0; margin: 0; }
.triskel-mobile-list li {
    margin-bottom: 10px; opacity: 0; /* Para animación */
    animation: slideInStagger 0.5s forwards;
}
/* Retrasos escalonados */
.triskel-mobile-list li:nth-child(1) { animation-delay: 0.1s; }
.triskel-mobile-list li:nth-child(2) { animation-delay: 0.15s; }
.triskel-mobile-list li:nth-child(3) { animation-delay: 0.2s; }
.triskel-mobile-list li:nth-child(4) { animation-delay: 0.25s; }
.triskel-mobile-list li:nth-child(5) { animation-delay: 0.3s; }
.triskel-mobile-list li:nth-child(6) { animation-delay: 0.35s; }

.triskel-mobile-list li a {
    display: block; padding: 15px 20px; background: #fff;
    border: 1px solid var(--nexus-border); border-radius: 12px;
    color: #334155; font-weight: 600; font-size: 1rem; text-decoration: none;
    transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.triskel-mobile-list li a:hover {
    transform: translateX(5px); border-color: var(--nexus-accent);
    color: var(--nexus-accent); box-shadow: 0 5px 15px rgba(34, 113, 177, 0.1);
}

@keyframes slideInStagger {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* PORTAL BIOMÉTRICO */
.portal-btn-mobile {
    display: flex; align-items: center; background: #1e293b; color: #fff;
    padding: 15px; border-radius: 16px; text-decoration: none;
    transition: transform 0.2s; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.portal-btn-mobile:hover { transform: scale(1.02); background: #0f172a; color: #fff; }
.portal-icon-box {
    width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-right: 15px;
}
.portal-text-box { flex: 1; display: flex; flex-direction: column; }
.portal-main-text { font-weight: 700; font-size: 1rem; }
.portal-sub-text { font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; }
.portal-arrow { font-size: 1.2rem; color: #64748b; }

/* FOOTER DEL MENÚ */
.mobile-nav-footer { margin-top: 30px; text-align: center; color: #cbd5e1; font-size: 0.8rem; padding-top: 20px; border-top: 1px solid #f1f5f9; }

/* ==========================================================================
   5. RESPONSIVIDAD (Ajustes Tácticos)
   ========================================================================== */
@media (max-width: 768px) {
    .site-title { font-size: 1.4rem; } 
    .site-header.is-scrolled .site-title { font-size: 1.2rem; }
}

@media (max-width: 600px) {
    /* [FIX CRÍTICO] Empujar el contenido hacia adentro para que el botón no se corte */
    .header-container {
        padding-right: 25px; /* Aumentamos el padding derecho en móviles */
    }
    
    .branding-wrapper { gap: 10px; }
    .site-title { font-size: 1.1rem; }
    .custom-logo-link img { max-height: 50px; } 
    .site-header.is-scrolled .custom-logo-link img { max-height: 40px; } 
    
    /* Ajustar posición del wrapper del botón */
    .menu-trigger-wrapper {
        margin-right: 5px; /* Separación extra segura del borde */
    }
}

/* ==========================================================================
   6. FOOTER (Mantenido)
   ========================================================================== */
.site-footer { 
    background: #1d2327; color: #a0a5ab; font-size: 0.95rem; margin-top: 80px; 
    border-top: 4px solid var(--orb-color-primary);
    /* Padding inferior para safe area (Barra inicio) */
    padding-bottom: env(safe-area-inset-bottom); 
}
.footer-main { padding: 60px 0; }
.footer-main__container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; }
.footer-widget h4 { color: #fff; margin-bottom: 20px; font-size: 1.1rem; }
.footer-menu a { color: #a0a5ab; text-decoration: none; transition: color 0.3s; }
.footer-menu a:hover { color: #fff; }
.footer-bottom { background-color: #101519; padding: 20px 0; text-align: center; font-size: 0.85rem; }