@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ========================================= */
/* VARIABLES GLOBALES Y BASE                 */
/* ========================================= */
:root {
    --primary-color: #224c63;
    --background-color: #7ccede;
    --dark-color: #151515;
}

html {
    font-size: 62.5%;
    font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    position: relative; 
}

/* ========================================= */
/* FONDO FIJO MULTIPLATAFORMA */
/* ========================================= */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: linear-gradient(#00000080, #00000080), url('../IMG/BG/bg3.png'); 
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -100; /* Lo manda detrás de todos los demás elementos de tu página */
}

.container {
    max-width: 120rem;
    margin: 0 auto;	
    padding: 0 2rem;
}

/* ========================================= */
/* HEADER Y NAVEGACIÓN                       */
/* ========================================= */
.container-hero {
    background-color: var(--background-color);
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0rem 0;
}

.container-logo {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 0.5rem;
    padding: 0; 
    width: 100%;
}

.container-logo img {
    width: 230px;
    height: 90px;
    object-fit: contain;
    display: block;
    margin: 0 auto; 
}

.container-logo a {
    cursor: pointer;
    display: flex;
    justify-content: center;
}
.container-navbar {
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.menu {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.menu a {
    text-decoration: none;
    font-size: 1.7rem; 
    color: #fff; 
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.menu a::after {
    content: '';
    width: 0; 
    height: 2px; 
    background-color: #fff;
    position: absolute;
    bottom: -5px;   
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.menu a:hover {
    color: var(--background-color);
    transform: translateY(-3px);
}

.menu a:hover::after {
    width: 100%;
    opacity: 1;
}

/* ========================================= */
/* SECCIÓN PRINCIPAL: BLOG                   */
/* ========================================= */
.main-blog {
    padding-bottom: 5rem;
}

.container-blog {
    padding: 5rem 0; 
    background-color: transparent;
}

.blog-header {
    text-align: center;
    margin-bottom: 5rem;
}

.blog-header h1 {
    font-size: 4.2rem;
    color: #fff; 
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6); 
}

.blog-description {
    font-size: 1.8rem;
    color: var(--background-color); 
    max-width: 70rem;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 1px 1px 8px rgba(0,0,0,0.7);
}

/* --- LAYOUT DE 2 COLUMNAS --- */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 500px); 
    gap: 5rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- PANEL IZQUIERDO --- */
.blog-info-panel {
    background-color: #fff;
    padding: 4rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary-color);
}

.blog-info-panel h2 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.blog-info-panel > p {
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.blog-highlights {
    list-style: none;
    margin-bottom: 4rem;
}

.blog-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.blog-highlights i {
    font-size: 2.5rem;
    color: var(--background-color);
    background-color: #f0f9fa;
    padding: 1.5rem;
    border-radius: 50%;
}

.blog-highlights strong {
    display: block;
    font-size: 1.6rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.blog-highlights span {
    font-size: 1.4rem;
    color: #666;
    line-height: 1.4;
}

.btn-fb-direct {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background-color: #1877F2; 
    color: #fff;
    text-decoration: none;
    padding: 1.5rem 3rem;
    border-radius: 0.8rem;
    font-size: 1.6rem;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-fb-direct:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(24, 119, 242, 0.3);
    color: #fff;
}

/* --- ESTILOS DEL FACEBOOK WRAPPER --- */
.facebook-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    background-color: transparent; 
    padding: 0; 
    border: none;
    box-shadow: none;
    min-height: auto; 
}

.facebook-wrapper .fb-page, 
.facebook-wrapper .fb-page span, 
.facebook-wrapper .fb-page iframe {
    width: 100% !important;
    max-width: 500px !important; 
    margin: 0 auto;
    display: block;
    border-radius: 1.5rem; 
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08); /* Le damos tu sombra elegante */
}

/* --- MOTORES DE ANIMACIÓN (OBLIGATORIOS) --- */
@keyframes girar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulso {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* --- LOADER SEGURO PARA FACEBOOK --- */
.custom-loader-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8fbfc;
    border-radius: 1.5rem;
    z-index: 10;
}

.custom-loader-overlay .spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e1e8ed;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: girar 1s linear infinite; /* Aquí entra el motor de giro */
    margin-bottom: 1.5rem;
}

.custom-loader-overlay p {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    animation: pulso 1.5s ease-in-out infinite; /* Aquí entra el parpadeo */
    margin: 0;
}


/* --- DISEÑO DE ERROR DE CARGA FB --- */
.fallback-error {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px dashed #ccc;
    border-radius: 1.5rem;
    padding: 4rem 3rem;
    text-align: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.fallback-error i.fa-triangle-exclamation {
    font-size: 4rem;
    color: #e74c3c; /* Color rojo de alerta */
    margin-bottom: 1.5rem;
}

.fallback-error h3 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.fallback-error p {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.btn-reload {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 0.8rem;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.btn-reload:hover {
    background-color: #1a252f;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ========================================= */
/* SECCIÓN NUEVA: CONSEJOS DE SALUD          */
/* ========================================= */
.health-tips-section {
    margin-top: 5rem;
}

.tips-header {
    text-align: center;
    margin-bottom: 4rem;
}

.tips-header h2 {
    font-size: 3.5rem;
    color: #fff; 
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
}

.tips-header p {
    font-size: 1.8rem;
    color: var(--background-color);
    opacity: 1; 
    text-shadow: 1px 1px 8px rgba(0,0,0,0.7);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.tip-card {
    background-color: #fff;
    padding: 3.5rem 3rem;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-bottom: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-10px);
}

.tip-icon {
    width: 70px;
    height: 70px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2rem auto;
}

.tip-icon i {
    font-size: 2.8rem;
    color: #fff;
}

.tip-card h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.tip-card p {
    font-size: 1.4rem;
    color: #555;
    line-height: 1.6;
}


/* ========================================= */
/* FOOTER                                    */
/* ========================================= */
.footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 7rem 0 3rem 0; 
    margin-top: 6rem;
}

.container-footer {
    display: flex;
    flex-direction: column;
    gap: 5rem; 
    padding: 0 2rem;
}

.menu-footer {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

.information {
    justify-self: center;
}

.my-account {
    justify-self: end;
}

.title-footer {
    font-weight: 600;
    font-size: 1.8rem;
    text-transform: uppercase;
    color: var(--background-color); 
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
}

.contact-info, .information, .my-account {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.information ul, .my-account ul, .contact-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    padding: 0;
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    font-size: 1.4rem;
    font-weight: 300;
    line-height: 1.6;
    color: #ddd;
}

.contact-list i {
    color: var(--background-color);
    font-size: 1.8rem;
    margin-top: 0.2rem;
}

.information ul li a, .my-account ul li a {
    text-decoration: none;
    color: #ddd;
    font-size: 1.5rem;
    font-weight: 300;
    transition: all 0.3s ease;
    display: inline-block;
}

.information ul li a:hover, .my-account ul li a:hover {
    color: #fff;
    transform: translateX(6px); 
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    background-color: rgba(255, 255, 255, 0.08); 
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-btn img {
    width: 2.2rem;
    height: 2.2rem;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.social-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.social-btn:hover img {
    transform: scale(1.1);
}

.copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap; 
    gap: 2rem;
}

.copyright p {
    font-weight: 300;
    font-size: 1.4rem;
    color: #bbb;
    margin: 0;
}

.copyright img {
    max-height: 2.5rem;
    width: auto;
    opacity: 0.9;
}

/* ========================================= */
/* BOTÓN WHATSAPP FLOTANTE                   */
/* ========================================= */
.whatsapp-flotante {
    position: fixed;
    width: 70px;
    height: 70px;
    bottom: 40px; 
    right: 50px; 
    background-color: #32d851;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 3.5rem;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 1000; 
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.whatsapp-flotante:hover {
    background-color: #118d3e;
    transform: scale(1.1);
}

/* ========================================= */
/* TÍTULO DE SECCIÓN (SOLO MÓVIL)            */
/* ========================================= */

.mobile-page-title {
    display: none;
}

/* ========================================= */
/* MEDIA QUERIES (SISTEMA RESPONSIVE GLOBAL) */
/* ========================================= */

/* 1. Laptops pequeñas (hasta 1024px) */
@media (max-width: 1024px) {
    html {
        font-size: 58%; 
    }
    .hero {
        padding: 1rem 2rem;
    }
    .blog-layout {
        grid-template-columns: 1fr; /* Colapsamos el grid del blog en pantallas medianas */
    }
    
    .facebook-wrapper {
        min-height: 600px; /* Reducimos la altura del iframe un poco en tablet */
    }

      .menu-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-list li {
        justify-content: center;
    }
    .social-icons {
        justify-content: center;
    }
    .information, 
    .my-account {
        justify-self: center;
    }

    .tips-grid .tip-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

}

/* 2. Tablets en vertical y Celulares (hasta 768px) */
@media (max-width: 768px) {
    html { font-size: 55%; }
    .container-logo {
        padding-left: 0;
        margin: 0 auto; 
    }
    .navbar {
        justify-content: space-between;
        padding: 1.5rem 2rem;
    }
    
    /* --- CONFIGURACIÓN DEL MENÚ MÓVIL --- */
    .menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--primary-color);
        text-align: center;
        z-index: 100;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        padding: 0;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        padding: 2rem 0;
    }

    .menu li { margin-bottom: 1.5rem; }

    /* --- ESTILOS DEL BOTÓN HAMBURGUESA ANIMADO (LA "X") --- */
    .navbar .fa-bars { display: none; } 

    .menu-btn {
        display: block; 
        width: 30px;
        height: 25px;
        position: relative;
        cursor: pointer;
        z-index: 101; 
    }

    .menu-btn span {
        display: block;
        position: absolute;
        height: 3px; 
        width: 100%;
        background: #fff;
        border-radius: 9px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: .25s ease-in-out; 
    }

    .menu-btn span:nth-child(1) { top: 0px; }
    .menu-btn span:nth-child(2) { top: 10px; }
    .menu-btn span:nth-child(3) { top: 20px; }

    .menu-btn.open span:nth-child(1) { top: 10px; transform: rotate(135deg); }
    .menu-btn.open span:nth-child(2) { opacity: 0; left: -60px; }
    .menu-btn.open span:nth-child(3) { top: 10px; transform: rotate(-135deg); }

    /* --- ADAPTACIONES DEL BLOG PARA MÓVIL --- */
    .blog-header h1 {
        font-size: 3.5rem;
    }

    .blog-info-panel {
        padding: 3rem 2rem;
    }

    .facebook-wrapper {
        padding: 1.5rem;
    }

    .menu-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-list li, .social-icons {
        justify-content: center;
    }
    .information, .my-account {
        justify-self: center;
    }

    .mobile-page-title {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        color: #ffffff;
        font-size: 1.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
}

/* 3. Teléfonos Anchos y Horizontales (hasta 576px) */
@media (max-width: 576px) {
    html { font-size: 50%; }
    .container-logo img { width: 180px; height: auto; }
    
    .copyright {
        flex-direction: column-reverse; 
        text-align: center;
        justify-content: center;
    }
    
    .whatsapp-flotante {
        width: 60px;
        height: 60px;
        bottom: 25px;
        right: 25px;
        font-size: 3rem;
    }
}

/* 4. Teléfonos Delgados (hasta 400px) */
@media (max-width: 400px) {
    .container-logo img { width: 150px; }
    .blog-header h1 { font-size: 2.8rem; }
    
    .whatsapp-flotante {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
        font-size: 2.8rem;
    }
}