body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
    background-color: #f8f9fa;
}

*, *:before, *:after {
    box-sizing: inherit;
}

.hero-section {
    height: 60vh;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background-image: url('../image/down.png');
    background-size: cover;
    background-position: center;
    color: white;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4rem;
    margin: 0;
    font-weight: 600;
}

.hero-content p {
    font-size: 1.25rem;
    margin-top: 0.5rem;
    font-weight: 300;
    max-width: 600px;
}

.newsletter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    font-size: 2.2rem;
    color: #333;
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    background-color: transparent;
    padding: 0.5rem;
    border-radius: 12px;
}

.filter-bar input[type="text"],
.filter-bar select {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 120px;
}

.filter-bar input[type="text"] {
    flex: 3 1 520px;
}

.filter-bar select {
    flex: 0 0 160px;
}

.filter-bar .search-btn {
    padding: 0.75rem 2rem;
    border: none;
    background-color: rgb(12, 100, 0);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-bar .search-btn:hover {
    background-color: rgb(13, 114, 0);
}

.newsletter-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 200px;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.newsletter-cover {
    position: relative;
    width: 150px;
    min-width: 150px;
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pdf-thumbnail-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-loading {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem;
}

.newsletter-date {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgb(15, 126, 0);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.newsletter-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.newsletter-details {
    flex: 1;
}

.newsletter-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.newsletter-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.newsletter-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-view {
    background-color: rgb(16, 139, 0);
    color: #fff;
    flex: 1;
}
.btn-view:hover {
    background-color: rgb(13, 109, 0);
    color: #fff;
}

.btn-download {
    background-color: #fff;
    color: #555;
    border: 1px solid #ddd;
    flex: 1;
}
.btn-download:hover {
    background-color: #f2f2f2;
    border-color: #aaa;
    color: #555;
}

.btn i {
    font-size: 1rem;
}

.pdf-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.pdf-viewer-container {
    width: 90%;
    height: 90%;
    background-color: #fff;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.pdf-viewer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #981b1b;
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
    font-size: 1.2rem;
}

.pdf-viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 992px) {
    .newsletter-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .newsletter-container {
        padding: 3rem 1rem;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar input[type="text"],
    .filter-bar select,
    .filter-bar .search-btn {
        width: 100%;
        flex: 1 1 100%;
    }
    .newsletter-card {
        flex-direction: column;
        min-height: auto;
    }
    .newsletter-cover {
        width: 100%;
        height: 200px;
    }
    .newsletter-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.8rem;
    }
    .newsletter-cover {
        width: 120px;
        min-width: 120px;
        height: 160px;
    }
}