/* style/news.css */

/* Base styles for the page content, ensuring light text on dark body background */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text for dark body background */
    background-color: transparent; /* Body background is handled by shared.css (#000000) */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

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

/* Section titles and descriptions */
.page-news__section-title {
    font-size: 2.5em;
    color: #26A9E0; /* Brand primary color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #f0f0f0; /* Slightly off-white for readability */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 80px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7); /* Dark overlay for hero content */
    overflow: hidden;
}

.page-news__hero-section .page-news__container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.page-news__hero-content {
    flex: 1;
    text-align: left;
}

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

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

.page-news__hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-news__hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background-color: #26A9E0; /* Primary brand color */
    color: #FFFFFF;
    border: 2px solid #26A9E0;
    margin-right: 15px;
}

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

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

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

/* Specific button colors */
.page-news__btn-register {
    background-color: #EA7C07; /* Login color for register */
    border-color: #EA7C07;
}
.page-news__btn-register:hover {
    background-color: #c46806;
    border-color: #c46806;
}

.page-news__btn-login {
    background-color: transparent;
    color: #EA7C07;
    border-color: #EA7C07;
}
.page-news__btn-login:hover {
    background-color: #EA7C07;
    color: #FFFFFF;
}


/* Categories Section */
.page-news__categories-section {
    padding: 60px 0;
    background-color: rgba(255, 255, 255, 0.05); /* Light background on dark body */
    color: #f0f0f0;
}

.page-news__categories-section .page-news__section-title {
    color: #26A9E0;
}

.page-news__categories-section .page-news__section-description {
    color: #f0f0f0;
}

.page-news__category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.page-news__category-item {
    display: inline-block;
    padding: 10px 25px;
    background-color: rgba(255, 255, 255, 0.1); /* Slightly lighter background for items */
    color: #FFFFFF;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-news__category-item:hover {
    background-color: #26A9E0;
    color: #FFFFFF;
    border-color: #26A9E0;
}

/* Articles Grid Section */
.page-news__articles-grid {
    padding: 60px 0;
    background-color: rgba(0, 0, 0, 0.8); /* Darker background for articles */
    color: #f0f0f0;
}

.page-news__articles-grid .page-news__section-title {
    color: #26A9E0;
}

.page-news__articles-grid .page-news__section-description {
    color: #f0f0f0;
}

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

.page-news__article-card {
    background-color: rgba(255, 255, 255, 0.08); /* Card background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

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

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

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

.page-news__article-title a:hover {
    color: #26A9E0;
}

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #cccccc;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-news__read-more-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #26A9E0;
    color: #FFFFFF;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    align-self: flex-start;
    transition: background-color 0.3s ease;
}

.page-news__read-more-btn:hover {
    background-color: #1a7fb3;
}

/* Deep Dive Section */
.page-news__deep-dive-section {
    padding: 60px 0;
    background-color: rgba(0, 0, 0, 0.7); /* Darker background */
    color: #f0f0f0;
}

.page-news__deep-dive-section .page-news__section-title {
    color: #26A9E0;
}

.page-news__deep-dive-section .page-news__section-description {
    color: #f0f0f0;
}

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

.page-news__deep-dive-card {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__deep-dive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

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

.page-news__deep-dive-title {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__deep-dive-title a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__deep-dive-title a:hover {
    color: #26A9E0;
}

.page-news__deep-dive-excerpt {
    font-size: 1em;
    color: #cccccc;
    margin-bottom: 0;
    flex-grow: 1;
}

.page-news__deep-dive-card .page-news__read-more-btn {
    margin-top: 20px; /* Space from excerpt */
}

/* Call to Action Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #26A9E0; /* Primary brand color for CTA */
    color: #FFFFFF;
}

.page-news__cta-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-news__cta-title {
    font-size: 2.8em;
    color: #FFFFFF;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

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


/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: rgba(255, 255, 255, 0.05); /* Light background on dark body */
    color: #f0f0f0;
}

.page-news__faq-section .page-news__section-title {
    color: #26A9E0;
}

.page-news__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.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.15); /* Slightly darker for question header */
    transition: background-color 0.3s ease;
}

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

.page-news__faq-question-text {
    font-size: 1.2em;
    color: #FFFFFF;
    margin: 0;
}

.page-news__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    color: #26A9E0;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Change + to X or rotate */
}

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

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

.page-news__faq-answer p {
    margin: 0;
    font-size: 1em;
    color: #cccccc;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__cta-title {
        font-size: 2.2em;
    }
    .page-news__article-image {
        height: 180px;
    }
    .page-news__deep-dive-image {
        height: 220px;
    }
}

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

    .page-news__container {
        padding: 0 15px;
    }

    .page-news__hero-section .page-news__container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .page-news__hero-content {
        text-align: center;
    }

    .page-news__hero-title {
        font-size: 2.5em;
        margin-bottom: 15px;
    }

    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-news__hero-image-wrapper {
        order: -1; /* Image above text on mobile */
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        margin-right: 0;
        margin-bottom: 15px; /* Stack buttons */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
    }

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

    /* Ensure content containers don't overflow */
    .page-news__section,
    .page-news__hero-section,
    .page-news__categories-section,
    .page-news__articles-grid,
    .page-news__deep-dive-section,
    .page-news__cta-section,
    .page-news__faq-section,
    .page-news__article-card,
    .page-news__deep-dive-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure hero section respects header offset on mobile */
    }

    .page-news__article-image,
    .page-news__deep-dive-image {
        height: auto; /* Allow height to adjust for mobile */
    }

    .page-news__article-list,
    .page-news__deep-dive-cards {
        grid-template-columns: 1fr;
    }

    .page-news__article-card,
    .page-news__deep-dive-card {
        margin-bottom: 20px;
    }

    .page-news__cta-title {
        font-size: 1.8em;
    }

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

    .page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-question-text {
        font-size: 1.1em;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
}