/* style/news.css */
/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Body background is dark (#0a0a0a), so text should be light */
    background-color: transparent; /* Inherit from body or shared.css */
}

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

.page-news__section {
    padding: 60px 0;
    text-align: center;
}

.page-news__section-title {
    font-size: 2.5em;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: bold;
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px; /* Ensure sufficient height */
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.7; /* Slightly dim the background image for text readability */
}

.page-news__hero-container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    border-radius: 10px;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
}

.page-news__hero-title {
    font-size: 3.5em;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
}

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

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

/* Buttons */
.page-news__btn-primary {
    background: #017439; /* Main brand color */
    color: #ffffff;
    border: 2px solid #017439;
}

.page-news__btn-primary:hover {
    background: #005a2b;
    border-color: #005a2b;
}

.page-news__btn-secondary {
    background: #ffffff;
    color: #017439; /* Text color is main brand color */
    border: 2px solid #017439;
    margin-left: 15px;
}

.page-news__btn-secondary:hover {
    background: #f0f0f0;
    color: #005a2b;
    border-color: #005a2b;
}

/* Dark Section */
.page-news__dark-section {
    background-color: #017439; /* Main brand color as background */
    color: #ffffff;
}
.page-news__dark-section .page-news__section-title {
    color: #ffffff;
}
.page-news__dark-section .page-news__section-description {
    color: #f0f0f0;
}

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

.page-news__article-card {
    background: rgba(255, 255, 255, 0.1); /* Light background for cards on dark body */
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards are same height */
}

.page-news__article-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

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

.page-news__article-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: bold;
}
.page-news__article-title a {
    color: #ffffff; /* Link color for titles */
    text-decoration: none;
    transition: color 0.3s ease;
}
.page-news__article-title a:hover {
    color: #FFFF00; /* Highlight on hover (using "Đăng ký và Đăng nhập font" color for accent) */
}

.page-news__article-excerpt {
    font-size: 1em;
    color: #f0f0f0;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to grow */
}

.page-news__read-more {
    display: inline-block;
    padding: 10px 20px;
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    align-self: flex-start; /* Align button to start */
}

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

.page-news__guide-item {
    background: rgba(255, 255, 255, 0.15); /* Slightly lighter background for items in dark section */
    border-radius: 10px;
    padding: 30px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__guide-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    font-weight: bold;
}
.page-news__guide-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}
.page-news__guide-title a:hover {
    color: #FFFF00;
}

.page-news__guide-item p {
    color: #f0f0f0;
    font-size: 0.95em;
}

/* CTA Buttons Group */
.page-news__cta-buttons {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px; /* Space between buttons */
}

/* FAQ Section */
.page-news__faq-list {
    max-width: 900px;
    margin: 40px auto 0;
    text-align: left;
}

.page-news__faq-item {
    background: rgba(255, 255, 255, 0.08); /* Slightly darker card for FAQ */
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #FFFF00; /* Accent color for toggle */
}

.page-news__faq-item[open] .page-news__faq-toggle {
    content: "−"; /* Changed by JS */
}

.page-news__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1em;
    color: #f0f0f0;
}
/* Ensure details summary marker is hidden */
.page-news__faq-item summary {
    list-style: none;
}
.page-news__faq-item summary::-webkit-details-marker {
    display: none;
}

/* CTA Banner */
.page-news__cta-banner {
    background-color: #017439; /* Main brand color */
    padding: 80px 0;
    color: #ffffff;
}

.page-news__cta-container {
    max-width: 800px;
}

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

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

/* Contact Info */
.page-news__contact-details {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    font-size: 1.1em;
}

.page-news__contact-details p {
    margin: 0;
}

.page-news__contact-link {
    color: #FFFF00; /* Accent color for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__contact-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3em;
    }
    .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) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__container {
        padding: 0 15px;
    }
    .page-news__section {
        padding: 40px 0;
    }

    .page-news__hero-section {
        min-height: 450px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile offset */
    }
    .page-news__hero-container {
        padding: 20px 15px;
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__hero-button {
        padding: 12px 25px;
        font-size: 1em;
    }

    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 0.95em;
    }

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

    .page-news__article-image {
        height: 200px;
    }

    .page-news__article-title {
        font-size: 1.3em;
    }
    .page-news__article-excerpt {
        font-size: 0.9em;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__btn-secondary {
        margin-left: 0; /* Remove margin for vertical stacking */
    }

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

    .page-news__cta-title {
        font-size: 1.8em;
    }
    .page-news__cta-description {
        font-size: 1em;
    }

    /* Image responsive adaptions */
    .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-banner {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      /* padding-left and padding-right are handled by .page-news__container or individual elements */
    }
    
    /* Ensure buttons adapt */
    .page-news__cta-button,
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news a[class*="btn"] {
      max-width: 100% !important;
      width: 100% !important; /* Make buttons full width on mobile */
      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 {
        flex-direction: column; /* Stack buttons vertically on mobile */
    }
}