/* style/news.css */
:root {
    --primary-color: #FFD700;
    --secondary-color: #000080;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #000080;
}

.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light); /* Default light background, so text is dark */
}

/* 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;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background-color: var(--secondary-color); /* Dark blue background for hero */
    color: var(--text-light);
}

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

.page-news__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 8px;
}

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

.page-news__hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--primary-color); /* Gold color for title */
    line-height: 1.2;
    font-weight: bold;
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-light);
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-news__cta-button:hover {
    background: #e6c200; /* Slightly darker gold on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Styling */
.page-news__section {
    padding: 80px 20px;
    text-align: center;
}

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

.page-news__section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1em;
    color: var(--text-dark);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Dark Background Section */
.page-news__dark-bg {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.page-news__dark-bg .page-news__section-title {
    color: var(--primary-color);
}

.page-news__dark-bg .page-news__section-description {
    color: var(--text-light);
}

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

.page-news__news-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__card-image {
    width: 100%;
    height: 225px; /* Fixed height for consistent card appearance */
    overflow: hidden;
}

.page-news__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-width: 200px; /* Enforce minimum size for content images */
    min-height: 200px;
}

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

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

.page-news__card-title a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: var(--primary-color);
}

.page-news__card-date {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.page-news__card-text {
    font-size: 1em;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.page-news__read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: var(--secondary-color);
}

/* Categories Grid */
.page-news__category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.page-news__category-item {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-news__category-item:hover {
    background: var(--text-light);
    color: var(--secondary-color);
}

/* All News List */
.page-news__news-item {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 20px;
    text-align: left;
    transition: box-shadow 0.3s ease;
}

.page-news__news-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-news__item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #777;
    margin-bottom: 10px;
}

.page-news__item-category {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 4px 10px;
    border-radius: 3px;
    font-weight: bold;
}

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

.page-news__item-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__item-link:hover {
    color: var(--primary-color);
}

.page-news__item-snippet {
    color: var(--text-dark);
    margin-bottom: 15px;
}

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

.page-news__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eee;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.page-news__pagination-link--active {
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* Why Choose Section */
.page-news__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__feature-item {
    background: var(--text-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: var(--text-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__feature-item img {
    width: 200px; /* Ensure these are actual images, not small icons */
    height: 200px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain; 
    min-width: 200px; 
    min-height: 200px; 
}

.page-news__feature-item h3 {
    font-size: 1.4em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.page-news__feature-item p {
    font-size: 0.95em;
    color: var(--text-dark);
}

/* FAQ Section */
.page-news__faq-list {
    margin-top: 40px;
    text-align: left;
}

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.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 25px;
  opacity: 0;
  color: var(--text-dark);
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; 
  padding: 20px 25px !important;
  opacity: 1;
  background: var(--bg-light);
  border-top: 1px solid #e0e0e0;
  border-radius: 0 0 5px 5px;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--secondary-color);
}

.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg); /* Changed to rotate for a different effect */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.5em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__card-title {
        font-size: 1.3em;
    }
    .page-news__item-title {
        font-size: 1.5em;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__hero-title {
        font-size: 2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__section {
        padding: 40px 15px;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 0.95em;
    }

    .page-news__cards-grid {
        grid-template-columns: 1fr;
    }
    .page-news__news-card {
        margin-bottom: 20px;
    }

    .page-news__card-image img,
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
    .page-news__card-image {
        height: 180px;
    }

    .page-news__category-grid {
        flex-direction: column;
        gap: 10px;
    }
    .page-news__category-item {
        width: 100%;
        box-sizing: border-box;
    }

    .page-news__news-item {
        padding: 20px;
    }
    .page-news__item-title {
        font-size: 1.3em;
    }
    .page-news__item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .page-news__features-grid {
        grid-template-columns: 1fr;
    }
    .page-news__feature-item {
        padding: 25px;
    }

    .page-news__faq-question {
        padding: 15px;
    }
    .page-news__faq-question h3 {
        font-size: 1em;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }
    .page-news__faq-toggle {
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.6em;
    }
    .page-news__cta-button {
        font-size: 0.95em;
        padding: 10px 20px;
    }
    .page-news__card-title {
        font-size: 1.1em;
    }
    .page-news__item-title {
        font-size: 1.1em;
    }
}

/* Ensure all content area images are at least 200x200px */
.page-news__news-card img,
.page-news__item-image img {
    min-width: 200px;
    min-height: 200px;
    width: 100%; /* Override to ensure responsiveness while meeting min size */
    height: auto; /* Override to ensure responsiveness while meeting min size */
    object-fit: cover;
}

/* Specific adjustment for feature items to ensure they are large images */
.page-news__feature-item img {
    width: 200px; 
    height: 200px;
    object-fit: contain; 
    margin-left: auto;
    margin-right: auto;
}

/* Mobile button responsiveness (general catch-all for buttons) */
.page-news a[class*="button"],
.page-news a[class*="btn"] {
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__cta-buttons,
.page-news__button-group,
.page-news__btn-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 768px) {
    .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__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .page-news__cta-buttons {
        display: flex;
        flex-direction: column;
    }
}