/* ===== NEWSLETTER PAGE STYLES ===== */

/* Newsletter Section */
.newsletter-section {
    padding: 0 !important;
    margin: 0 !important;
    background: white;
    width: 100%;
}

.newsletter-section .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100%;
}

.newsletter-viewer {
    background: white;
    border: none;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    min-height: 400px;
    position: relative;
    overflow: visible;
}

.pdf-render {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pdf-page {
    /* Prefer physical A4 width where possible, but never exceed container width */
    width: min(210mm, 100%);
    box-sizing: border-box;
    padding: 0 12px;
    margin: 6px auto; /* 6px top & bottom page-break spacing */
}

.pdf-canvas {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast; /* improve clarity on some browsers */
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    margin: 0;
    padding: 0;
    display: block;
    background: white;
}

/* Newsletter Archive */
.newsletter-archive-section {
    padding: 80px 20px !important;
    background: white;
}

.newsletter-archive-list {
    display: grid;
    gap: 1rem;
}

.newsletter-item {
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.newsletter-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(232, 140, 0, 0.1);
}

.newsletter-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.newsletter-item-date {
    font-size: 0.85rem;
    color: var(--accent-color) !important;
    white-space: nowrap;
}

/* Ensure dates inside links inherit the accent color and override default link colors */
.newsletter-item a .newsletter-item-date {
    color: var(--accent-color) !important;
}

.newsletter-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.newsletter-item-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.newsletter-item-link:hover {
    text-decoration: underline;
}

.newsletter-item a {
    color: inherit;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .newsletter-viewer {
        height: 600px;
    }

    .newsletter-item-header {
        flex-direction: column;
    }

    .newsletter-item-date {
        white-space: normal;
        margin-top: 0.5rem;
    }
}
