/* style/news.css */

/* Base styles for the news page */
.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 (#0a0a0a) */
}

.page-news__section {
    padding: 60px 20px;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
}

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

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

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    box-sizing: border-box;
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.6); /* Darken image for better text contrast */
}

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    z-index: 0;
}

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

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

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

/* CTA Button Base */
.page-news__cta-button {
    display: inline-block;
    background-color: #26A9E0;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-news__cta-button:hover {
    background-color: #1a7bb0;
    transform: translateY(-2px);
}

.page-news__cta-button--inverted {
    background-color: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-news__cta-button--inverted:hover {
    background-color: #f0f0f0;
    color: #1a7bb0;
    border-color: #1a7bb0;
}

/* Latest Articles Section */
.page-news__latest-articles {
    background-color: #0d0d0d; /* Slightly lighter dark background for contrast */
}

.page-news__articles-grid {
    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.05); /* Semi-transparent 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 25px rgba(0, 0, 0, 0.3);
}

.page-news__article-image {
    width: 100%;
    height: 220px; /* 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.5em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-title a {
    color: #26A9E0; /* Brand color for article titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #1a7bb0;
}

.page-news__article-meta {
    font-size: 0.9em;
    color: #aaaaaa;
    margin-bottom: 15px;
}

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

.page-news__read-more-button {
    display: inline-block;
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-news__read-more-button:hover {
    color: #1a7bb0;
    text-decoration: underline;
}

.page-news__view-more {
    text-align: center;
    margin-top: 50px;
}

/* Featured Article Section */
.page-news__featured-article {
    background-color: #1a1a1a; /* Darker background for featured section */
}

.page-news__featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
    display: block; /* Ensure it behaves as a block element */
}

.page-news__article-detail p {
    font-size: 1.1em;
    color: #e0e0e0;
    margin-bottom: 20px;
    line-height: 1.7;
}

/* FAQ Section */
.page-news__faq-section {
    background-color: #0a0a0a; /* Same as body background */
}

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

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly visible background for FAQ items */
    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;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    transition: background-color 0.3s ease;
}

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

.page-news__faq-question h3 {
    margin: 0;
    color: inherit; /* Inherit color from parent */
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #26A9E0; /* Brand color for toggle icon */
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    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 value for smooth transition */
    padding: 20px !important;
    padding-top: 0 !important; /* Adjust padding to look better */
}

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

/* Call to Action Section */
.page-news__cta-section {
    text-align: center;
    background-color: #26A9E0; /* Brand color background */
    color: #ffffff;
}

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

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

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

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-news__btn-primary {
    background-color: #EA7C07; /* Login color for primary CTA */
    color: #ffffff;
}

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

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

.page-news__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #f0f0f0;
}

/* Responsive Styles */
@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__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-news__article-title {
        font-size: 1.3em;
    }
    .page-news__cta-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        height: 500px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure content is below fixed header on mobile */
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section {
        padding: 40px 15px;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 1em;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr; /* Stack articles vertically */
    }
    .page-news__article-image {
        height: 200px;
    }
    .page-news__cta-title {
        font-size: 1.8em;
    }
    .page-news__cta-description {
        font-size: 1em;
    }
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }
    .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;
    }
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper,
    .page-news__section,
    .page-news__card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .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;
    }
}

@media (max-width: 480px) {
    .page-news__hero-section {
        height: 400px;
    }
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }
    .page-news__faq-question {
        font-size: 1em;
        padding: 15px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
      padding: 15px !important;
      padding-top: 0 !important;
    }
}

/* Ensure no filter on images */
.page-news img {
    filter: none;
}