/* style/news.css */

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background #f0f2f5 */
    background-color: #f0f2f5; /* Inherited from body, but good to define for clarity */
}

.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, 42px); /* Responsive H2, not too large */
    color: #26A9E0;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-title--white {
    color: #ffffff;
}

.page-news__section-description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__section-description--white {
    color: #f0f2f5;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding as body handles header offset */
    text-align: center;
    overflow: hidden;
    background-color: #ffffff; /* Explicit background for contrast */
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
}

.page-news__hero-content {
    max-width: 900px;
    z-index: 1; /* Ensure content is above any potential background effects */
    padding: 0 15px;
}

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

.page-news__description {
    font-size: 18px;
    margin-bottom: 30px;
    color: #555555;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary,
.page-news a[class*="button"],
.page-news a[class*="btn"] {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-news__btn-primary {
    background-color: #26A9E0;
    color: #ffffff;
    border: 2px solid #26A9E0;
}

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

.page-news__btn-secondary {
    background-color: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
    background-color: #e0f2f7;
    color: #1e87c0;
    border-color: #1e87c0;
}

/* Latest News Section */
.page-news__latest-news {
    padding: 80px 0;
    background-color: #f0f2f5;
}

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

.page-news__news-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;
    display: flex;
    flex-direction: column;
    min-height: 200px; /* Ensure card is not too small */
}

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

.page-news__card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistent card images */
    object-fit: cover;
    display: block;
    min-height: 200px; /* Ensure minimum size */
}

.page-news__card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

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

.page-news__card-title a:hover {
    color: #1e87c0;
    text-decoration: underline;
}

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

.page-news__card-excerpt {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start;
    transition: color 0.3s ease;
}

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

.page-news__view-all-button {
    text-align: center;
    margin-top: 50px;
}

/* Category Section */
.page-news__category-section {
    background-color: #26A9E0; /* Brand color background */
    padding: 80px 0;
}

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

.page-news__category-card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #333333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 180px; /* Ensure minimum size */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

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

.page-news__category-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #26A9E0;
    font-weight: bold;
}

.page-news__category-text {
    font-size: 16px;
    color: #555555;
}

/* About Us Summary Section */
.page-news__about-us-summary {
    padding: 80px 0;
    background-color: #ffffff;
}

.page-news__about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.page-news__about-text {
    flex: 1;
    padding-right: 20px;
}

.page-news__about-text p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #333333;
}

.page-news__about-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-news__about-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Ensure minimum size */
    min-height: 200px; /* Ensure minimum size */
}

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

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

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

.page-news__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: #26A9E0;
    border-bottom: 1px solid #eeeeee;
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.page-news__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-news__faq-toggle {
    font-size: 24px;
    font-weight: normal;
    color: #555555;
    line-height: 1;
}

.page-news__faq-item[open] summary .page-news__faq-toggle {
    content: "−"; /* Change to minus when open */
}

.page-news__faq-answer {
    padding: 20px 25px;
    font-size: 16px;
    color: #555555;
    line-height: 1.6;
}

.page-news__faq-answer p {
    margin-bottom: 10px;
}
.page-news__faq-answer p:last-child {
    margin-bottom: 0;
}

.page-news__faq-answer a {
    color: #26A9E0;
    text-decoration: none;
}

.page-news__faq-answer a:hover {
    text-decoration: underline;
}

/* CTA Bottom Section */
.page-news__cta-bottom {
    background-color: #26A9E0;
    padding: 80px 0;
    text-align: center;
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-news__about-content {
        flex-direction: column;
    }
    .page-news__about-text {
        padding-right: 0;
        margin-bottom: 30px;
    }
    .page-news__about-image-wrapper {
        order: -1; /* Image first on smaller screens */
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-news__container {
        padding: 0 15px;
    }

    .page-news__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* Ensure small top padding */
    }

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

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

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news a[class*="btn"] {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-news__latest-news,
    .page-news__category-section,
    .page-news__about-us-summary,
    .page-news__faq-section,
    .page-news__cta-bottom {
        padding: 50px 0;
    }

    .page-news__section-title {
        font-size: clamp(24px, 7vw, 36px);
        margin-bottom: 15px;
    }

    .page-news__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-news__news-grid,
    .page-news__category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__card-image {
        height: 180px;
    }
    
    .page-news__card-title {
        font-size: 20px;
    }

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

    .page-news__about-text p {
        font-size: 15px;
    }

    /* Mobile image responsiveness */
    .page-news img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-image-wrapper,
    .page-news__about-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Adding padding to container-like elements for mobile */
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Override specific padding for sections that have their own internal container */
    .page-news__latest-news .page-news__container,
    .page-news__category-section .page-news__container,
    .page-news__about-us-summary .page-news__container,
    .page-news__faq-section .page-news__container,
    .page-news__cta-bottom .page-news__container {
        padding-left: 0;
        padding-right: 0;
    }
    .page-news__hero-content {
        padding-left: 15px;
        padding-right: 15px;
    }

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