/* ==========================================================================
   Popup Emergente de Aviso Importante (Colegio Kinderland)
   ========================================================================== */

/* Contenedor Overlay del Modal */
.kl-announcement-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 27, 62, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.kl-announcement-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Tarjeta Principal del Modal */
.kl-announcement-modal {
    background: #FFFFFF;
    border-radius: 28px;
    max-width: 540px;
    width: 100%;
    max-height: 92vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(24px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kl-announcement-overlay.is-visible .kl-announcement-modal {
    transform: scale(1) translateY(0);
}

/* Botón de Cierre Flotante */
.kl-announcement-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #0D47A1;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    z-index: 10;
    transition: all 0.25s ease;
}

.kl-announcement-close:hover {
    background: #FF5A5A;
    color: #FFFFFF;
    transform: scale(1.1) rotate(90deg);
}

/* Encabezado Opcional del Aviso */
.kl-announcement-header {
    background: linear-gradient(135deg, #0D47A1 0%, #1976D2 100%);
    color: #FFFFFF;
    padding: 16px 20px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 58px;
}

.kl-announcement-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #FFCB47;
    color: #0D47A1;
    padding: 4px 10px;
    border-radius: 50px;
    flex-shrink: 0;
}

.kl-announcement-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.3;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Contenedor de la Imagen */
.kl-announcement-img-wrap {
    position: relative;
    background: #F4FAFE;
    overflow-y: auto;
    max-height: calc(92vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.kl-announcement-img {
    width: 100%;
    height: auto;
    max-height: 68vh;
    object-fit: contain;
    display: block;
    border-radius: 18px;
    transition: transform 0.3s ease;
}

.kl-announcement-link {
    display: block;
    width: 100%;
    text-decoration: none;
    cursor: pointer;
}

.kl-announcement-link:hover .kl-announcement-img {
    transform: scale(1.02);
}

/* Barra Inferior de Acciones */
.kl-announcement-footer {
    padding: 14px 20px;
    background: #FFFFFF;
    border-top: 1px solid rgba(76, 177, 237, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.kl-announcement-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #FFFFFF;
    font-size: 0.92rem;
    font-weight: 800;
    padding: 11px 22px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 180px;
    text-align: center;
}

.kl-announcement-btn:hover {
    background: #20BA5A;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
}

.kl-announcement-btn.btn-blue {
    background: #0D47A1;
    box-shadow: 0 6px 18px rgba(13, 71, 161, 0.3);
}

.kl-announcement-btn.btn-blue:hover {
    background: #1565C0;
    box-shadow: 0 10px 24px rgba(13, 71, 161, 0.45);
}

.kl-announcement-dismiss {
    background: transparent;
    border: none;
    color: #718096;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.2s ease;
}

.kl-announcement-dismiss:hover {
    color: #1A202C;
    text-decoration: underline;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 640px) {
    .kl-announcement-overlay {
        padding: 12px 10px;
    }

    .kl-announcement-modal {
        border-radius: 22px;
        max-height: 94vh;
    }

    .kl-announcement-header {
        padding: 12px 14px;
        padding-right: 50px;
    }

    .kl-announcement-title {
        font-size: 0.88rem;
    }

    .kl-announcement-img {
        max-height: 62vh;
    }

    .kl-announcement-footer {
        padding: 10px 14px;
        flex-direction: column;
        gap: 8px;
    }

    .kl-announcement-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.88rem;
    }

    .kl-announcement-dismiss {
        width: 100%;
        text-align: center;
    }
}
