/**
 * @file plugins/themes/default/styles/wordpress-footer.css
 *
 * Footer override — cargado como CSS puro (sin compilación LESS).
 * Cargado explícitamente desde DefaultThemePlugin.php.
 *
 * RUTA EN EL SERVIDOR:
 *   /tu-omp/plugins/themes/default/styles/wordpress-footer.css
 */

/* ══════════════════════════════════════════════════════
   STICKY FOOTER — siempre anclado al fondo del viewport
   Técnica: flex column en el page wrapper + flex:1 en el
   área de contenido empuja el footer hacia abajo.
   No rompe ningún float interno de OMP.
   ══════════════════════════════════════════════════════ */

.pkp_structure_page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* El área de contenido crece para rellenar el espacio libre */
.pkp_structure_content {
    flex: 1 0 auto;
}

/* El footer queda fijo al final, nunca sube */
.pkp_structure_footer_wrapper {
    flex-shrink: 0;
}


/* ── Google Fonts para el footer ── */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&family=Roboto+Slab:wght@400;700&display=swap');

/* ══════════════════════════════════════════════
   FOOTER — OVERRIDE VISUAL ESTILO WORDPRESS
   ══════════════════════════════════════════════ */

/* Wrapper externo: centra y añade espacio superior */
.pkp_structure_footer_wrapper {
    max-width: 1240px;
    margin-top: 48px;
    margin-right: auto;
    margin-left: auto;
    padding: 0 24px 32px;
    /* Cancela el background @bg-shade del original */
    background: transparent;
}

/* Caja interior: fondo azul marino degradado estilo WordPress */
.pkp_structure_footer {
    padding: 28px 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    background: linear-gradient(135deg, #0f2239 0%, #1b3b6f 55%, #1e4f79 100%);
    box-shadow: 0 22px 42px rgba(15, 34, 57, 0.22);
    color: rgba(255, 255, 255, 0.9);
    /* Cancela el text-align:center del footer.less original */
    text-align: left;
}

/* Links dentro del footer */
.pkp_structure_footer a,
.pkp_footer_content,
.pkp_footer_content p,
.pkp_brand_footer,
.pkp_brand_footer a {
    color: rgba(255, 255, 255, 0.92);
}

/* Hover/focus de links */
.pkp_structure_footer a:hover,
.pkp_structure_footer a:focus,
.pkp_brand_footer a:hover,
.pkp_brand_footer a:focus {
    color: #ffffff;
}

/* Texto del footer (el campo "Pie de página" del panel de administración) */
.pkp_footer_content {
    padding: 0 0 18px 0;
    font-family: "Roboto", "Segoe UI", sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
}

/* Logo PKP en el footer */
.pkp_brand_footer {
    overflow: hidden;
    padding: 16px 0 0 0;
}

.pkp_brand_footer a {
    float: right;
    display: block;
    max-width: 150px;
    opacity: 0.65;
    transition: opacity 0.2s ease;
}

.pkp_brand_footer a:hover,
.pkp_brand_footer a:focus {
    opacity: 1;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 991px) {
    .pkp_structure_footer_wrapper {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 767px) {
    .pkp_structure_footer {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .pkp_footer_content {
        font-size: 0.9rem;
    }

    .pkp_brand_footer a {
        float: none;
        margin-top: 14px;
        max-width: 120px;
    }
}

/* ══════════════════════════════════════════════
   BOTÓN FLIP FOOTER (COLORES INVERTIDOS) Y POPUP
   ══════════════════════════════════════════════ */

/* Contenedor extra para ubicar el botón a la izquierda con alineación absoluta (VERTICAL MIDDLE) */
.cesfro-footer-action-area {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.cesfro-flip-btn {
    background: #ffffff !important;
    color: #1b3b6f !important;
    border: none !important;
    padding: 10px 22px !important;
    border-radius: 30px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    outline: none !important;
    text-decoration: none !important;
}

.cesfro-flip-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4) !important;
    color: #0f2239 !important;
    background: #f8f9fa !important;
}

.cesfro-flip-btn i {
    font-size: 1.1rem !important;
}

@media (max-width: 768px) {
    .cesfro-footer-action-area {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin-top: 15px;
        text-align: center;
    }
    .cesfro-flip-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 20px !important;
    }
}

/* ── MODAL DE SUSCRIPCIÓN (Estilo Elementor OMP) ── */
.cesfro-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 34, 57, 0.85);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.cesfro-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cesfro-popup-box {
    position: relative;
    width: 90%;
    max-width: 500px;
    background-color: #0F2239; /* Fallback */
    background-image: linear-gradient(rgba(15, 34, 57, 0.93), rgba(15, 34, 57, 0.93)), url('https://cesfro.com/wp-content/uploads/2025/09/20.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    border: 3px solid #FFFFFF;
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    color: #ffffff;
    font-family: "Roboto", sans-serif;
}

.cesfro-popup-overlay.active .cesfro-popup-box {
    transform: translateY(0);
}

.cesfro-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #0f2239;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cesfro-popup-close:hover {
    background: #ffffff;
    color: #0f2239;
    border-color: #ffffff;
}

.cesfro-popup-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: "Lora", serif;
    line-height: 1.2;
}

.cesfro-popup-desc {
    font-size: 1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.cesfro-popup-input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 15px;
    outline: none;
    transition: all 0.3s;
}

.cesfro-popup-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.cesfro-popup-input:focus {
    background: rgba(255,255,255,0.2);
    border-color: #ffffff;
}

.cesfro-popup-submit {
    width: 100%;
    background: #ffffff;
    color: #0f2239;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cesfro-popup-submit:hover {
    background: #0f2239;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.cesfro-popup-success {
    display: none;
    font-size: 1.2rem;
    font-weight: 500;
    color: #4CAF50; /* Green success check color but readable? Elementor usually uses native white or theme color, let's stick to white */
    color: #ffffff;
    padding: 20px 0;
}
.cesfro-popup-success i {
    font-size: 2rem;
    display: block;
    margin-bottom: 15px;
    color: #4CAF50;
}

/* Modificador de fondo sólido durante mensaje de éxito */
.cesfro-popup-box.success-mode {
    background-image: none !important;
    background-color: #0F2239 !important;
}

/* Ancla para el botón con absolute position */
.pkp_structure_footer {
    position: relative;
}
