/* style/news.css */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --card-bg: #11271B;
    --background-color: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

.page-news {
    font-family: Arial, sans-serif;
    color: var(--text-main); /* Default text color for the page */
    background-color: var(--background-color);
}

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

.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--background-color);
    overflow: hidden;
}

.page-news__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
}

.page-news__hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    color: var(--text-main);
}

.page-news__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.page-news__hero-description {
    font-size: 1.15rem;
    margin-bottom: 30px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.page-news__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 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: var(--button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-news__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
}

.page-news__btn-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

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

.page-news__latest-articles {
    padding: 80px 0;
    background-color: var(--background-color);
}

.page-news__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-main);
}

.page-news__section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-secondary);
}

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

.page-news__article-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--text-main);
}

.page-news__article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

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

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

.page-news__article-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

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

.page-news__article-title a:hover {
    color: var(--secondary-color);
}

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

.page-news__article-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

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

.page-news__read-more:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

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

.page-news__categories-section {
    padding: 80px 0;
    background-color: var(--deep-green);
    text-align: center;
}

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

.page-news__category-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__category-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
}

.page-news__category-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
}

.page-news__featured-article {
    padding: 80px 0;
    background-color: var(--background-color);
}

.page-news__featured-content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 40px;
}

.page-news__featured-image {
    width: 600px;
    height: 338px; /* 16:9 aspect ratio for 600px width */
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    display: block;
}

.page-news__featured-text {
    flex: 1;
    color: var(--text-main);
}

.page-news__featured-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
    line-height: 1.3;
}

.page-news__featured-excerpt {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.page-news__faq-section {
    padding: 80px 0;
    background-color: var(--deep-green);
}

.page-news__faq-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-news__faq-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: var(--text-main);
}

.page-news__faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    transition: background-color 0.3s ease;
}

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

.page-news__faq-item summary:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.page-news__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
    color: var(--secondary-color);
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    padding: 0 25px 25px;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.page-news__cta-bottom {
    padding: 80px 20px;
    text-align: center;
    background-color: var(--background-color);
}

.page-news__cta-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
}

.page-news__cta-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--text-secondary);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__featured-content {
        flex-direction: column;
        align-items: center;
    }

    .page-news__featured-image {
        width: 100%;
        height: auto;
        max-width: 800px;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-articles,
    .page-news__categories-section,
    .page-news__featured-article,
    .page-news__faq-section,
    .page-news__cta-bottom {
        padding-left: 15px;
        padding-right: 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-news__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
    }

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

    .page-news__hero-description {
        font-size: 1rem;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .page-news__section-title {
        font-size: 2rem;
    }

    .page-news__section-subtitle {
        font-size: 0.9rem;
    }

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

    .page-news__article-image {
        height: 200px;
    }

    .page-news__article-title {
        font-size: 1.2rem;
    }

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

    .page-news__featured-image {
        width: 100%;
        height: auto;
    }

    .page-news__featured-title {
        font-size: 1.5rem;
    }

    .page-news__featured-excerpt {
        font-size: 1rem;
    }

    .page-news__faq-item summary {
        font-size: 1rem;
        padding: 20px;
    }

    .page-news__faq-answer {
        font-size: 0.9rem;
        padding: 0 20px 20px;
    }

    .page-news__cta-title {
        font-size: 2rem;
    }

    .page-news__cta-description {
        font-size: 1rem;
    }

    /* Image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Content area images must be at least 200px wide, no smaller */
    .page-news__article-image, 
    .page-news__category-icon, 
    .page-news__featured-image {
        min-width: 200px !important;
        min-height: 150px !important; /* Adjust height based on aspect ratio to be at least 200px in one dimension */
    }
    .page-news__category-icon {
        min-width: 80px !important;
        min-height: 80px !important;
    }
}

@media (max-width: 480px) {
    .page-news__hero-section,
    .page-news__latest-articles,
    .page-news__categories-section,
    .page-news__featured-article,
    .page-news__faq-section,
    .page-news__cta-bottom {
        padding-left: 10px;
        padding-right: 10px;
    }

    .page-news__main-title {
        font-size: clamp(1.8rem, 9vw, 2.2rem);
    }

    .page-news__section-title {
        font-size: 1.8rem;
    }

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