.newsletter-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

/* ===== Filter Row ===== */
#newsletterFilterForm {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.newsletter-filter {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.newsletter-filter label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    display: block;
    white-space: nowrap;
}

.newsletter-filter select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #333;
    min-width: 160px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-filter select:hover {
    border-color: #1472ba;
}

.newsletter-filter select:focus {
    outline: none;
    border-color: #1472ba;
    box-shadow: 0 0 0 3px rgba(20, 114, 186, 0.1);
}

/* Make placeholder lighter by default */
.search-group input::placeholder {
    color: #999;
    opacity: 1;
    transition: color 0.3s ease;
}

/* Fade placeholder when input is focused */
.search-group input:focus::placeholder {
    color: #ccc;
    opacity: 0.6;
}

/* ===== Grid Layout ===== */
.newsletter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media(max-width: 991px) {
    .newsletter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 600px) {
    .newsletter-grid {
        grid-template-columns: 1fr;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 0 0 29%;
    width: 29%;
    min-width: 180px;
}

.filter-group label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.filter-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-group select:hover {
    border-color: #1472ba;
}

.filter-group select:focus {
    outline: none;
    border-color: #1472ba;
    box-shadow: 0 0 0 3px rgba(20, 114, 186, 0.1);
}

.search-group {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.search-group label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.search-group input {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
    font-size: 14px;
    background: #fff;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-group input:hover {
    border-color: #1472ba;
}

.search-group input:focus {
    outline: none;
    border-color: #1472ba;
    box-shadow: 0 0 0 3px rgba(20, 114, 186, 0.1);
}

/* Dropdown results */
#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#searchResults div {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

#searchResults div:hover {
    background: #f2f2f2;
}

/* Responsive layout */
@media(max-width: 991px) {
    #newsletterFilterForm {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }
    
    .newsletter-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .filter-group, .search-group {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
    
    .filter-group select,
    .search-group input {
        width: 100%;
    }
}

@media(max-width: 600px) {
    #newsletterFilterForm {
        padding: 12px;
        margin-bottom: 30px;
    }
    
    .newsletter-filter {
        margin-bottom: 30px;
    }
}

/* ===== Card Style ===== */
.newsletter-item {
    border: 1px solid #e8e8e8;
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.newsletter-desc {
    font-size: 14px;
    color: #77899c !important;
    margin-bottom: 14px;
    min-height: 60px;
    line-height: 1.5;
}

.newsletter-item h3 {
    font-size: 20px;
    font-weight: bold;
    color: #0f2a47 !important;
    line-height: 1.3;
    margin: 0 0 12px;
    min-height: 50px;
    max-height: 50px;
    overflow: hidden;
}

.newsletter-item h3:hover {
    text-decoration: none;
    color: #123456 !important;
}

.newsletter-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
    min-height: 20px;
}

.newsletter-excerpt {
    font-size: 14px;
    color: #77899c !important;
    line-height: 1.5;
    margin-bottom: 14px;
    min-height: 60px;
    max-height: 60px;
    overflow: hidden;
}

.newsletter-read-time {
    font-size: 13px;
    color: #fff;
    background-color: #1472ba;
    padding: 5px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-weight: bold;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
}

.read-more {
    margin-top: auto;
    font-size: 14px;
    font-weight: 600;
    color: #1472ba;
    text-decoration: none;
    transition: color 0.3s;
}

.read-more:hover {
    color: #0f5a94;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination a,
.pagination span {
    margin: 0 5px;
    padding: 8px 14px;
    border: 1px solid #ddd;
    color: #1472ba;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.pagination .current {
    background: #1472ba;
    color: white;
    font-weight: bold;
}

/* Make all cards equal height */
.newsletter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.newsletter-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #eee;
    padding: 16px;
    box-sizing: border-box;
}

/* Force images same height */
.newsletter-item img {
    width: 100%;
    height: 190px;
    object-fit: contain;
    background: #f8f8f8;
    border-radius: 10px;
    margin-bottom: 14px;
}

/* Make the content expand evenly */
.newsletter-title,
.newsletter-meta,
.newsletter-excerpt,
.newsletter-read-time {
    margin-bottom: 8px;
}

.read-more {
    margin-top: auto;
    display: inline-block;
    color: #1472ba;
    font-weight: 600;
    text-decoration: none;
}

