/* style/news.css */

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background #f4f4f4 */
    background-color: #f4f4f4;
}

/* Header offset for fixed header */
.page-news {
    padding-top: var(--header-offset, 120px);
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #0A246A, #1A3A8A); /* Dark background for hero */
    color: #ffffff; /* Light text for dark background */
}

.page-news__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-news__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

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

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-news__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #FFD700; /* Secondary color for title */
    line-height: 1.2;
    font-weight: bold;
}

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

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #FFD700; /* Secondary color for CTA */
    color: #0A246A; /* Primary color for text */
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
    background: #e6c200; /* Slightly darker gold on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #0A246A;
    text-align: center;
    margin-bottom: 20px;
    padding-top: 40px;
    font-weight: bold;
}

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

/* Latest Articles Section */
.page-news__latest-articles {
    background-color: #fcfcfc;
    padding: 60px 0;
}

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

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

.page-news__article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-news__article-thumbnail {
    width: 100%;
    height: 220px; /* Fixed height for thumbnails */
    overflow: hidden;
}

.page-news__article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-news__article-card:hover .page-news__article-thumbnail img {
    transform: scale(1.05);
}

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

.page-news__article-title {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
    color: #0A246A; /* Primary color for title */
    font-weight: bold;
}

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

.page-news__article-title a:hover {
    color: #FFD700; /* Secondary color on hover */
}

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

.page-news__article-date {
    font-size: 0.9em;
    color: #999999;
    display: block;
    margin-top: auto;
}

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

.page-news__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    text-decoration: none;
    color: #0A246A;
    font-weight: bold;
    transition: all 0.3s ease;
}

.page-news__pagination-link:hover {
    background-color: #FFD700;
    color: #0A246A;
    border-color: #FFD700;
}

.page-news__pagination-link--active {
    background-color: #0A246A;
    color: #ffffff;
    border-color: #0A246A;
}

.page-news__pagination-link--active:hover {
    background-color: #0A246A;
    color: #ffffff;
}

/* CTA Section */
.page-news__cta-section {
    background: linear-gradient(135deg, #0A246A, #071B52); /* Dark background */
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

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

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

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

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Ensure text breaks within button */
}

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

.page-news__btn-primary:hover {
    background: #e6c200;
    border-color: #e6c200;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3));
}

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

.page-news__btn-secondary:hover {
    background: #FFD700;
    color: #0A246A;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3));
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

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

/* FAQ item styles */
.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ default state - answer hidden */
.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  background: #f0f0f0; /* Slightly different background for answer */
  color: #444444; /* Darker text for answer */
}

/* FAQ expanded state - ⚠️ Use!important and sufficiently large max-height */
.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* ⚠️ Use!important to ensure priority, value large enough to contain any content */
  padding: 20px 15px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

/* Question styles */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: #0A246A; /* Primary color for question text */
}

.page-news__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-news__faq-question:active {
  background: #eeeeee;
}

/* Question title styles */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: inherit; /* Inherit color from parent */
}

/* Toggle icon */
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Secondary color for toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #0A246A; /* Primary color for toggle background */
  color: #ffffff; /* White text for toggle icon */
}

.page-news__faq-item.active .page-news__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'minus' effect */
  background-color: #FFD700; /* Secondary color for active toggle background */
  color: #0A246A; /* Primary color for active toggle icon */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.5em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__cta-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    /* Header offset adjustment for mobile */
    .page-news {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

    .page-news__hero-section {
        padding: 40px 15px;
    }

    .page-news__main-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-news__cta-button {
        padding: 12px 30px;
        font-size: 1em;
    }

    .page-news__container {
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__section-title {
        font-size: 1.8em;
        padding-top: 20px;
        margin-bottom: 15px;
    }
    .page-news__section-description {
        font-size: 0.95em;
        margin-bottom: 25px;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__article-thumbnail {
        height: 180px;
    }

    .page-news__article-title {
        font-size: 1.3em;
        margin-bottom: 10px;
    }
    .page-news__article-excerpt {
        font-size: 0.9em;
    }

    .page-news__pagination {
        margin-top: 30px;
        gap: 8px;
    }
    .page-news__pagination-link {
        min-width: 35px;
        height: 35px;
        padding: 0 10px;
        font-size: 0.9em;
    }

    .page-news__cta-section {
        padding: 50px 15px;
    }
    .page-news__cta-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-news__cta-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        padding: 12px 25px;
        font-size: 1em;
        width: 100% !important; /* Ensure full width on mobile */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__faq-section {
        padding: 40px 0;
    }
    .page-news__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-news__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-news__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }

    /* Universal image responsiveness for mobile */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden; /* Prevent horizontal scroll for containers */
    }
}

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