/* style/news.css */

/* Base styles for the news page content */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Text color for dark body background */
    background-color: #000000; /* Assuming body background is black from shared.css */
    padding-top: var(--header-offset, 120px); /* Space for fixed header */
}

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

.page-news__section {
    padding: 60px 0;
    text-align: center;
}

.page-news__dark-section {
    background-color: #26A9E0; /* Brand main color for dark sections */
    color: #ffffff;
}

.page-news__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-news__section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffffff; /* Light text for section titles */
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    padding: 80px 20px;
    overflow: hidden;
    text-align: center;
    background-color: #000000; /* Ensure hero background is dark */
}

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

.page-news__hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4; /* Slightly dim the background image */
    display: block;
}

.page-news__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    color: #ffffff;
}

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

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

/* CTA Buttons */
.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
}

.page-news__btn-primary {
    background-color: #26A9E0; /* Brand main color */
    color: #ffffff;
    border: 2px solid #26A9E0;
}

.page-news__btn-primary:hover {
    background-color: #1e87b8;
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background-color: #ffffff;
    color: #26A9E0; /* Text color is brand main color */
    border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.page-news__cta-group {
    margin-top: 40px;
}

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

.page-news__news-card,
.page-news__promo-card,
.page-news__insight-card,
.page-news__community-card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for cards on dark background */
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff; /* Light text for card content */
}

.page-news__news-card:hover,
.page-news__promo-card:hover,
.page-news__insight-card:hover,
.page-news__community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__news-card img,
.page-news__promo-card img,
.page-news__insight-card img,
.page-news__community-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__card-content {
    padding: 25px;
}

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

.page-news__card-title a {
    color: #26A9E0; /* Brand main color for links in card title */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #ffffff; /* White on hover for contrast */
}

.page-news__card-text {
    font-size: 1em;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.page-news p,
.page-news li {
  color: #e0e0e0;
}

.page-news__read-more {
    display: inline-flex;
    align-items: center;
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: #ffffff;
}

.page-news__arrow {
    margin-left: 8px;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
    transform: translateX(5px);
}

/* FAQ Section */
.page-news__faq-list {
    max-width: 900px;
    margin: 40px auto 0;
    text-align: left;
}

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for FAQ items */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-news__faq-q-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
}

.page-news__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #26A9E0; /* Brand color for toggle icon */
}

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

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 15px 25px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Or change to '-' */
}

.page-news__faq-answer p {
    margin: 0;
    padding-bottom: 15px; /* Add padding to the last paragraph in answer */
}


/* Final CTA Section */
.page-news__cta-final .page-news__container {
    padding: 60px 20px;
    border-radius: 10px;
    background-color: #26A9E0; /* Brand main color for final CTA */
    color: #ffffff;
}

.page-news__cta-final .page-news__section-description {
    color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__hero-section {
        min-height: 400px;
        padding: 60px 20px;
    }
    .page-news__hero-title {
        font-size: 2.5em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__section {
        padding: 40px 0;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-news__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__news-card img,
    .page-news__promo-card img,
    .page-news__insight-card img,
    .page-news__community-card img {
        height: 200px; /* Adjust height for mobile */
    }

    /* Mobile image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__news-card,
    .page-news__promo-card,
    .page-news__insight-card,
    .page-news__community-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Add horizontal padding to containers to prevent content from touching edges */
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    /* Buttons responsive */
    .page-news__cta-button,
    .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 space between stacked buttons */
    }
    
    .page-news__cta-group {
        display: flex;
        flex-direction: column; /* Stack buttons vertically on mobile */
        align-items: center;
        gap: 10px; /* Space between buttons */
    }
    .page-news__cta-final .page-news__container {
        padding: 40px 15px;
    }
    .page-news__faq-question,
    .page-news__faq-answer {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px;
    }
}