:root {
    --primary: #006994;
    --secondary: #00A5CF;
    --accent: #8dc900;
    --dark: #0A2342;
    --light: #F7F9FC;
    --text: #333333;
    --gold: #FFD700;
    --deep-blue: #002366;
    --glow: 0 0 30px rgba(0, 201, 177, 0.7);
    --text-glow: 0 0 10px rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Playfair Display', serif;
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    background: var(--dark);
    touch-action: manipulation;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(2deg); }
    75% { transform: translateY(10px) rotate(-2deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes ripple {
    0% { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

@keyframes particle-float {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.video-section {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.left-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.right-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    position: relative;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) contrast(1.2) saturate(1.3) hue-rotate(5deg);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 33, 102, 0.6) 0%, 
        rgba(0, 232, 248, 0.3) 100%,
        rgba(0, 201, 177, 0.2) 100%);
    z-index: 2;
    pointer-events: none;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(0, 201, 177, 0.7);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
    will-change: transform, opacity;
}

.logo-interactive {
    position: absolute;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 10;
    will-change: transform;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.left-logo {
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.logo-main {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 10;
    position: relative;
    filter: drop-shadow(0 0 25px rgba(0, 201, 177, 0.6));
    animation: float 8s ease-in-out infinite;
}

.logo-interactive:hover .logo-main {
    transform: scale(1.1);
    filter: drop-shadow(0 0 40px rgba(0, 201, 177, 0.9));
    animation: float 4s ease-in-out infinite, pulse 3s ease-in-out infinite;
}

.ripple-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(0, 201, 177, 0.3) 0%, 
        transparent 70%);
    transform: scale(0.8);
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

.logo-interactive:hover .ripple-effect {
    animation: ripple 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.sound-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(0, 201, 177, 0.3);
    transform: scale(0.5);
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

.logo-interactive:hover .sound-wave {
    animation: sound-wave 2.5s ease-out infinite;
}

.radial-menu {
    position: absolute;
    width: 180%;
    height: 180%;
    top: 60;
    left: 56;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    place-items: center;
    pointer-events: none;
    z-index: 15;
}

.menu-item {
    width: 60px;
    height: 60px;
    border-radius:100%;
    background: linear-gradient(145deg, var(--light) 0%, #e0e0e0 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25),
                inset 0 -8px 25px rgba(255, 255, 255, 0.5);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
    border: 3px solid white;
    z-index: 15;
    will-change: transform, opacity;
}

.menu-active .menu-item {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: -1;
}

.menu-item:hover {
    background: linear-gradient(145deg, 
        var(--primary) 0%, 
        var(--deep-blue) 100%);
    color: white;
    transform: scale(1) !important;
    box-shadow: 0 0 40px rgba(0, 201, 177, 0.8);
}

.menu-item:hover::before {
    opacity: 1;
    animation: pulse 1.8s infinite;
}

.menu-item::after {
    content: attr(data-title);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #adaff5, #4fc3f7);
    padding: 6px 10px;
    border-radius:9px;
    font-size: 1rem;
    font-weight: var(--text-glow);
    color: white;
    white-space: nowrap;
    opacity: 1 !important;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: none;
}

.title-container, .left-title-container {
    position: absolute;
    width: 100%;
    text-align: center;
    z-index: 20;
    color: white;
    transition: all 0.5s ease;
    will-change: transform, opacity;
}

.title-container {
    top: 40px;
    color: #fff;
    font-weight: 900;
    font-size: 1.35rem;
    text-align: center;
}

.left-title-container {
    top: 40px;
}

.title-container h1, .left-title-container h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 103px;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
}

.title-container p, .left-title-container p {
    color: var(--accent);
    font-size: 1.1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-weight: 400;
}

.title-container p {
    color: #fff;
    font-weight: 900;
    font-size: 1.35em;
    margin: 0;
    padding: 0;
    text-align: center;
}

/* Oculta el texto en desktop cuando el menú está activo */
.logo-interactive.menu-active ~ .title-container {
    opacity: 0;
    pointer-events: none;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    transform: translateX(150%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1000;
    backdrop-filter: blur(12px);
    border-left: 4px solid var(--accent);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.notification.show {
    transform: translateX(0);
}

.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 201, 177, 0.7);
    pointer-events: none;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    z-index: 9999;
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
    will-change: transform;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 201, 177, 0.5);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
    will-change: transform;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 1s ease;
}

.loader-logo {
    width: 150px;
    height: auto;
    max-height: 150px;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(0, 201, 177, 0.5));
}

.loader-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.loader-progress {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, 
        var(--primary), 
        var(--accent));
    transition: width 0.3s ease;
}

.night-mode-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.night-mode {
    --primary: #00C9B1;
    --secondary: #008B8B;
    --accent: #FFD700;
    --dark: #001F3F;
    --light: #0A2342;
    --text: #F7F9FC;
}

.close-menu { 
    display: none !important; 
}

.dynamic-light {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, 
        rgba(80, 107, 194, 0.4) 0%, 
        transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    transition: all 0.5s ease;
    z-index: -1;
    will-change: left, top;
}

.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
    will-change: transform, opacity;
}

/* Estilos para el botón de noticias */
.header-top {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 100;
}

.news-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.7rem;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    border: 2.5px solid #006994;
    border-radius: 50px;
    color: #222 !important;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 4px 24px rgba(0, 105, 148, 0.13);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    letter-spacing: 0.01em;
}

.news-btn:hover {
    background: linear-gradient(135deg, #006994 0%, #00A5CF 100%);
    color: #fff !important;
    border-color: #00A5CF;
    box-shadow: 0 0 40px rgba(0, 201, 177, 0.18);
    transform: translateY(-2px) scale(1.04);
}

.news-btn:active {
    transform: translateY(0) scale(0.98);
}

.news-btn i {
    font-size: 1.3rem;
}

/* Logo AquaExpert más grande en web y móvil */
#logoInteractive {
    width: 520px !important;
    height: 520px !important;
    max-width: 95vw !important;
    max-height: 95vw !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
#logoInteractive .logo-main {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* ======================================================= */
/* INICIO DE LA SECCIÓN RESPONSIVE CORREGIDA Y LIMPIADA */
/* ======================================================= */

@media (max-width: 1024px) {
    .logo-interactive {
        width: 450px;
        height: 450px;
    }
    
    .menu-item {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 900px) {
    .main-container {
        display: flex;
        flex-direction: column;
        width: 100vw;
        min-width: 100vw;
        max-width: 100vw;
        margin: 0;
        padding: 0;
    }
    .mobile-menu .menu-item::before {
        display: none !important;
        content: none !important;
        animation: none !important;
    }
    /* CORRECCIÓN: Video ocupa 100% de altura en móvil */
    .video-section {
        width: 100vw;
        min-width: 100vw;
        max-width: 100vw;
        height: 100vh; 
        min-height: 100vh;
        max-height: 100vh;
        margin: 0;
        padding: 0;
        display: block;
    }
    .video-container {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 100%;
        min-height: 100%;
        max-height: 100%;
        margin: 0;
        padding: 0;
    }
    .video-container video {
        width: 100%;
        min-width: 100%;
        max-width: none;
        height: 100%;
        min-height: 100%;
        max-height: none;
        object-fit: cover;
        object-position: center;
        margin: 0;
        padding: 0;
    }
    
    .logo-interactive {
        margin: 5vw auto 0 auto !important;
        /* Ajustes de tamaño del logo */
        width: clamp(180px, 45vw, 260px) !important;
        height: clamp(180px, 45vw, 260px) !important;
        min-width: 180px !important;
        min-height: 180px !important;
        max-width: 260px !important;
        max-height: 260px !important;
        
        /* CORRECCIÓN: Posicionamiento del logo */
        position: absolute !important; /* Aseguramos que sea absoluto */
        top: 20% !important; /* Lo centramos verticalmente (puedes ajustar este valor) */
        left: 50% !important;
        transform: translate(-50%, -50%) !important; /* Centrado perfecto */

        display: flex !important;
        z-index: 10 !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Estas reglas ya no son necesarias */

    
    /* El logo de 260px se maneja con clamp() ahora */
    #logoInteractive {
        width: clamp(80px, 22vw, 140px) !important;
        height: clamp(80px, 22vw, 140px) !important;
    }

    .title-container h1, .left-title-container h1 {
        font-size: 2.2rem;
    }
    
    .title-container p, .left-title-container p {
        font-size: 1.1rem;
    }
    
    .night-mode-toggle {
        width: 45px;
        height: 45px;
    }
    
    .video-section.left-section {
        border-top: none;
        margin-top: 0;
    }
    .header-top {
        top: 1rem;
        left: 1rem;
    }
    .news-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    .news-btn i {
        font-size: 1rem;
    }

    /* --- LÓGICA DE OCULTAR TEXTO (MÓVIL) --- */
    .title-container {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 10% !important;
        top: auto !important;
        margin: 0 auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
        text-align: center !important;
        z-index: 100 !important;
        background: none !important;
        color: #fff !important;
        font-weight: 900 !important;
        font-size: 1.35rem !important;
        box-shadow: none !important;
        opacity: 1;
        pointer-events: auto !important;
        padding: 12px 0 8px 0 !important;
        transition: opacity 0.3s ease;
    }
    .title-container p {
        font-size: 1.35em !important;
        font-weight: 900 !important;
        color: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        text-shadow: 0 0 8px rgba(0,0,0,0.7); /* Sombra para legibilidad */
    }
    .logo-interactive.menu-active ~ .title-container {
        display: block !important; 
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Oculta menú radial, muestra menú móvil */
    .logo-interactive .radial-menu,
    .radial-menu {
        display: none !important;
    }
    .logo-interactive.menu-active .mobile-menu {
        display: grid !important;
    }

    /* --- ESTILOS DEL MENÚ MÓVIL (EL PROBLEMA "CHUECO") --- */
    .mobile-menu {
        display: grid !important;
        width: 96vw;
        max-width: 420px;
        margin: 0 auto !important; /* CORRECCIÓN: quitamos margen superior */
        padding: 0 0 5vw 0;
        grid-template-columns: repeat(2, 1fr) !important;
        
        /* === LA CORRECCIÓN === */
        gap: 2rem 1rem !important; /* 2rem vertical, 1rem horizontal */
        
        justify-items: center;
        align-items: start;
        place-content: center;
        border-radius: 18px;
        
        /* CORRECCIÓN: Posiciona el menú debajo del logo */
        position: absolute;
        top: 55%; /* Ajusta esto para subir o bajar el menú */
        left: 50%;
        transform: translateX(-50%);
    }
    
    .mobile-menu .menu-item {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        background: none;
        border: none;
        box-shadow: none;
        width: 90px; /* Tamaño fijo */
        height: 90px; /* Tamaño fijo */
        min-width: 90px;
        max-width: 100px;
        margin: 0 auto 10px auto; /* Reducido margen inferior */
        padding: 0;
        cursor: pointer;
        text-decoration: none !important;
        transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
    }
    .mobile-menu .menu-item i {
        width: 70px;
        height: 70px;
        border-radius: 50%;
        background: #fff;
        border: 1.5px solid #e0e0e0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.2rem;
        color: var(--primary);
        margin-bottom: 10px;
        margin-top: 0;
        box-shadow: none;
        padding: 0;
        transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
    }
    .mobile-menu .menu-item span {
        font-size: 0.55em;
        max-width: 90px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: 0;
        font-weight: 900;
        color: #fff;
    }
    .mobile-menu .menu-item::after {
        display: none !important;
    }
    .mobile-menu .menu-item:hover, .mobile-menu .menu-item:active {
        background: none;
        border-color: transparent;
        box-shadow: none;
        transform: scale(1.08);
    }
    .mobile-menu .menu-item:hover i, .mobile-menu .menu-item:active i {
        background: linear-gradient(145deg, var(--primary) 0%, var(--deep-blue) 100%);
        color: #fff !important;
        box-shadow: 0 0 24px rgba(0, 201, 177, 0.18);
        border-color: var(--accent);
    }
 
    .video-container {
        width: 100vw !important;
        height: 100vh !important;
        min-width: 100vw !important;
        min-height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
    }
}

/* Esta regla agrupa las de 768px que ahora están en 900px */
@media (max-width: 768px) {
    .main-container {
        grid-template-rows: 100vh; /* Ajustado a 100vh */
    }
    .video-section {
        height: 100vh; /* Ajustado a 100vh */
    }
    /* El resto de las reglas de 768px ya no son necesarias aquí */
}

@media (min-width: 901px) {
    .mobile-menu {
        display: none !important;
    }
    .radial-menu {
        display: grid !important;
    }
}

@media (max-width: 480px) {
    .main-container {
        grid-template-rows: 100vh; /* Ajustado a 100vh */
    }
    
    
    .title-container h1, .left-title-container h1 {
        font-size: 1.8rem;
    }
    
    .loader-logo {
        width: 120px;
    }
}

@media (max-width: 360px) {

    
    .title-container h1, .left-title-container h1 {
        font-size: 1.6rem;
    }
}

@media (pointer: coarse) {
    .cursor, .cursor-follower {
        display: none;
    }
    
    .menu-item {
        width: 55px;
        height: 55px;
    }
}

@media (prefers-reduced-motion) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .logo-main {
        animation: none !important;
    }
}

.social-links-home {
    position: fixed; /* Los fija en la pantalla */
    bottom: 20px; /* A 20px de abajo */
    left: 50%; /* Centrado horizontal */
    transform: translateX(-50%);
    z-index: 100; /* Encima de todo (excepto el menú si se abre) */
    display: flex;
    gap: 1.5rem; /* Espacio entre botones */
}

.social-links-home .social-icon {
    color: white !important;
    font-size: 2rem !important;
    background: rgba(0, 201, 177, 0.13) !important; /* Mismo fondo que tu footer */
    border-radius: 50%;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none !important;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-links-home .social-icon:hover {
    color: var(--accent) !important;
    background: rgba(0, 201, 177, 0.22) !important;
    transform: translateY(-3px) scale(1.15);
}

/* Ajuste para que no se vea sobre el menú en móvil */
@media (max-width: 900px) {
    .logo-interactive.menu-active ~ .social-links-home {
        opacity: 0;
        pointer-events: none;
    }
}
/* ========================================= */
/* === BLOQUE MAESTRO 2.0 (FLUIDO & RESPONSIVE) === */
/* ========================================= */

/* 1. Configuración de Texto (Se adapta automáticamente) */
body, p, span, a, li, input, textarea, label {
    font-family: 'Roboto', sans-serif; 
    font-weight: 400;
    line-height: 1.6;
    color: var(--light);
}

/* 2. Títulos Inteligentes (Usa clamp para escalar suavemente) */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    /* Evita que palabras largas rompan el celular */
    word-wrap: break-word; 
    hyphens: auto;
}

/* TAMAÑOS: (Mínimo móvil, Ideal variable, Máximo escritorio) */
h1 { 
    font-size: clamp(2.2rem, 5vw + 1rem, 3.5rem) !important; 
}

h2 { 
    font-size: clamp(1.8rem, 4vw + 1rem, 2.5rem) !important; 
    color: var(--light);
}

h3 { 
    font-size: clamp(1.3rem, 3vw + 1rem, 1.8rem) !important; 
}

/* 3. SALVAVIDAS MÓVIL (Evita el desastre lateral) */
html, body {
    max-width: 100vw;
    overflow-x: hidden; /* Bloquea el scroll horizontal indeseado */
}

img, video, iframe, .map-container {
    max-width: 100% !important; /* Nada puede ser más ancho que la pantalla */
    height: auto !important;
}

/* 4. Ajustes Específicos para Celulares ( < 768px ) */
@media (max-width: 768px) {
    /* Reduce el relleno lateral excesivo */
    .contact-header, .about-header, .exp-header, .news-header, .lab-header {
        padding: 3rem 1rem !important; 
    }
    
    /* Asegura que los contenedores no se peguen a los bordes */
    .main-container, .contact-container, .about-container, .section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
    }

    /* Fuerza que las cajas se apilen verticalmente */
    .contact-container, .about-card, .news-container {
        flex-direction: column !important;
        display: flex !important;
    }
}

/* ========================================= */
/* === FIN DEL BLOQUE MAESTRO 2.0 === */
/* ========================================= */
/* ================================================= */
/* === CORRECCIÓN TEXTOS CORTADOS EN MENÚ MÓVIL === */
/* ================================================= */

@media (max-width: 900px) {
    
    /* 1. Permitir que el contenedor crezca hacia abajo */
    .mobile-menu .menu-item {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        
        /* CAMBIO: De height:90px a auto para que quepan dos líneas */
        height: auto !important; 
        min-height: 90px; 
        
        width: 90px;
        margin: 0 auto 20px auto !important; /* Un poco más de espacio abajo */
        padding: 0;
        text-decoration: none !important;
    }

    /* 2. Permitir que el texto se vea completo */
    .mobile-menu .menu-item span {
        font-size: 0.65em !important; /* Un pelín más grande para leer mejor */
        color: #fff;
        font-weight: 50;
        letter-spacing: 0;
        text-align: center;
        
        /* CAMBIO CLAVE: Permitir que el texto baje de línea */
        white-space: normal !important; 
        overflow: visible !important; 
        text-overflow: clip !important; 
        
        /* CAMBIO: Permitir que el texto sea un poco más ancho que el ícono */
        max-width: 110px !important; 
        width: auto !important;
        line-height: 1.2 !important;
    }
}
/* ================================================= */
/* === CORRECCIÓN BOTONES REDES SOCIALES (FINAL) === */
/* ================================================= */

.social-links-home {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 1.5rem;
}

/* 1. ESTADO BASE (Normal) */
.social-links-home .social-icon {
    color: white !important;
    font-size: 2rem !important;
    background: rgba(0, 201, 177, 0.13) !important;
    border-radius: 50%;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none !important;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Esto quita el parpadeo azul estándar en Android */
    -webkit-tap-highlight-color: transparent; 
}

/* 2. ESTADO HOVER (SOLO PARA PC/MOUSE) */
/* El navegador ignorará esto en tu celular */
@media (hover: hover) and (pointer: fine) {
    .social-links-home .social-icon:hover {
        color: var(--accent) !important;
        background: rgba(0, 201, 177, 0.22) !important;
        transform: translateY(-3px) scale(1.15);
    }
}

/* 3. ESTADO ACTIVE (CUANDO TIENES EL DEDO PUESTO) */
/* Se ilumina solo mientras tocas, se apaga al soltar */
.social-links-home .social-icon:active {
    color: var(--accent) !important;
    background: rgba(0, 201, 177, 0.22) !important;
    transform: scale(0.95); /* Efecto de pulsación */
    transition: none; /* Respuesta instantánea */
}

/* 4. ESTADO FOCUS (LA SOLUCIÓN AL PROBLEMA) */
/* Fuerza al botón a volver a ser blanco aunque se quede seleccionado */
.social-links-home .social-icon:focus:not(:active) {
    color: white !important;
    background: rgba(0, 201, 177, 0.13) !important;
    transform: none;
    outline: none; /* Quita bordes raros */
}

/* Ajuste para que no se vea sobre el menú en móvil */
@media (max-width: 900px) {
    .logo-interactive.menu-active ~ .social-links-home {
        opacity: 0;
        pointer-events: none;
    }
}