/* ══════════════════════════════════════
   Boletín Detail — Hero
══════════════════════════════════════ */

.page-hero--boletin {
    height: 420px;
}

.page-hero--boletin .page-hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.boletin-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 32px;
    transition: color .2s, gap .2s;
}

.boletin-back-link:hover {
    color: #ffd76d;
    gap: 10px;
}

.page-hero--boletin .slide-tag {
    margin-bottom: 16px;
}

.page-hero--boletin h1 {
    margin-bottom: 0;
}

.boletin-back-link i {
    width: 16px;
    height: 16px;
}

/* ══════════════════════════════════════
   Viewer Toolbar
══════════════════════════════════════ */

.boletin-viewer-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 80px 90px;
}

.boletin-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.boletin-viewer-toolbar__nav,
.boletin-viewer-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.viewer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 30px;
    border: none;
    background: #07193d;
    color: white;
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, opacity .2s, transform .2s;
}

.viewer-btn i {
    width: 16px;
    height: 16px;
}

.viewer-btn:hover:not(:disabled) {
    background: #0c2b66;
    transform: translateY(-2px);
}

.viewer-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.viewer-btn--ghost {
    background: white;
    color: #07193d;
    border: 2px solid #dca84d;
}

.viewer-btn--ghost:hover {
    background: #dca84d;
    color: white;
}

.viewer-page-indicator {
    font-size: .88rem;
    font-weight: 600;
    color: #07193d;
    min-width: 130px;
    text-align: center;
}

/* ══════════════════════════════════════
   Flipbook Stage
══════════════════════════════════════ */

.flipbook-stage {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef1f6;
    border-radius: 20px;
    padding: 32px;
}

.flipbook-stage:fullscreen {
    background: #07193d;
    border-radius: 0;
}

.flipbook-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* La cascada de autor gana siempre sobre el `display` del UA para [hidden];
   sin esto, .flipbook-loading/.flipbook-container/.flipbook-error (que fijan
   su propio `display`) quedan visibles aunque JS marque hidden=true. */
.flipbook-stage [hidden] {
    display: none !important;
}

.flipbook-container :is(canvas, img) {
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}

.flipbook-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #5a6a85;
    font-size: .95rem;
}

.flipbook-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid rgba(7, 25, 61, .12);
    border-top-color: #dca84d;
    animation: flipbook-spin 0.9s linear infinite;
}

@keyframes flipbook-spin {
    to { transform: rotate(360deg); }
}

.flipbook-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
    color: #5a6a85;
    max-width: 380px;
}

/* ══════════════════════════════════════
   Responsive
══════════════════════════════════════ */

@media (max-width: 1100px) {
    .boletin-viewer-section {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 768px) {
    .page-hero--boletin {
        height: 260px;
    }

    .boletin-viewer-section {
        padding: 32px 20px 60px;
    }

    .boletin-viewer-toolbar {
        justify-content: center;
        text-align: center;
    }

    .flipbook-stage {
        padding: 16px;
        min-height: 360px;
    }
}
