/* style/news.css */

/* Base styles for the page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #FFFFFF);
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-news__section-title {
    font-size: clamp(28px, 4vw, 38px);
    color: #26A9E0;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-news__section-title--light {
    color: #FFFFFF;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px; /* Small top padding as per requirements */
    background-color: #FFFFFF; /* Ensure a light background for hero section */
}

.page-news__hero-image-wrapper {
    width: 100%;
    overflow: hidden;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-news__hero-content {
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    background-color: #FFFFFF; /* Explicitly white for contrast */
    color: #333333;
    box-sizing: border-box;
}

.page-news__main-title {
    font-size: clamp(32px, 5vw, 56px); /* Using clamp for responsive H1 */
    color: #26A9E0;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-news__description {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #555555;
}

.page-news__btn-primary {
    display: inline-block;
    background-color: #26A9E0;
    color: #FFFFFF;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: 2px solid #26A9E0;
}

.page-news__btn-primary:hover {
    background-color: #1a7fb0;
    border-color: #1a7fb0;
}

/* Latest Articles Section */
.page-news__latest-articles {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.page-news__articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-news__article-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-news__article-image-wrapper {
    width: 100%;
    height: 225px; /* Fixed height for image consistency */
    overflow: hidden;
}

.page-news__article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-news__article-content {
    padding: 20px;
}

.page-news__article-title {
    font-size: 22px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-title a {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #1a7fb0;
}

.page-news__article-meta {
    font-size: 14px;
    color: #777777;
    margin-bottom: 15px;
}

.page-news__article-excerpt {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
}

.page-news__read-more-link {
    display: inline-block;
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
    color: #1a7fb0;
    text-decoration: underline;
}

.page-news__pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.page-news__pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #FFFFFF;
    border: 1px solid #DDDDDD;
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.page-news__pagination-item:hover:not(.page-news__pagination-item--active) {
    background-color: #26A9E0;
    color: #FFFFFF;
    border-color: #26A9E0;
}

.page-news__pagination-item--active {
    background-color: #26A9E0;
    color: #FFFFFF;
    border-color: #26A9E0;
    cursor: default;
}

/* Categories Section */
.page-news__categories {
    padding: 60px 0;
    background-color: #26A9E0;
    color: #FFFFFF;
}

.page-news__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.page-news__category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: #FFFFFF;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-news__category-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.page-news__category-image {
    width: 100px;
    height: 75px; /* Adjust height based on aspect ratio of 400x300 */
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
    display: block;
}

.page-news__category-name {
    font-size: 18px;
    font-weight: bold;
}

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #f0f0f0;
}

.page-news__cta-title {
    font-size: clamp(24px, 4vw, 36px);
    color: #26A9E0;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__cta-description {
    font-size: 18px;
    color: #555555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: #FFFFFF;
}

.page-news__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-news__faq-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.page-news__faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #FFFFFF;
    border-bottom: 1px solid #EEEEEE;
    transition: background-color 0.3s ease;
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-news__faq-item summary:hover {
    background-color: #f0f0f0;
}

.page-news__faq-qtext {
    flex-grow: 1;
    color: #26A9E0;
}

.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    margin-left: 15px;
    color: #26A9E0;
}

.page-news__faq-answer {
    padding: 20px;
    font-size: 16px;
    color: #555555;
    background-color: #f9f9f9;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .page-news__container {
        padding: 0 15px !important;
    }

    .page-news__hero-content {
        padding: 30px 15px;
    }

    .page-news__main-title {
        font-size: clamp(28px, 8vw, 40px);
    }

    .page-news__description {
        font-size: 16px;
    }

    .page-news__btn-primary {
        width: 100%;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
    }
    
    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }

    .page-news__article-title {
        font-size: 20px;
    }

    .page-news__article-excerpt {
        font-size: 15px;
    }

    .page-news__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .page-news__category-card {
        padding: 15px 10px;
    }

    .page-news__category-image {
        width: 80px;
        height: 60px;
    }

    .page-news__category-name {
        font-size: 16px;
    }

    .page-news__cta-title {
        font-size: clamp(20px, 6vw, 30px);
    }

    .page-news__cta-description {
        font-size: 16px;
    }

    .page-news__faq-item summary {
        font-size: 16px;
        padding: 15px;
    }

    .page-news__faq-answer {
        padding: 15px;
        font-size: 15px;
    }

    /* Images responsive */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__hero-section,
    .page-news__latest-articles,
    .page-news__categories,
    .page-news__cta-section,
    .page-news__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .page-news__article-card, .page-news__category-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .page-news__hero-section { 
        padding-top: 10px !important; 
    }
}

@media (max-width: 480px) {
    .page-news__category-grid {
        grid-template-columns: 1fr;
    }
}