/* Newsletter listing + brochure-style PDF reader */

.newsletter-page .page-content {
    padding-bottom: 0;
}

.brochure-issue-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.brochure-issue-header h2 {
    margin: 0 0 0.35rem 0;
    color: var(--primary-blue);
    font-size: 1.75rem;
}

.brochure-issue-meta {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin: 0;
}

.brochure-issue-header .news-share {
    margin-top: 0.65rem;
}

.brochure-issue-excerpt {
    color: var(--dark-gray);
    line-height: 1.7;
    margin: 0.75rem 0 0 0;
    max-width: 46rem;
}

.brochure-issue-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.brochure-archive-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: var(--primary-blue);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
}

.brochure-archive-btn:hover {
    background: var(--dark-blue);
    color: #fff;
}

.newsletter-archive-current {
    margin: 0 0 1.5rem 0;
    color: var(--dark-gray);
}

.newsletter-archive-current a {
    color: var(--primary-red);
    font-weight: 600;
    text-decoration: none;
}

.newsletter-archive-current a:hover {
    text-decoration: underline;
}

.brochure-stage {
    position: relative;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 52%),
        linear-gradient(180deg, #163154 0%, #0b1a2e 100%);
    border-radius: 16px;
    padding: 1.75rem 1rem 2.25rem;
    overflow: hidden;
}

.brochure-stage::before {
    content: "";
    position: absolute;
    inset: auto 8% 1.1rem 8%;
    height: 2.5rem;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45) 0%, transparent 70%);
    pointer-events: none;
}

.brochure-book-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    min-height: 280px;
}

.brochure-book {
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.brochure-book .stf__parent,
.brochure-book .stf__wrapper {
    margin: 0 auto;
}

.brochure-book canvas,
.brochure-book img {
    max-width: none;
}

.brochure-loading,
.brochure-fallback {
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    padding: 3rem 1rem;
}

.brochure-loading {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.brochure-controls {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 1rem;
    margin-top: 1.25rem;
    color: #fff;
}

.brochure-controls button,
.brochure-controls a {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.2;
}

.brochure-controls button:hover,
.brochure-controls a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.brochure-controls button:disabled {
    opacity: 0.4;
    cursor: default;
}

.brochure-page-label {
    min-width: 8.5rem;
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.brochure-hint {
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin: 0.15rem 0 0 0;
}

.brochure-thumbs {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.85rem 0.25rem 0.15rem;
    scrollbar-width: thin;
    max-width: 980px;
    margin: 0.5rem auto 0;
}

.brochure-thumbs button {
    flex: 0 0 auto;
    width: 52px;
    padding: 0;
    border: 2px solid transparent;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    line-height: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.brochure-thumbs button.is-active {
    border-color: #f2c14e;
}

.brochure-thumbs img {
    width: 100%;
    height: 68px;
    object-fit: cover;
    display: block;
}

.brochure-fallback iframe {
    width: 100%;
    min-height: 80vh;
    border: 0;
    border-radius: 8px;
    background: #fff;
}

.newsletter-archive {
    margin-top: 0;
    padding-bottom: 3rem;
}

.newsletter-archive h2 {
    color: var(--primary-blue);
    margin-bottom: 1.25rem;
}

.newsletter-cover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.newsletter-cover-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.newsletter-cover-frame {
    background: #f4f4f4;
    border-radius: 6px;
    box-shadow:
        4px 6px 0 rgba(0, 51, 102, 0.08),
        0 12px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transform: rotate(-1.2deg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    aspect-ratio: 8.5 / 11;
}

.newsletter-cover-card:nth-child(even) .newsletter-cover-frame {
    transform: rotate(1.1deg);
}

.newsletter-cover-card:hover .newsletter-cover-frame {
    transform: rotate(0deg) translateY(-4px);
    box-shadow:
        0 4px 0 rgba(0, 51, 102, 0.08),
        0 18px 28px rgba(0, 0, 0, 0.16);
}

.newsletter-cover-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.newsletter-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--primary-blue), var(--dark-blue));
    color: #fff;
    font-weight: 700;
    padding: 1rem;
    text-align: center;
}

.newsletter-cover-card h3 {
    margin: 0.85rem 0 0.2rem;
    font-size: 1rem;
    color: var(--primary-blue);
}

.newsletter-cover-card p {
    margin: 0;
    color: var(--text-gray);
    font-size: 0.85rem;
}

.newsletter-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-gray);
}

@media (max-width: 768px) {
    .brochure-issue-header h2 {
        font-size: 1.35rem;
    }

    .brochure-stage {
        padding: 1rem 0.5rem 1.5rem;
        border-radius: 10px;
    }

    .brochure-thumbs img {
        height: 56px;
    }
}
