/* style/news.css */

/* Base styles for the page-news scope */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #ffffff); /* Inherit from shared or default to white */
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: #ffffff;
}

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

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: 2;
}

.page-news__hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 20px;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-news__hero-cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* General Section Styles */
.page-news__section {
    padding: 60px 20px;
    background-color: var(--background-color, #ffffff);
}

.page-news__dark-section {
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-news__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand primary color for titles on light background */
    text-align: center;
    margin-bottom: 20px;
}

.page-news__dark-section .page-news__section-title {
    color: #ffffff; /* White for titles on dark background */
}

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

.page-news__sub-title {
    font-size: 1.8em;
    color: #017439;
    margin-bottom: 20px;
}

.page-news__dark-section .page-news__sub-title {
    color: #ffffff;
}

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

.page-news__article-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

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

.page-news__article-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-news__article-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #005a2d;
}

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 20px;
}

.page-news__read-more-prompt {
    text-align: center;
    margin-top: 40px;
    font-size: 1.1em;
}

/* Content Flex (for Guides and Community sections) */
.page-news__content-flex {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-news__content-flex--reverse {
    flex-direction: row-reverse;
}

.page-news__text-block {
    flex: 1;
    min-width: 300px;
}

.page-news__image-block {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-news__content-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block; /* Ensure no extra space below image */
}

/* Feature Grid (for Security section) */
.page-news__feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.page-news__feature-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #333333;
}

.page-news__feature-icon {
    width: 200px; /* Min size */
    height: 200px; /* Min size */
    object-fit: contain;
    margin-bottom: 20px;
}

.page-news__feature-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
}

.page-news__security-prompt {
    text-align: center;
    margin-top: 40px;
    font-size: 1.1em;
}

/* Call to Action Bottom */
.page-news__cta-bottom {
    background-color: #017439;
    color: #ffffff;
    text-align: center;
}

.page-news__cta-content {
    padding: 40px 15px;
}

.page-news__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-news__cta-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__btn-text {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
}

.page-news__btn-primary {
    background-color: #C30808; /* Custom Register/Login color */
    color: #FFFF00; /* Custom Register/Login font color */
    border: 2px solid #C30808;
}

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

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

.page-news__hero-section .page-news__btn-secondary {
    color: #ffffff;
    border-color: #ffffff;
}

.page-news__dark-section .page-news__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border-color: #ffffff;
}

.page-news__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.page-news__dark-section .page-news__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #017439;
}

.page-news__btn-text {
    background: none;
    border: none;
    color: #017439;
    padding: 0;
    text-decoration: underline;
    font-size: 1em;
}

.page-news__btn-text:hover {
    color: #005a2d;
}

.page-news__inline-link {
    color: #017439;
    text-decoration: underline;
}

.page-news__dark-section .page-news__inline-link,
.page-news__hero-section .page-news__inline-link,
.page-news__cta-bottom .page-news__inline-link {
    color: #FFFF00; /* Yellow for links on dark background */
}

.page-news__inline-link:hover {
    color: #005a2d;
}

.page-news__dark-section .page-news__inline-link:hover,
.page-news__hero-section .page-news__inline-link:hover,
.page-news__cta-bottom .page-news__inline-link:hover {
    color: #f0f000;
}

/* FAQ Section */
.page-news__faq {
    background-color: #f9f9f9;
}

.page-news__faq-list {
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.page-news__faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.page-news__faq-question:hover {
    color: #017439;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(0deg); /* '+' becomes '-' */
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 15px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Ensure it expands sufficiently */
    padding: 15px;
}

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

.page-news__faq-answer .page-news__btn-primary,
.page-news__faq-answer .page-news__btn-secondary {
    margin-top: 10px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__cta-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__hero-section {
        height: 500px;
    }
    .page-news__hero-title {
        font-size: 2.5em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__hero-cta-group {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-news__hero-cta-group .page-news__btn-primary,
    .page-news__hero-cta-group .page-news__btn-secondary {
        margin: 0 auto;
    }

    .page-news__section {
        padding: 40px 15px;
    }
    .page-news__container {
        padding: 0 15px;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 0.95em;
    }
    .page-news__sub-title {
        font-size: 1.5em;
    }

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

    .page-news__content-flex {
        flex-direction: column;
        gap: 30px;
    }
    .page-news__content-flex--reverse {
        flex-direction: column; /* Still column on mobile */
    }

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

    .page-news__cta-title {
        font-size: 2em;
    }
    .page-news__cta-description {
        font-size: 1em;
    }

    /* Mobile image/video/button responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper,
    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Ensure no overflow */
    }
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
    }
    .page-news__video-section {
        padding-top: var(--header-offset, 120px) !important; /* Re-apply for mobile */
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 2em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__cta-title {
        font-size: 1.8em;
    }
}