/* style/news.css */
/* BEM naming: page-news__element-name */
/* Color Palette:
   Primary: #11A84E
   Secondary: #22C768
   Button: linear-gradient(180deg, #2AD16F 0%, #13994A 100%)
   Card BG: #11271B
   Background: #08160F
   Text Main: #F2FFF6
   Text Secondary: #A7D9B8
   Border: #2E7A4E
   Glow: #57E38D
   Gold: #F2C14E
   Divider: #1E3A2A
   Deep Green: #0A4B2C
*/

.page-news {
    background-color: var(--bg-color, #08160F); /* Fallback to a dark background */
    color: var(--text-main-color, #F2FFF6); /* Fallback to light text */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

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

.page-news__section {
    padding: 60px 0;
    text-align: center;
}

.page-news__section-title {
    font-size: 2.5em;
    color: var(--text-main-color, #F2FFF6);
    margin-bottom: 30px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.page-news__subsection-title {
    font-size: 1.8em;
    color: var(--text-main-color, #F2FFF6);
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 600;
}

.page-news__text-block {
    font-size: 1.1em;
    color: var(--text-secondary-color, #A7D9B8);
    margin-bottom: 20px;
    text-align: left;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; /* Limit height for hero image */
}

.page-news__hero-content {
    position: relative; 
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(rgba(8, 22, 15, 0.8), rgba(8, 22, 15, 0.8)); /* Semi-transparent overlay for text readability */
    border-radius: 8px;
    margin-top: -100px; /* Pull content up slightly over the image for visual effect, but not overlaying text */
}

.page-news__main-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive H1 font size */
    color: var(--text-main-color, #F2FFF6);
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 0.5px;
    max-width: 600px; /* Constrain H1 width */
    margin-left: auto;
    margin-right: auto;
}

.page-news__hero-description {
    font-size: 1.2em;
    color: var(--text-secondary-color, #A7D9B8);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button */
.page-news__cta-button {
    display: inline-block;
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #F2FFF6;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__cta-button:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.page-news__cta-button--centered {
    margin: 30px auto;
    display: block;
    width: fit-content;
}

/* List Styles */
.page-news__list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.page-news__list-item {
    background-color: var(--card-bg-color, #11271B);
    border-left: 4px solid var(--primary-color, #11A84E);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    color: var(--text-secondary-color, #A7D9B8);
    font-size: 1.05em;
}

.page-news__list-item strong {
    color: var(--text-main-color, #F2FFF6);
}

/* News Grid */
.page-news__news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.page-news__news-card {
    background-color: var(--card-bg-color, #11271B);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-news__news-card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

.page-news__news-card-title {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__news-card-title a {
    color: var(--text-main-color, #F2FFF6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__news-card-title a:hover {
    color: var(--primary-color, #11A84E);
}

.page-news__news-card-date {
    font-size: 0.9em;
    color: var(--text-secondary-color, #A7D9B8);
    margin-bottom: 15px;
}

.page-news__news-card-excerpt {
    font-size: 1em;
    color: var(--text-secondary-color, #A7D9B8);
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-news__read-more {
    display: inline-block;
    color: var(--primary-color, #11A84E);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    align-self: flex-start; /* Align to the start of the flex container */
}

.page-news__read-more:hover {
    color: var(--secondary-color, #22C768);
    text-decoration: underline;
}

/* FAQ Section */
.page-news__faq-list {
    margin-top: 40px;
    text-align: left;
}

.page-news__faq-item {
    background-color: var(--card-bg-color, #11271B);
    border: 1px solid var(--border-color, #2E7A4E);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.page-news__faq-item[open] {
    background-color: var(--deep-green-color, #0A4B2C); /* Slightly darker when open */
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.15em;
    color: var(--text-main-color, #F2FFF6);
    position: relative;
    list-style: none; /* Remove default summary marker */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.page-news__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker in WebKit browsers */
}

.page-news__faq-qtext {
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--primary-color, #11A84E);
    transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Change + to X or similar */
    color: var(--secondary-color, #22C768);
}

.page-news__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--text-secondary-color, #A7D9B8);
    text-align: left;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-news__section-title {
        font-size: 2em;
    }

    .page-news__subsection-title {
        font-size: 1.6em;
    }

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

    .page-news__main-title {
        font-size: clamp(2em, 4.5vw, 3em);
    }

    .page-news__hero-description {
        font-size: 1.1em;
    }

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

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

    .page-news__container {
        padding: 0 15px; /* Add padding for mobile containers */
    }

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .page-news__subsection-title {
        font-size: 1.4em;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .page-news__text-block {
        font-size: 1em;
    }

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

    .page-news__hero-image {
        max-height: 300px;
    }

    .page-news__hero-content {
        margin-top: -50px; /* Adjust pull-up for mobile */
        padding: 20px 10px;
    }

    .page-news__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
    }

    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Image containers responsiveness */
    .page-news__section,
    .page-news__news-card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Ensure content does not overflow */
    }

    /* Video responsiveness (if any) */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-news__video-section {
        padding-top: 10px !important; /* Small top padding for video section */
    }

    /* Button responsiveness */
    .page-news__cta-button,
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__cta-wrapper,
    .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__cta-wrapper {
        display: flex; /* Ensure flex context for centered button */
        flex-direction: column; /* Stack buttons vertically */
        align-items: center;
    }

    .page-news__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }

    .page-news__faq-answer {
        padding: 0 20px 15px 20px;
    }
}