/*
Theme Name: GeneratePress Child
Template: generatepress
*/

/* ========================================
   1. CONFIGURACIÓN GLOBAL Y EFECTOS
   ======================================== */
html {
    scroll-behavior: smooth !important; /* Animación fluida para los anclajes */
    overflow-x: hidden !important;
    background-color: #0d47a1 !important; /* Fondo de respaldo azul Mochima */
}

body {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* ========================================
   2. ELIMINACIÓN DE MÁRGENES (HOME Y PÁGINAS INTERNAS)
   ======================================== */
/* Hacer desaparecer el espacio muerto de la cabecera blanca nativa */
.home .site-header, .home .inside-header, .home .header-wrap,
.page-template-default .site-header, .page-template-default .inside-header {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Colapsar todos los contenedores para pegar la web al techo absoluto */
#page,
.site-content,
.content-area,
.site-main,
article,
.inside-article,
.entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ========================================
   3. HERO PRINCIPAL (EXCLUSIVO PARA LA HOME)
   ======================================== */
/* Forzar al bloque Fondo de la Home a medir el 100% de la pantalla */
.home .entry-content > .wp-block-cover:first-child {
    min-height: 100vh !important;
    height: 100vh !important;
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; 
    align-items: center !important;     
}

.home .entry-content > .wp-block-cover:first-child img.wp-block-cover__image-background {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
}

/* Título de la Home Gigante (Solo aplica donde dice MOCHIMA) */
.home .wp-block-cover h1 {
    font-size: 80px !important;
    line-height: 1.1 !important;
    margin-top: 0 !important;
    margin-bottom: 25px !important; 
    text-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-align: center !important;
    width: 100% !important;
}

/* ========================================
   4. ELEMENTOS INTERACTIVOS COMUNES (BOTONES)
   ======================================== */
.wp-block-cover .wp-block-buttons {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
}

/* El botón dorado del ecosistema */
.wp-block-cover .wp-block-button__link {
    background-color: #D4AF37 !important; 
    color: #111111 !important;            
    font-weight: 700 !important;           
    font-size: 18px !important;
    border-radius: 30px !important;       
    padding: 14px 36px !important;        
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important; 
    text-shadow: none !important;          
    transition: transform 0.3s ease, background-color 0.3s ease !important;            
}

.wp-block-cover .wp-block-button__link:hover {
    background-color: #B89321 !important; 
    color: #000000 !important;
    transform: translateY(-2px) !important;          
    box-shadow: 0 6px 20px rgba(0,0,0,0.4) !important;
}

/* ========================================
   5. DISTRIBUIDOR DE ÁREAS (MOSAICO DE LA HOME)
   ======================================== */
.home .wp-block-columns,
.home .entry-content .wp-block-columns {
    display: flex !important;
    flex-wrap: wrap !important; 
    gap: 0 !important;          
    padding: 0 !important;      
    margin-top: 50px !important;    
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.home .wp-block-column,
.home .entry-content .wp-block-column {
    flex: 1 1 33.333% !important; 
    max-width: 33.333% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.home .wp-block-column .wp-block-cover {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 480px !important; 
    height: 480px !important;
    padding: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

.home .wp-block-column .wp-block-cover h3 {
    color: #ffffff !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    margin: 0 0 15px 0 !important;
    text-shadow: 0 2px 12px rgba(0,0,0,0.9) !important;
    text-align: center !important;
}

/* ========================================
   6. TEXTO DESCRIPTIVO DE LAS PÁGINAS (COMPACTO Y ELEGANTE)
   ======================================== */
.entry-content p {
    max-width: 850px !important; 
    margin-left: auto !important;  
    margin-right: auto !important; 
    padding-left: 20px !important;  
    padding-right: 20px !important; 
    font-size: 20px !important;
    line-height: 1.8 !important;
    color: #2c3e50 !important; 
    text-align: justify !important; 
    margin-bottom: 25px !important;
}

.entry-content p:first-of-type::first-letter {
    font-size: 52px !important;
    font-weight: 700 !important;
    color: #D4AF37 !important;
    float: left !important;
    line-height: 1 !important;
    margin-right: 12px !important;
    margin-top: 4px !important;
}

.entry-content p a {
    color: #D4AF37 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.3s ease !important;
}

.entry-content p a:hover {
    color: #111111 !important;
    border-bottom: 2px solid #111111 !important;
}

/* ========================================
   7. CONTROL TOTAL EXCLUSIVO PARA INTERNAS DE PLAYAS (MÓVIL Y PC)
   ======================================== */
/* Estirar el bloque fondo de las playas rompiendo límites rígidos del tema */
body:not(.home) .wp-block-cover:first-of-type {
    min-height: 100vh !important;
    height: 100vh !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

/* TÍTULO ARMONIOSO DE 46PX EN COMPUTADORA */
body:not(.home) .wp-block-cover:first-of-type h1,
body:not(.home) .wp-block-cover__inner-container h1,
h1.titulo-playa-compacto {
    font-size: 46px !important; /* Acabado compacto de revista premium */
    color: #ffffff !important;  /* Letras blancas impecables */
    text-shadow: 0 4px 15px rgba(0,0,0,0.6) !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin-bottom: 20px !important;
}

/* ========================================
   8. RESPONSIVE OPTIMIZADO (MÓVILES)
   ======================================== */
@media (max-width: 900px) {
    .home .wp-block-column {
        flex: 1 1 50% !important;
        max-width: 50% !important;
    }
}

@media (max-width: 650px) {
    .home .wp-block-columns { display: block !important; width: 100% !important; }
    .home .wp-block-column { flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; margin-bottom: 10px !important; }
    .home .wp-block-column .wp-block-cover { height: 340px !important; }
    
    /* En teléfonos el título de la Home se ajusta */
    .home .wp-block-cover h1 { font-size: 42px !important; }

    /* ¡EL BLOQUEO PARA EL MÓVIL EN LAS PLAYAS! Se encoge a 26px (máximo 2 líneas limpias) */
    body:not(.home) .wp-block-cover:first-of-type h1,
    body:not(.home) .wp-block-cover__inner-container h1 {
        font-size: 26px !important; /* Deja libre el paisaje de la playa en celulares */
        line-height: 1.3 !important;
    }
}
