/* style/news.css */

/* Base styles for the news page */
.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 set explicitly */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #ffffff;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-news__paragraph {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.8;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    min-height: 500px;
    padding: 100px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    overflow: hidden;
    background-color: #017439; /* Fallback */
}

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

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4; /* To ensure text readability */
    filter: none; /* No filter on images */
}

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

.page-news__main-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff;
}

.page-news__intro-text {
    font-size: 1.3em;
    margin-bottom: 30px;
    line-height: 1.7;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-news__btn-primary {
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color */
    border: 2px solid #C30808;
    margin-right: 15px;
}

.page-news__btn-primary:hover {
    background-color: #a30606;
    color: #ffea00;
}

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

.page-news__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
}

/* Content Sections */
.page-news__content-section,
.page-news__regulations-section,
.page-news__expert-tips-section,
.page-news__cta-section {
    padding: 80px 0;
}

.page-news__dark-bg {
    background-color: #0d0d0d; /* Slightly darker than body for contrast */
    color: #ffffff;
}

.page-news__highlights-section {
    padding: 80px 0;
    background-color: #1a1a1a;
    color: #ffffff;
}

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

.page-news__card {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white for cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    color: #ffffff; /* Card text color */
}

.page-news__card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    filter: none; /* No filter on images */
}

.page-news__card-title {
    font-size: 1.5em;
    margin: 20px 20px 10px 20px;
    font-weight: bold;
}

.page-news__card-title a {
    color: #FFFF00; /* Link color for card titles */
    text-decoration: none;
}

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

.page-news__card-text {
    font-size: 1em;
    padding: 0 20px 20px 20px;
    flex-grow: 1;
}

.page-news__view-more {
    display: block;
    width: fit-content;
    margin: 40px auto 0 auto;
    border: 2px solid #017439;
    color: #017439;
    background-color: #ffffff;
}

.page-news__view-more:hover {
    background-color: #017439;
    color: #ffffff;
}

/* Trends Section */
.page-news__trends-section {
    padding: 80px 0;
    background-color: #1a1a1a;
    color: #ffffff;
}

.page-news__trend-item {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    gap: 40px;
}

.page-news__trend-item:last-of-type {
    margin-bottom: 0;
}

.page-news__trend-item--reverse {
    flex-direction: row-reverse;
}

.page-news__trend-image {
    width: 50%;
    border-radius: 10px;
    object-fit: cover;
    filter: none; /* No filter on images */
}

.page-news__trend-content {
    width: 50%;
}

.page-news__trend-title {
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFF00; /* Highlight color for trend titles */
}

.page-news__download-app {
    display: block;
    width: fit-content;
    margin: 60px auto 0 auto;
    background-color: #017439;
    color: #ffffff;
    border: 2px solid #017439;
}

.page-news__download-app:hover {
    background-color: #005a2d;
}

/* Expert Tips Section */
.page-news__tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__tip-card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for tips */
    border-left: 5px solid #017439;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.page-news__tip-title {
    font-size: 1.6em;
    margin-bottom: 15px;
    font-weight: bold;
    color: #FFFF00; /* Highlight color for tip titles */
}

.page-news__tip-text {
    font-size: 1em;
}

.page-news__affiliate-program {
    display: block;
    width: fit-content;
    margin: 60px auto 0 auto;
    background-color: #C30808;
    color: #FFFF00;
    border: 2px solid #C30808;
}

.page-news__affiliate-program:hover {
    background-color: #a30606;
    color: #ffea00;
}


/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #1a1a1a;
    color: #ffffff;
}

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

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    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-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

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

.page-news__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    color: #FFFF00; /* Highlight for toggle icon */
}

.page-news__faq-answer {
    padding: 20px;
    font-size: 1em;
    line-height: 1.7;
    background-color: rgba(255, 255, 255, 0.02);
    color: #f0f0f0;
}

/* Call to Action Section */
.page-news__cta-section {
    background-color: #017439; /* Brand color background */
    color: #ffffff;
    text-align: center;
    padding: 60px 0;
}

.page-news__cta-content {
    max-width: 800px;
}

.page-news__cta-section .page-news__section-title {
    color: #ffffff;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }
    .page-news__intro-text {
        font-size: 1.1em;
    }
    .page-news__trend-item {
        flex-direction: column;
        gap: 20px;
    }
    .page-news__trend-item--reverse {
        flex-direction: column;
    }
    .page-news__trend-image,
    .page-news__trend-content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
        min-height: 400px;
    }
    .page-news__main-title {
        font-size: 2.2em;
    }
    .page-news__intro-text {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }
    .page-news__paragraph {
        font-size: 0.95em;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        filter: none !important; /* Ensure no filter */
    }
    /* Content area images must not be smaller than 200px */
    .page-news__card-image,
    .page-news__trend-image {
        min-width: 200px !important;
        min-height: 200px !important;
    }
    .page-news__hero-image {
        min-width: 100% !important; /* hero image should fill width */
        min-height: 200px !important;
    }

    /* Videos responsiveness (no videos in HTML, but for future proofing) */
    .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;
    }

    /* Buttons responsiveness */
    .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; /* Ensure buttons take full width */
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px; /* Adjust padding for mobile */
        margin-right: 0 !important; /* Remove right margin for stacking */
    }
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px; /* Space between stacked buttons */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__cta-section .page-news__btn-primary,
    .page-news__cta-section .page-news__btn-secondary {
        width: 100%; /* Full width for CTA buttons on mobile */
    }
    .page-news__view-more,
    .page-news__download-app,
    .page-news__affiliate-program {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .page-news__container {
        padding: 0 15px; /* Adjust container padding for mobile */
    }
    .page-news__content-section,
    .page-news__regulations-section,
    .page-news__expert-tips-section,
    .page-news__cta-section,
    .page-news__highlights-section,
    .page-news__faq-section {
        padding: 40px 0; /* Adjust section padding for mobile */
    }

    .page-news__grid,
    .page-news__tips-grid {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }
    .page-news__card-title,
    .page-news__tip-title {
        font-size: 1.3em;
    }
    .page-news__faq-question {
        font-size: 1.1em;
        padding: 15px;
    }
    .page-news__faq-answer {
        font-size: 0.9em;
        padding: 15px;
    }
}