/* style/news.css */

/* Base Styles & Typography */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF; /* Explicitly set for content area */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: #555555;
}

/* Hero Section */
.page-news__hero-section {
    padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
    padding-bottom: 80px;
    background-color: #017439; /* Primary brand color */
    color: #FFFFFF; /* White text for dark background */
    text-align: center;
}

.page-news__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFFFF;
}

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

.page-news__hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure responsiveness */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text break */
}

.page-news__btn-primary {
    background-color: #C30808; /* Register button color */
    color: #FFFF00; /* Register button font color */
    border: 2px solid #C30808;
}

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

.page-news__btn-secondary {
    background-color: #FFFFFF;
    color: #017439; /* Primary brand color for text */
    border: 2px solid #017439;
}

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

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

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

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

.page-news__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-news__article-title a {
    color: #017439; /* Brand color for link titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #005a2e;
    text-decoration: underline;
}

.page-news__article-meta {
    font-size: 0.9em;
    color: #888888;
    margin-bottom: 15px;
}

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

.page-news__read-more-link {
    color: #C30808; /* Action color */
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
    color: #a00606;
    text-decoration: underline;
}

/* Featured Insights Section */
.page-news__featured-insights {
    padding: 60px 0;
    background-color: #017439; /* Primary brand color */
    color: #FFFFFF;
}

.page-news__featured-insights .page-news__section-title,
.page-news__featured-insights .page-news__section-description {
    color: #FFFFFF;
}

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

.page-news__insight-card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__insight-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

.page-news__insight-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

.page-news__insight-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: #FFFFFF;
}

.page-news__insight-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.3;
}

.page-news__insight-title a {
    color: #FFFFFF; /* White text for link titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__insight-title a:hover {
    color: #f0f0f0;
    text-decoration: underline;
}

.page-news__insight-excerpt {
    font-size: 1em;
    color: #f0f0f0;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Promotions News Section */
.page-news__promotions-news {
    padding: 60px 0;
    background-color: #FFFFFF;
}

.page-news__promotion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-news__promotion-item {
    background-color: #f0f9f0; /* Light green background */
    border-left: 5px solid #017439;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__promotion-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.page-news__promotion-title {
    font-size: 1.6em;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news__promotion-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__promotion-title a:hover {
    color: #005a2e;
    text-decoration: underline;
}

.page-news__promotion-date {
    font-size: 0.9em;
    color: #888888;
    margin-bottom: 10px;
}

.page-news__promotion-description {
    font-size: 1em;
    color: #555555;
}

/* Why Choose ku393 Section */
.page-news__why-choose {
    padding: 60px 0;
    background-color: #f9f9f9; /* Light background */
    color: #333333;
}

.page-news__advantage-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-news__advantage-item {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.page-news__advantage-title {
    font-size: 1.8em;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__advantage-text {
    font-size: 1em;
    color: #555555;
}

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

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

.page-news__faq-item {
    background-color: #f0f9f0; /* Light green background */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #017439; /* Brand color for question background */
    color: #FFFFFF;
    font-weight: bold;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: #005a2e;
}

.page-news__faq-title {
    margin: 0;
    color: #FFFFFF;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Plus to X/Minus */
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    background-color: #f0f9f0; /* Light green background for answer */
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #333333;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 20px 25px;
}

.page-news__faq-answer p {
    margin: 0;
    padding-bottom: 10px; /* Add some spacing for paragraphs */
}

/* Call to Action Section */
.page-news__cta-section {
    padding: 80px 0;
    background-color: #017439; /* Primary brand color */
    color: #FFFFFF;
    text-align: center;
}

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

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

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

/* Images Global */
.page-news img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Ensure images fill their space without distortion */
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__article-title {
        font-size: 1.3em;
    }
    .page-news__insight-title {
        font-size: 1.2em;
    }
    .page-news__promotion-title {
        font-size: 1.4em;
    }
    .page-news__advantage-title {
        font-size: 1.5em;
    }
    .page-news__cta-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-news__container {
        padding: 0 15px; /* Adjust padding for mobile */
    }

    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure space below fixed header on mobile */
        padding-bottom: 50px;
    }

    .page-news__hero-title {
        font-size: 2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 0.9em;
        margin-bottom: 30px;
    }

    .page-news__articles-grid,
    .page-news__insights-grid,
    .page-news__advantage-list {
        grid-template-columns: 1fr; /* Stack cards on mobile */
        gap: 20px;
    }

    .page-news__article-card,
    .page-news__insight-card,
    .page-news__advantage-item,
    .page-news__promotion-item,
    .page-news__faq-item {
        margin-left: 0;
        margin-right: 0;
        border-radius: 8px; /* Ensure consistent border-radius */
    }

    .page-news__article-image,
    .page-news__insight-image {
        height: 200px; /* Adjust image height for mobile */
        min-width: 200px !important;
        min-height: 200px !important;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Ensure all images are responsive and don't overflow */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Video responsiveness - if any, though not in this specific HTML output */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    /* Button responsiveness */
    .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;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 10px; /* Add space between stacked buttons */
    }

    .page-news__hero-cta-group,
    .page-news__cta-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

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

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

/* Ensure all content containers are responsive */
.page-news__section,
.page-news__card,
.page-news__container {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

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