/* style/news.css */

/* General styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main, #333333); /* Ensure text color is dark on light background */
    background-color: var(--bg-page, #F5F7FA); /* Default page background */
}

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

.page-news__section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color, #E53935);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-news__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #FF5A4F 0%, #E53935 100%);
    border-radius: 2px;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    overflow: hidden;
    background: var(--bg-page, #F5F7FA);
    margin-bottom: 40px;
}

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

.page-news__hero-content {
    max-width: 900px;
    margin: 40px auto 0; /* Margin-top after image, no overlap */
    padding: 0 20px 40px;
    text-align: center;
}

.page-news__main-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-color, #E53935);
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.page-news__description {
    font-size: 18px;
    color: var(--text-main, #333333);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Articles Section */
.page-news__articles-section {
    padding: 40px 0;
    background: var(--bg-card, #FFFFFF);
    margin-bottom: 40px;
    border-top: 1px solid var(--border-color, #E0E0E0);
    border-bottom: 1px solid var(--border-color, #E0E0E0);
}

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

.page-news__article-card {
    background: var(--bg-card, #FFFFFF);
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.page-news__article-content {
    padding: 20px;
}

.page-news__article-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color, #E53935);
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: block;
}

.page-news__article-excerpt {
    font-size: 16px;
    color: var(--text-main, #333333);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-news__read-more-btn {
    display: inline-block;
    padding: 8px 15px;
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #FFFFFF;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.page-news__read-more-btn:hover {
    opacity: 0.9;
}

.page-news__view-all-wrapper {
    text-align: center;
    margin-top: 40px;
}

.page-news__view-all-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #FFFFFF;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(229, 57, 53, 0.4);
}

.page-news__view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 57, 53, 0.6);
}

/* CTA Section */
.page-news__cta-section {
    background-color: var(--primary-color, #E53935);
    padding: 60px 0;
    margin-bottom: 40px;
}

.page-news__cta-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    color: #FFFFFF;
}

.page-news__cta-text {
    flex: 1;
}

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

.page-news__cta-description {
    font-size: 18px;
    margin-bottom: 30px;
    color: #F0F0F0;
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 35px;
    background: #FFFFFF;
    color: var(--primary-color, #E53935);
    border-radius: 8px;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
    background-color: var(--secondary-color, #FF5A4F);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__cta-image-wrapper {
    flex-shrink: 0;
    width: 500px;
    max-width: 100%;
}

.page-news__cta-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 40px 0 60px;
    background: var(--bg-page, #F5F7FA);
}

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

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px; /* Slightly larger radius */
  border: 1px solid var(--border-color, #E0E0E0);
  overflow: hidden;
  background: var(--bg-card, #FFFFFF);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Increased padding */
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  font-weight: 600;
  color: var(--text-main, #333333);
  font-size: 18px; /* Slightly larger font */
}
details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
  display: none;
}
details.page-news__faq-item summary.page-news__faq-question:hover {
  background: #f0f0f0; /* Lighter hover background */
}
.page-news__faq-qtext {
  flex: 1;
  line-height: 1.5;
  text-align: left;
}
.page-news__faq-toggle {
  font-size: 28px; /* Larger toggle icon */
  font-weight: bold;
  color: var(--primary-color, #E53935); /* Brand color for toggle */
  flex-shrink: 0;
  margin-left: 20px; /* Increased margin */
  width: 30px;
  text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
  padding: 0 25px 25px; /* Increased padding */
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  color: var(--text-main, #333333);
}
.page-news__faq-answer p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 40px;
    }
    .page-news__articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-news__cta-content-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .page-news__cta-image-wrapper {
        order: -1; /* Image above text on smaller screens */
        margin-bottom: 30px;
    }
    .page-news__cta-text {
        padding: 0 20px;
    }
    .page-news__cta-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    /* Hero Section */
    .page-news__hero-section {
        padding-top: 10px !important; /* Small top padding, relying on body for header offset */
        margin-bottom: 30px;
    }
    .page-news__hero-content {
        padding: 0 15px 30px;
    }
    .page-news__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-news__description {
        font-size: 16px;
    }

    /* Section Title */
    .page-news__section-title {
        font-size: 28px;
        margin-bottom: 30px;
        padding-bottom: 10px;
    }
    .page-news__section-title::after {
        width: 60px;
        height: 3px;
    }

    /* Articles Section */
    .page-news__articles-section {
        padding: 30px 0;
        margin-bottom: 30px;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    .page-news__article-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        max-height: 200px; /* Adjust height for mobile */
    }
    .page-news__article-title {
        font-size: 18px;
    }
    .page-news__article-date,
    .page-news__article-excerpt {
        font-size: 14px;
    }
    .page-news__read-more-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    .page-news__view-all-wrapper {
        margin-top: 30px;
    }
    .page-news__view-all-btn {
        padding: 10px 25px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* CTA Section */
    .page-news__cta-section {
        padding: 40px 0;
        margin-bottom: 30px;
    }
    .page-news__cta-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    .page-news__cta-description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 18px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-news__cta-image-wrapper {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px; /* Add padding to image wrapper */
    }
    .page-news__cta-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* FAQ Section */
    .page-news__faq-section {
        padding: 30px 0 40px;
    }
    details.page-news__faq-item summary.page-news__faq-question {
      padding: 15px 18px;
      font-size: 16px;
    }
    .page-news__faq-qtext {
        font-size: 16px;
    }
    .page-news__faq-toggle {
      font-size: 24px;
      margin-left: 15px;
      width: 26px;
    }
    details.page-news__faq-item .page-news__faq-answer {
      padding: 0 18px 18px;
    }
    .page-news__faq-answer p {
        font-size: 14px;
    }

    /* General image and button responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-news__container,
    .page-news__articles-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;
    }
    .page-news__articles-grid,
    .page-news__cta-content-wrapper,
    .page-news__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    /* Button specific overrides for mobile */
    .page-news__cta-button,
    .page-news__view-all-btn,
    .page-news__read-more-btn,
    .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;
    }
    /* If multiple buttons are in a flex container */
    .page-news__button-group { /* Example class if multiple buttons are grouped */
        display: flex;
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
    }
}