/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background-color: #ffffff; /* Default body background is white */
}

/* Hero Section */
.page-news__hero-section {
    padding-top: 10px; /* Small top padding, relying on body padding for header offset */
    margin-bottom: 40px;
    background-color: #017439; /* A fallback background color if image fails or for visual separation */
    color: #ffffff;
    text-align: center;
    overflow: hidden;
}

.page-news__hero-image-wrapper {
    max-width: 100%;
    margin-bottom: 20px; /* Space between image and content */
    overflow: hidden;
}

.page-news__hero-image-wrapper img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    display: block;
    object-fit: cover; /* Cover the area, will be changed to contain on mobile */
}

.page-news__hero-content-wrapper {
    padding-bottom: 60px; /* Padding at the bottom of the content area */
}

.page-news__main-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
}

.page-news__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 800px;
    color: #f0f0f0;
    margin-left: auto;
    margin-right: auto;
}

.page-news__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%; /* Ensure container takes full width for wrapping */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    max-width: 100%; /* Ensure button itself doesn't overflow */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
}

.page-news__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

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

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

.page-news__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
}

/* General Section Styles */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.page-news__section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #017439;
}

.page-news__intro-section,
.page-news__access-section {
    background-color: #f9f9f9;
    padding: 60px 0;
}

.page-news__text-block {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: justify;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Category Cards Section */
.page-news__categories-section {
    padding: 60px 0;
    background-color: #ffffff;
}

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

.page-news__category-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-news__category-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__card-title {
    font-size: 22px;
    font-weight: 600;
    margin: 20px 20px 10px;
    color: #017439;
}

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

.page-news__card-title a:hover {
    color: #005a2d;
}

.page-news__card-description {
    font-size: 16px;
    color: #555555;
    padding: 0 20px;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow description to take available space */
}

.page-news__btn-text {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 20px 20px;
    color: #017439;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #017439;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__btn-text:hover {
    background-color: #017439;
    color: #ffffff;
}

/* Why Follow Section */
.page-news__why-follow-section {
    background-color: #017439;
    color: #ffffff;
    padding: 60px 0;
}

.page-news__why-follow-section .page-news__section-title {
    color: #ffffff;
}

.page-news__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-news__benefit-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.page-news__benefit-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffffff;
}

.page-news__benefit-item p {
    font-size: 16px;
    color: #f0f0f0;
}

.page-news__cta-buttons--center {
    margin-top: 40px;
    text-align: center;
}

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

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

details.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    background: #fff;
}
details.page-news__faq-item summary.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
}
details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
    display: none;
}
details.page-news__faq-item summary.page-news__faq-question:hover {
    background: #f5f5f5;
}
.page-news__faq-qtext {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: #333333;
}
.page-news__faq-toggle {
    font-size: 28px; /* Increased size for better visibility */
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
    margin-left: 15px;
    width: 32px; /* Increased width */
    height: 32px; /* Increased height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
    padding: 0 20px 20px;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
    color: #555555;
}
details.page-news__faq-item .page-news__faq-answer p {
    margin-bottom: 10px;
}

/* Responsive Styles */
/* For smaller desktops and tablets (up to 1024px) */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: clamp(36px, 5vw, 42px);
    }
    .page-news__hero-description {
        font-size: 18px;
    }
    .page-news__hero-content-wrapper {
        padding-top: 40px;
        padding-bottom: 50px;
    }
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__text-block {
        font-size: 17px;
    }
    .page-news__category-card img {
        
    }
    .page-news__card-title {
        font-size: 20px;
    }
    .page-news__card-description {
        font-size: 15px;
    }
    .page-news__benefit-title {
        font-size: 22px;
    }
    .page-news__faq-qtext {
        font-size: 17px;
    }
}

/* Specific rule for hero image on screens up to 849px, overriding object-fit: cover */
@media (max-width: 849px) {
    .page-news__hero-image-wrapper img {
        object-fit: contain !important;
        aspect-ratio: unset !important;
        height: auto !important;
        max-height: 300px; /* Limit height to prevent image from being too tall */
    }
    .page-news__hero-content-wrapper {
        padding-top: 20px;
        padding-bottom: 40px;
    }
}

/* Mobile Devices (up to 768px) */
@media (max-width: 768px) {
    /* Hero Section */
    .page-news__hero-section {
        margin-bottom: 30px;
        padding-top: 10px;
    }
    .page-news__hero-image-wrapper {
        margin-bottom: 15px;
    }
    .page-news__hero-image-wrapper img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-news__hero-content-wrapper {
        padding-top: 15px;
        padding-bottom: 30px;
    }
    .page-news__main-title {
        font-size: clamp(24px, 7vw, 32px);
        margin-bottom: 15px;
    }
    .page-news__hero-description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    .page-news__cta-buttons {
        flex-direction: column !important;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        padding: 12px 20px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* General Section Styles */
    .page-news__container {
        padding: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-news__section-title {
        font-size: 28px;
        margin-bottom: 25px;
    }
    .page-news__text-block {
        font-size: 16px;
        text-align: left;
    }

    /* Category Cards Section */
    .page-news__categories-section {
        overflow-x: hidden; /* Prevent horizontal scroll from cards */
    }
    .page-news__grid-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__category-card img {
        
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-news__card-title {
        font-size: 18px;
        margin: 15px 15px 8px;
    }
    .page-news__card-description {
        font-size: 14px;
        padding: 0 15px;
        margin-bottom: 15px;
    }
    .page-news__btn-text {
        margin: 0 15px 15px;
        padding: 8px 15px;
        font-size: 14px;
    }

    /* Why Follow Section */
    .page-news__why-follow-section {
        padding: 40px 0;
    }
    .page-news__benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__benefit-item {
        padding: 20px;
    }
    .page-news__benefit-title {
        font-size: 20px;
    }
    .page-news__benefit-item p {
        font-size: 15px;
    }
    .page-news__cta-buttons--center {
        margin-top: 30px;
    }

    /* FAQ Section */
    .page-news__faq-section {
        padding: 40px 0;
    }
    .page-news__faq-list {
        margin: 20px auto 0;
    }
    details.page-news__faq-item summary.page-news__faq-question {
        padding: 15px;
    }
    .page-news__faq-qtext {
        font-size: 16px;
    }
    .page-news__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    details.page-news__faq-item .page-news__faq-answer {
        padding: 0 15px 15px;
    }
    .page-news p,
    .page-news li {
        font-size: 15px;
    }
    /* Ensure all images inside page-news are responsive */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
}