.newsletterheading h2 {
    text-align: center;
    margin-bottom: 40px;
    font-weight: 500;
    font-size: 40px;
    margin-top: 20px;
    color: var(--bs-heading-color);
}

.card-img-container {
    height: 250px; /* Fixed height for image container */
    overflow: hidden;
}

.custom-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Newsletter grid layout */
.newsletter-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;  /* Negative margin to offset padding */
}

.newsletter-grid > div {
    padding: 0.5rem;
    margin-bottom: 1rem;
}

/* Ensure consistent card heights */
.newsletter-grid .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.newsletter-grid .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Pagination styles */
.pagination {
    margin-top: 2rem;
}

/* Make pagination horizontally scrollable on small screens */
.pagination {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem;
}

.pagination .page-item .page-link {
    color: var(--color1);
    border-color: var(--color1);
}

.pagination .page-item.active .page-link {
    background-color: var(--color1);
    border-color: var(--color1);
    color: white;
}

.pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(1, 3, 38, 0.25);
}

@media (max-width: 575px) {
    .pagination .page-link {
        padding: 0.35rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* Newsletter card hover effect */
.card {
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}
