/* style/news.css */

/* Variables from custom color palette */
:root {
    --color-primary: #11A84E;
    --color-secondary: #22C768;
    --color-button-gradient-start: #2AD16F;
    --color-button-gradient-end: #13994A;
    --color-card-bg: #11271B;
    --color-background: #08160F;
    --color-text-main: #F2FFF6;
    --color-text-secondary: #A7D9B8;
    --color-border: #2E7A4E;
    --color-glow: #57E38D;
    --color-gold: #F2C14E;
    --color-divider: #1E3A2A;
    --color-deep-green: #0A4B2C;
}

/* Base styles for the page-news scope */
.page-news {
    background-color: var(--color-background); /* Dark background */
    color: var(--color-text-main); /* Light text for dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Ensure all images are responsive by default */
.page-news img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Containers for main content */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Add horizontal padding for smaller screens */
    box-sizing: border-box;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    text-align: center;
    overflow: hidden; /* Ensure content doesn't overflow */
    padding-bottom: 40px; /* Space between hero and next section */
    padding-top: 10px; /* Small top padding, body handles --header-offset */
}

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

.page-news__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    min-height: 200px; /* Minimum size requirement */
}

.page-news__hero-content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 20px 0;
    box-sizing: border-box;
}

.page-news__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
    color: var(--color-gold); /* Gold color for main title */
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.2;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button Styles */
.page-news__cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background: var(--color-button-gradient-start); /* Linear gradient start */
    background-image: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
    color: var(--color-text-main);
    border: 2px solid transparent;
}

.page-news__btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background: var(--color-card-bg); /* Use card background for secondary */
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    margin-left: 15px; /* Spacing for multiple buttons */
}

.page-news__btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-text-main);
}

.page-news__cta-buttons-group {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center;
    gap: 15px; /* Space between buttons */
    margin-top: 30px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Latest News Section */
.page-news__latest-news-section {
    padding: 60px 0;
    background-color: var(--color-card-bg); /* Darker background for news section */
    border-top: 1px solid var(--color-divider);
}

.page-news__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

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

.page-news__news-card {
    background-color: var(--color-background);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
}

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

.page-news__news-image-wrapper {
    width: 100%;
    height: 220px; /* Fixed height for consistent card images */
    overflow: hidden;
}

.page-news__news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.page-news__news-card:hover .page-news__news-image {
    transform: scale(1.05);
}

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

.page-news__news-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-news__news-title a:hover {
    color: var(--color-primary);
}

.page-news__news-meta {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.page-news__news-excerpt {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.page-news__read-more-link {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
    color: var(--color-gold);
}

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

/* About Section */
.page-news__about-section {
    padding: 60px 0;
    background-color: var(--color-background);
    border-top: 1px solid var(--color-divider);
}

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

.page-news__about-text {
    flex: 1;
    min-width: 300px;
    color: var(--color-text-secondary);
}

.page-news__about-text p {
    margin-bottom: 15px;
}

.page-news__about-text .page-news__cta-button {
    margin-top: 20px;
}

.page-news__about-image-wrapper {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.page-news__about-image {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    min-height: 200px; /* Minimum size requirement */
}

/* Promo CTA Section */
.page-news__promo-cta-section {
    padding: 60px 0;
    background-color: var(--color-card-bg);
    text-align: center;
    border-top: 1px solid var(--color-divider);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--color-background);
    border-top: 1px solid var(--color-divider);
}

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

.page-news__faq-item {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-text-main);
    cursor: pointer;
    background-color: var(--color-deep-green); /* Slightly different background for question */
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

.page-news__faq-item[open] .page-news__faq-question {
    background-color: var(--color-primary);
    color: var(--color-text-main);
}

.page-news__faq-question:hover {
    background-color: var(--color-primary);
}

.page-news__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--color-gold);
}

.page-news__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-news__faq-item[open] .page-news__faq-answer {
    max-height: 500px; /* Sufficiently large for content */
    padding: 15px 25px 20px;
}

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

/* More Info Section */
.page-news__more-info-section {
    padding: 60px 0;
    background-color: var(--color-card-bg);
    border-top: 1px solid var(--color-divider);
}

.page-news__text-block {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    font-size: 1rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-content-wrapper {
        padding: 15px;
    }

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

    .page-news__description {
        font-size: 1rem;
    }

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

    .page-news__about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .page-news__about-image-wrapper {
        order: -1; /* Image above text on smaller screens */
    }
}

@media (max-width: 768px) {
    /* Mobile specific overrides with !important */
    .page-news__container {
        padding: 0 15px;
    }

    .page-news__hero-section {
        padding-top: 10px !important; /* body handles --header-offset */
        padding-bottom: 30px;
    }

    .page-news__main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
        margin-bottom: 10px;
    }

    .page-news__description {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .page-news__section-title {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
        margin-bottom: 30px;
    }

    .page-news__news-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .page-news__news-card {
        margin: 0 auto; /* Center cards */
        max-width: 450px; /* Max width for single column cards */
    }

    .page-news__news-image-wrapper {
        height: 180px; /* Adjust image height for mobile cards */
    }

    .page-news__about-section,
    .page-news__latest-news-section,
    .page-news__promo-cta-section,
    .page-news__faq-section,
    .page-news__more-info-section {
        padding: 40px 0;
    }

    .page-news__about-text,
    .page-news__about-image-wrapper {
        min-width: unset;
        width: 100%;
    }

    .page-news__cta-buttons-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
    }

    .page-news__cta-button {
        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__btn-secondary {
        margin-left: 0; /* Remove left margin when stacked */
    }

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

    .page-news__faq-answer {
        padding: 0 20px 15px;
    }
    
    /* Ensure all images are responsive by default */
    .page-news img {
      max-width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    /* All containers that might hold images or content */
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-image-wrapper,
    .page-news__news-image-wrapper,
    .page-news__about-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Crucial for preventing overflow */
    }
}