/* style/news.css */

:root {
    --primary-color: #2F6BFF;
    --secondary-color: #6FA3FF;
    --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    --card-bg: #FFFFFF;
    --background-color: #F4F7FB;
    --text-main: #1F2D3D;
    --text-black: #000000;
    --border-color: #D6E2FF;
    --glow-color: #A5C4FF;
}

.page-news {
    font-family: Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--background-color);
    line-height: 1.6;
}

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

/* Hero Section */
.page-news__hero-section {
    background-color: var(--primary-color);
    color: #ffffff;
    padding-top: 10px; /* Small top padding, header offset handled by body */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit image height for hero */
    overflow: hidden;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.8); /* Slightly darken image for text contrast */
}

.page-news__hero-content-wrapper {
    width: 100%;
    padding: 40px 0;
    text-align: center;
    background-color: var(--primary-color); /* Ensure content has a solid background below the image */
    position: relative;
    z-index: 1;
}

.page-news__main-title {
    font-size: clamp(28px, 4vw, 48px); /* Responsive font size for H1 */
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    color: #ffffff;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__subtitle {
    font-size: clamp(16px, 2vw, 20px);
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
    box-sizing: border-box;
    max-width: 100%;
}

.page-news__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
    margin-right: 15px;
}

.page-news__btn-primary:hover {
    box-shadow: 0 5px 15px rgba(47, 107, 255, 0.4);
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background: var(--card-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-news__btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(47, 107, 255, 0.2);
    transform: translateY(-2px);
}

/* Articles Section */
.page-news__articles-section {
    padding: 60px 0;
    background-color: var(--background-color);
    color: var(--text-main);
}

.page-news__section-title {
    font-size: clamp(24px, 3.5vw, 36px);
    color: var(--text-black);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-news__section-description {
    font-size: 18px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    color: var(--text-main);
}

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

.page-news__article-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    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 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__article-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-news__article-image {
    width: 100%;
    height: 200px;
    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: 20px;
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-news__article-excerpt {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
    margin-top: auto;
}

.page-news__read-more:hover {
    text-decoration: underline;
}

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

/* CTA Section */
.page-news__cta-section {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 60px 0;
    text-align: center;
}

.page-news__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-news__cta-text {
    margin-bottom: 30px;
}

.page-news__cta-title {
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    color: #ffffff;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    width: 100%; /* Ensure container takes full width */
    max-width: 600px; /* Limit max width for button group */
    margin: 0 auto;
    box-sizing: border-box;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--background-color);
    color: var(--text-main);
}

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

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
  color: var(--text-main);
}
details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
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: #f5f5f5;
}
.page-news__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-black);
}
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: var(--text-main);
}

.page-news__faq-answer p {
    margin: 0;
    font-size: 16px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-content-wrapper {
        padding: 30px 0;
    }
    .page-news__main-title {
        font-size: 40px;
    }
    .page-news__subtitle {
        font-size: 18px;
    }
    .page-news__articles-section,
    .page-news__cta-section,
    .page-news__faq-section {
        padding: 50px 0;
    }
    .page-news__section-title,
    .page-news__cta-title {
        font-size: 32px;
    }
    .page-news__section-description,
    .page-news__cta-description {
        font-size: 16px;
    }
    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-news__article-image {
        height: 180px;
    }
    .page-news__article-title {
        font-size: 18px;
    }
    .page-news__faq-qtext {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .page-news__container {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__hero-section {
        padding-top: 10px !important;
    }

    .page-news__hero-image-wrapper {
        max-height: 300px;
    }

    .page-news__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-news__hero-content-wrapper {
        padding: 20px 0;
    }

    .page-news__main-title {
        font-size: 28px !important;
        margin-bottom: 10px;
    }

    .page-news__subtitle {
        font-size: 15px !important;
        margin-bottom: 20px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        display: block !important;
        margin: 0 auto 15px auto !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 10px 15px !important;
        font-size: 15px !important;
    }

    .page-news__cta-buttons {
        flex-direction: column !important;
        gap: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0;
        padding-right: 0;
    }

    .page-news__articles-section,
    .page-news__cta-section,
    .page-news__faq-section {
        padding: 40px 0 !important;
    }

    .page-news__section-title,
    .page-news__cta-title {
        font-size: 24px !important;
        margin-bottom: 15px;
    }

    .page-news__section-description,
    .page-news__cta-description {
        font-size: 15px !important;
        margin-bottom: 30px;
    }

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

    .page-news__article-image {
        height: 160px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .page-news__article-title {
        font-size: 17px !important;
    }

    .page-news__article-excerpt {
        font-size: 15px !important;
    }

    details.page-news__faq-item summary.page-news__faq-question {
        padding: 15px !important;
    }
    .page-news__faq-qtext {
        font-size: 15px !important;
    }
    .page-news__faq-toggle {
        font-size: 20px !important;
        width: 24px !important;
        height: 24px !important;
        margin-left: 10px !important;
    }
    details.page-news__faq-item .page-news__faq-answer {
        padding: 0 15px 15px !important;
    }
    .page-news__faq-answer p {
        font-size: 15px !important;
    }

    .page-news img {
        max-width: 100% !important;
        height: auto !important;
    }

    .page-news__card,
    .page-news__section,
    .page-news__box,
    .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;
    }
}