/* style/news.css */

/* General styles for the news page content */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #f0f0f0; /* Light text for dark body background */
    background-color: transparent; /* Inherit from body/shared.css */
}

/* 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 */
}

.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;
    color: #ffffff;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFD700; /* Gold for emphasis */
    line-height: 1.2;
}

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

.page-news__hero-cta {
    display: inline-block;
    padding: 15px 30px;
    background-color: #FFD700;
    color: #0A1931;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-news__hero-cta:hover {
    background-color: #e6c200;
}

/* Section general styles */
.page-news__section {
    padding: 60px 0;
    background-color: #1a2a44; /* Slightly lighter dark background for sections */
}

.page-news__dark-section {
    background-color: #0A1931;
    color: #ffffff;
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #FFD700;
    text-align: center;
    margin-bottom: 20px;
}

.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;
}

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

.page-news__article-card {
    background-color: #0A1931;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    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: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__article-content {
    padding: 25px;
    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: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

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

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

.page-news__read-more span {
    margin-left: 5px;
    transition: margin-left 0.3s ease;
}

.page-news__read-more:hover span {
    margin-left: 10px;
}

/* Pagination */
.page-news__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 10px;
}

.page-news__pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #0A1931;
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid #FFD700;
}

.page-news__pagination-link:hover:not(.page-news__pagination-link--disabled):not(.page-news__pagination-link--active) {
    background-color: #FFD700;
    color: #0A1931;
}

.page-news__pagination-link--active {
    background-color: #FFD700;
    color: #0A1931;
    cursor: default;
}

.page-news__pagination-link--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #666;
    color: #aaa;
}

/* CTA Section */
.page-news__cta-section {
    text-align: center;
    padding: 80px 0;
}

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

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

.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,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
    background-color: #FFD700;
    color: #0A1931;
    border: 2px solid #FFD700;
}

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

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

.page-news__btn-secondary:hover {
    background-color: #FFD700;
    color: #0A1931;
}

/* FAQ Section */
.page-news__faq-section {
    background-color: #1a2a44;
}

.page-news__faq-list {
    max-width: 800px;
    margin: 0 auto;
}

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #0A1931;
    color: #FFD700;
    font-size: 1.2em;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.page-news__faq-item.active .page-news__faq-question {
    border-bottom: none;
}

.page-news__faq-question:hover {
    background-color: #15253e;
}

.page-news__faq-heading {
    margin: 0;
    color: inherit;
    font-size: 1em; /* Make sure heading size is controlled by parent */
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #FFD700;
}

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

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

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

.page-news__faq-answer p {
    margin: 0;
    font-size: 1em;
    color: #cccccc; /* Ensure text color is readable */
}

.page-news__faq-answer a {
    color: #FFD700;
    text-decoration: underline;
}

.page-news__faq-answer a:hover {
    color: #ffffff;
}

/* 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__article-title {
        font-size: 1.3em;
    }
    .page-news__cta-title {
        font-size: 2.5em;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        height: 450px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__hero-cta {
        padding: 12px 25px;
        font-size: 1em;
    }

    .page-news__section {
        padding: 40px 0;
    }
    .page-news__container {
        padding: 0 15px;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }
    .page-news__article-image {
        height: 180px;
    }
    .page-news__article-title {
        font-size: 1.2em;
    }
    .page-news__article-excerpt {
        font-size: 0.9em;
    }

    .page-news__pagination {
        margin-top: 30px;
        gap: 5px;
    }
    .page-news__pagination-link {
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }

    .page-news__cta-section {
        padding: 60px 0;
    }
    .page-news__cta-title {
        font-size: 2em;
    }
    .page-news__cta-description {
        font-size: 1em;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

    /* Mobile image responsiveness */
    .page-news img {
      max-width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-section,
    .page-news__cta-section,
    .page-news__faq-section {
      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-left: 0;
        padding-right: 0;
    }
    .page-news__hero-content {
        padding: 0 15px;
    }
    .page-news__cta-buttons {
        padding-left: 0;
        padding-right: 0;
    }
    .page-news__video-section { /* Placeholder, if video section existed */
        padding-top: var(--header-offset, 120px) !important;
    }
}

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

/* Content area image size enforcement for WCAG AA */
/* This rule ensures content images are not too small */
.page-news__articles-grid img,
.page-news__article-card img {
    min-width: 200px;
    min-height: 200px;
}
/* Specific rule to prevent content images from being too small,
   targeting any img within .page-news that isn't a logo/icon in shared */
.page-news :not(.shared-header) :not(.shared-footer) img {
  min-width: 200px;
  min-height: 200px;
  /* Use max-width for responsiveness while maintaining minimum */
  max-width: 100%;
  height: auto;
}