/* style/news.css */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: #1a1a1a; /* Inherited from body or default for page content */
}

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

/* Hero Section */
.page-news__hero-section {
    background-color: #017439; /* Primary brand color */
    color: #ffffff;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.page-news__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-news__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__read-more-link,
.page-news__video-overlay-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

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

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

.page-news__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005a2e;
    border-color: #005a2e;
}

.page-news__read-more-link {
    background-color: transparent;
    color: #017439;
    border: 2px solid transparent;
    padding: 8px 0;
    display: block;
    width: fit-content;
}

.page-news__read-more-link:hover {
    text-decoration: underline;
    color: #005a2e;
}

/* Sections */
.page-news__section-title {
    font-size: 2.2em;
    margin-bottom: 20px;
    text-align: center;
    color: inherit; /* Inherit from parent section's color */
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__light-bg {
    background-color: #ffffff;
    color: #333333;
    padding: 60px 0;
}

.page-news__dark-bg {
    background-color: #017439;
    color: #ffffff;
    padding: 60px 0;
}

/* Featured Articles Grid */
.page-news__articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-news__article-card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg, or solid on light bg */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    color: #ffffff; /* Default for dark bg */
}

.page-news__light-bg .page-news__article-card {
    background-color: #f9f9f9;
    color: #333333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-news__article-card:hover {
    transform: translateY(-5px);
}

.page-news__article-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

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

.page-news__article-title {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.page-news__article-title a {
    color: inherit;
    text-decoration: none;
}

.page-news__article-title a:hover {
    text-decoration: underline;
}

.page-news__article-excerpt {
    font-size: 0.95em;
    margin-bottom: 15px;
}

/* Guides & Tips */
.page-news__guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-news__guide-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-news__guide-title {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.page-news__guide-text {
    font-size: 1em;
    margin-bottom: 20px;
}

/* Analysis Section */
.page-news__analysis-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.page-news__analysis-image {
    flex: 1;
    min-width: 300px;
    border-radius: 8px;
    object-fit: cover;
    width: 100%;
    height: auto;
}

.page-news__analysis-text {
    flex: 2;
}

.page-news__analysis-subtitle {
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 15px;
}

.page-news__analysis-paragraph {
    margin-bottom: 15px;
}

/* Community Section */
.page-news__community-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-direction: row-reverse; /* Image on right */
}

.page-news__community-image {
    flex: 1;
    min-width: 300px;
    border-radius: 8px;
    object-fit: cover;
    width: 100%;
    height: auto;
}

.page-news__community-text {
    flex: 2;
}

.page-news__community-subtitle {
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 15px;
}

.page-news__community-paragraph {
    margin-bottom: 15px;
}

/* Video Section */
.page-news__video-section {
    text-align: center;
}

.page-news__video-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px; /* Max width for video container */
    margin: 0 auto 30px auto;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-news__video {
    width: 100%;
    height: auto;
    display: block;
}

.page-news__video-overlay-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 50px;
    text-decoration: none;
    z-index: 10;
    border: none;
}

.page-news__video-overlay-button:hover {
    background-color: #a00606;
}

/* FAQ Section */
.page-news__faq-list {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 20px;
}

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #ffffff;
}

.page-news__faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    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(255, 255, 255, 0.15);
}

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

.page-news__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
}

.page-news__faq-answer {
    padding: 0 20px 20px 20px;
    font-size: 1em;
    color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__analysis-content,
    .page-news__community-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .page-news__analysis-text,
    .page-news__community-text {
        flex: none;
        width: 100%;
    }
    .page-news__analysis-image,
    .page-news__community-image {
        margin-bottom: 30px;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile offset */
    }
    .page-news__video-section {
        padding-top: var(--header-offset, 120px) !important; /* Video section also needs offset */
    }
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description,
    .page-news__section-description,
    .page-news__article-excerpt,
    .page-news__guide-text,
    .page-news__analysis-paragraph,
    .page-news__community-paragraph,
    .page-news__faq-answer p {
        font-size: 0.95em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__article-card,
    .page-news__guide-item,
    .page-news__faq-item,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Images responsive */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    /* Video responsive */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    /* Buttons responsive */
    .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;
        margin-bottom: 10px; /* Add some space between stacked buttons */
    }
    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        flex-direction: column !important;
        gap: 10px;
    }
    .page-news__video-overlay-button {
        position: static;
        transform: none;
        margin-top: 20px;
        display: block;
        width: calc(100% - 30px);
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.5em;
    }
    .page-news__section-title {
        font-size: 1.3em;
    }
    .page-news__article-title {
        font-size: 1.2em;
    }
    .page-news__guide-title {
        font-size: 1.3em;
    }
    .page-news__faq-item summary {
        font-size: 1em;
    }
}