/* style/news.css */

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

.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-main-color); /* Default text color for dark background */
    background-color: var(--bg-dark-color); /* Default background from shared.css */
}

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

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

.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;
    filter: brightness(0.8); /* Allow subtle brightness for background image */
}

.page-news__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text readability */
    border-radius: 10px;
}

.page-news__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--gold-color);
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(87, 227, 141, 0.5);
}

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

.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: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
    width: auto; /* Default for desktop */
}

.page-news__btn-primary {
    background: var(--button-gradient);
    color: var(--text-main-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(17, 168, 78, 0.4);
}

.page-news__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(17, 168, 78, 0.6);
    opacity: 0.9;
}

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--glow-color);
    border: 2px solid var(--glow-color);
    box-shadow: 0 5px 15px rgba(87, 227, 141, 0.2);
}

.page-news__btn-secondary:hover {
    transform: translateY(-3px);
    background-color: var(--glow-color);
    color: var(--bg-dark-color);
    box-shadow: 0 8px 20px rgba(87, 227, 141, 0.4);
}

.page-news__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(87, 227, 141, 0.3);
}

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

.page-news__intro-section,
.page-news__analysis-section,
.page-news__guides-section,
.page-news__cta-section {
    padding: 60px 0;
    background-color: var(--bg-dark-color);
    color: var(--text-main-color);
}

.page-news__highlights-section,
.page-news__latest-news-section,
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--card-bg-color);
    color: var(--text-main-color);
}

.page-news__dark-bg {
  background-color: var(--bg-dark-color);
  color: var(--text-main-color);
}

.page-news__light-bg {
  background-color: var(--card-bg-color);
  color: var(--text-main-color);
}

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

.page-news__highlight-card,
.page-news__news-card {
    background-color: var(--card-bg-color);
    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;
    border: 1px solid var(--border-color);
    color: var(--text-main-color);
    display: flex;
    flex-direction: column;
}

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

.page-news__card-title {
    font-size: 1.4rem;
    color: var(--glow-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news__highlight-card p {
    font-size: 0.95rem;
    color: var(--text-secondary-color);
    line-height: 1.6;
    flex-grow: 1;
}

.page-news__highlight-card a {
    color: var(--gold-color);
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    display: inline-block;
    transition: color 0.3s ease;
}

.page-news__highlight-card a:hover {
    color: var(--glow-color);
}

.page-news__analysis-image,
.page-news__guides-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: block;
}

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

.page-news__news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--divider-color);
}

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

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

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

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

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

.page-news__news-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary-color);
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-news__read-more {
    color: var(--gold-color);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: color 0.3s ease;
    align-self: flex-start;
}

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

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

.page-news__faq-list {
    margin-top: 40px;
}

.page-news__faq-item {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    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.15rem;
    font-weight: bold;
    color: var(--text-main-color);
    cursor: pointer;
    background-color: var(--deep-green-color);
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

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

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

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

.page-news__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1rem;
    color: var(--text-secondary-color);
    line-height: 1.7;
    background-color: var(--card-bg-color);
}

.page-news__cta-section .page-news__description {
    margin-bottom: 30px;
}

/* --- Responsive Design --- */

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

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

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

    .page-news__section-title {
        font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    }

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

    .page-news__highlight-card p,
    .page-news__news-excerpt {
        font-size: 0.9rem;
    }

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

    .page-news__faq-answer {
        padding: 10px 20px 15px;
        font-size: 0.95rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__hero-section {
        padding-bottom: 40px;
        padding-top: 10px !important; /* body handles --header-offset, small value here */
    }

    .page-news__hero-content {
        padding: 10px;
    }

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

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

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

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1rem;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

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

    .page-news__news-image {
        height: 180px;
    }

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

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

    .page-news__faq-question {
        font-size: 1rem;
        padding: 12px 18px;
    }

    .page-news__faq-toggle {
        font-size: 1.5rem;
    }

    .page-news__faq-answer {
        padding: 10px 18px 15px;
        font-size: 0.9rem;
    }

    /* Mobile image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__hero-image-wrapper,
    .page-news__highlights-section,
    .page-news__news-section,
    .page-news__analysis-section,
    .page-news__guides-section,
    .page-news__faq-section,
    .page-news__cta-section,
    .page-news__highlight-card,
    .page-news__news-card,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Ensure no horizontal scroll */
    }

    .page-news__news-content,
    .page-news__highlight-card {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__view-all-button {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

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

    .page-news__btn-primary,
    .page-news__btn-secondary {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .page-news__section-title {
        font-size: clamp(1.3rem, 6vw, 1.8rem);
    }

    .page-news__news-image {
        height: 150px;
    }

    .page-news__news-title {
        font-size: 1.1rem;
    }

    .page-news__faq-question {
        font-size: 0.95rem;
    }
}