/* Estilos Base Divinos - Consistentes con la estructura existente */
:root {
    --primary: #006994;
    --secondary: #00A5CF;
    --accent: #00C9B1;
    --dark: #0A2342;
    --light: #F7F9FC;
    --text: #333333;
    --gold: #FFD700;
    --deep-blue: #002366;
    --glow: 0 0 30px rgba(0, 201, 177, 0.7);
}

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

body {
    font-family: 'Playfair Display', serif;
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Loader Oceánico */
.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: 9999;
    transition: opacity 1s ease;
}

.bubble-animation {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 2rem;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 201, 177, 0.6);
    animation: float-up 4s infinite ease-in-out;
}

.bubble:nth-child(1) {
    width: 30px;
    height: 30px;
    left: 20px;
    top: 50px;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 50px;
    height: 50px;
    left: 60px;
    top: 30px;
    animation-delay: 0.5s;
}

.bubble:nth-child(3) {
    width: 20px;
    height: 20px;
    left: 100px;
    top: 70px;
    animation-delay: 1s;
}

.loader-text {
    color: var(--light);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: pulse 2s infinite ease-in-out;
}

/* Header */
.about-header {
    text-align: center;
    padding: 4rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}

.about-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.about-header h1 span {
    color: var(--accent);
}

.about-header p {
    font-size: 1.2rem;
    color: var(--light);
    opacity: 0.8;
    position: relative;
    z-index: 2;
}

.water-effect-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0, 33, 102, 0) 0%,
        transparent 100%);
    z-index: 1;
}

/* Home Button */
.home-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--light);
    border: 2px solid var(--accent);
    border-radius: 50px;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.home-btn:hover {
    background: var(--accent);
    color: var(--dark);
    box-shadow: var(--glow);
}

.home-btn i {
    font-size: 1.2rem;
}

.home-btn .liquid-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    z-index: -1;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.home-btn:hover .liquid-effect {
    transform: translateY(0);
}

.home-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--accent);
    animation: wave 3s linear infinite;
    z-index: -1;
}

/* About Container */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 3;
}

/* About Card */
.about-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 201, 177, 0.3);
}

.card-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--accent);
    animation: wave 3s linear infinite;
}

.about-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--light);
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-card p {
    font-size: 1.1rem;
    color: var(--light);
    margin-bottom: 2rem;
}

.highlight-text {
    color: var(--accent);
    font-weight: 600;
    text-align: center;
    font-style: italic;
    margin: 2rem 0 0;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    position: relative;
    margin: 1.5rem 0;
}

.icon-circle {
    width: 50px;
    height: 50px;
    background: rgba(0, 201, 177, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.info-item:hover .icon-circle {
    background: var(--accent);
    color: var(--dark);
    transform: scale(1.1);
}

.info-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.info-content p {
    color: var(--light);
    margin-bottom: 0;
}

.ripple-effect {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 50%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.info-item:hover .ripple-effect {
    transform: scaleX(1);
}

/* Particles */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: drift 20s infinite linear;
}

/* === FOOTER UNIFICADO Y RESPONSIVO COMO EN NOTICIAS === */
.news-footer {
    background: var(--dark);
    color: white;
    padding: 2rem 0 1rem 0;
    position: relative;
    min-height: 120px;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.wave-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 120px;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 0 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.social-icon {
    color: white;
    font-size: 1.7rem;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.08);
    border-radius: 50%;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.footer-content p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.85;
    width: 100%;
    text-align: center;
}

@media (max-width: 600px) {
    .news-footer {
        padding: 1.2rem 0 0.5rem 0;
    }
    .footer-content {
        font-size: 0.95rem;
        gap: 0.7rem;
        padding: 0 0.5rem;
    }
    .social-links {
        gap: 1rem;
    }
    .social-icon {
        font-size: 1.3rem;
        padding: 0.35rem;
    }
}

/* Animations */
@keyframes float-up {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 0.8; }
    100% { transform: translateY(-40px) scale(1); opacity: 0; }
}

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

@keyframes wave {
    0% { transform: scaleX(0); opacity: 1; }
    100% { transform: scaleX(1); opacity: 0; }
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        transform: translate(-100vw, 100vh);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .about-header h1 {
        font-size: 2.5rem;
    }
    
    .about-container {
        padding: 0 1rem;
    }
    
    .about-card {
        padding: 2rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .icon-circle {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .home-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

.news-footer .social-links a {
    color: white !important;
    text-decoration: none !important;
    border: none;
    box-shadow: none;
}

.news-footer .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;
}

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

.news-footer .footer-content p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.85;
    width: 100%;
    text-align: center;
}
/* ========================================= */
/* === 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 === */
/* ========================================= */