/* style/news.css */

/* General styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background #f4f4f4 */
    background-color: #f4f4f4; /* Inherited from shared, but good to specify for context */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #8B0000; /* Dark red 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;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 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); /* Ensure content is below fixed header */
    background: linear-gradient(135deg, #FFD700, #8B0000); /* Gold to Dark Red gradient */
    color: #ffffff; /* White text for dark gradient background */
    overflow: hidden; /* Prevent image overflow */
}

.page-news__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Ensure content is above any potential background elements */
}

.page-news__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px; /* Ensure image itself has border-radius */
}

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

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 15px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

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

.page-news__cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: #FFD700; /* Gold button */
    color: #8B0000; /* Dark red text for gold button */
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: none;
}

.page-news__cta-button:hover {
    background: #e6c200; /* Slightly darker gold on hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Latest News Section */
.page-news__latest-news-section {
    padding: 80px 0;
    background-color: #f9f9f9; /* Light background for contrast */
}

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

.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;
    display: flex;
    flex-direction: column;
}

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

.page-news__news-card img {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

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

.page-news__card-title a {
    color: #8B0000; /* Dark red for card titles */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #FFD700; /* Gold on hover */
}

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

.page-news__card-excerpt {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-news__read-more-link {
    display: inline-block;
    color: #FFD700; /* Gold link */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
    color: #8B0000; /* Dark red on hover */
    text-decoration: underline;
}

/* Featured Articles Section */
.page-news__featured-articles-section {
    padding: 80px 0;
    background-color: #8B0000; /* Dark red background */
    color: #ffffff; /* White text for dark background */
}

.page-news__featured-articles-section .page-news__section-title {
    color: #FFD700; /* Gold title on dark red background */
}

.page-news__featured-articles-section .page-news__section-description {
    color: #f0f0f0;
}

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

.page-news__featured-card {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__featured-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.page-news__featured-card img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__featured-card .page-news__card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-news__featured-card .page-news__card-title a {
    color: #FFD700; /* Gold for featured card titles */
}

.page-news__featured-card .page-news__card-title a:hover {
    color: #ffffff; /* White on hover */
}

.page-news__featured-card .page-news__card-excerpt {
    color: #f0f0f0;
    flex-grow: 1;
}

.page-news__featured-card .page-news__read-more-link {
    color: #ffffff; /* White link for dark background */
}

.page-news__featured-card .page-news__read-more-link:hover {
    color: #FFD700; /* Gold on hover */
}

/* News Categories Section */
.page-news__categories-section {
    padding: 80px 0;
    background-color: #f4f4f4;
}

.page-news__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.page-news__category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #ffffff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    height: 100%; /* Ensure cards have consistent height */
}

.page-news__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-news__category-title {
    font-size: 1.5em;
    color: #8B0000; /* Dark red for category titles */
    margin-bottom: 10px;
    font-weight: bold;
}

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

/* Why Choose Section */
.page-news__why-choose-section {
    padding: 80px 0;
    background-color: #FFD700; /* Gold background */
    color: #8B0000; /* Dark red text for gold background */
}

.page-news__why-choose-section .page-news__section-title {
    color: #8B0000; /* Dark red title on gold background */
}

.page-news__why-choose-section .page-news__section-description {
    color: #8B0000;
}

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

.page-news__feature-item {
    background: rgba(255, 255, 255, 0.9); /* Slightly transparent white for items */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__feature-item img {
    width: 100%;
    max-width: 250px; /* Constrain image width */
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

.page-news__feature-title {
    font-size: 1.5em;
    color: #8B0000; /* Dark red title */
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__feature-text {
    font-size: 1em;
    color: #333333;
}

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

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

/* FAQ container styles */
.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ default state - answer hidden */
.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.3s ease;
    padding: 0 20px;
    opacity: 0;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* 🚨 Use!important ensure priority, value large enough to contain any content */
    padding: 20px !important; /* Adjust padding as needed */
    opacity: 1;
    background: #fdfdfd;
    border-top: 1px solid #eeeeee;
}

/* Question style */
.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    color: #333333;
}

.page-news__faq-item.active .page-news__faq-question {
    border-radius: 5px 5px 0 0;
    border-bottom-color: transparent;
    background-color: #f5f5f5;
}

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

.page-news__faq-question:active {
    background: #eeeeee;
}

/* Question title style */
.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; /* Prevent h3 from blocking click event */
    color: #8B0000; /* Dark red for FAQ question titles */
}

/* Toggle icon */
.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #FFD700; /* Gold for toggle icon */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: #8B0000; /* Dark red when active */
    transform: rotate(45deg); /* Rotate for 'x' effect, or use '-' */
}

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    background-color: #8B0000; /* Dark red background */
    color: #ffffff; /* White text */
    text-align: center;
}

.page-news__cta-section .page-news__section-title {
    color: #FFD700; /* Gold title */
}

.page-news__cta-section .page-news__section-description {
    color: #f0f0f0;
    margin-bottom: 30px;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 18px 45px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: none;
    max-width: 100%; /* Ensure button responsiveness */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-news__btn-primary {
    background: #FFD700; /* Gold button */
    color: #8B0000; /* Dark red text */
}

.page-news__btn-primary:hover {
    background: #e6c200; /* Slightly darker gold */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__btn-secondary {
    background: #ffffff; /* White button */
    color: #8B0000; /* Dark red text */
    border: 2px solid #FFD700; /* Gold border */
}

.page-news__btn-secondary:hover {
    background: #f0f0f0; /* Slightly darker white */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__hero-description,
    .page-news__section-description {
        font-size: 1em;
    }
    .page-news__cta-button,
    .page-news__btn-primary,
    .page-news__btn-secondary {
        padding: 15px 35px;
        font-size: 1.1em;
    }
    .page-news__news-card img,
    .page-news__featured-card img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .page-news__container {
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Image responsiveness for mobile */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-news__news-card img,
    .page-news__featured-card img,
    .page-news__feature-item img {
        min-width: 200px !important; /* Ensure min size */
        min- /* Ensure min size for smaller aspect ratios */
        height: auto !important;
    }

    .page-news__latest-news-section,
    .page-news__featured-articles-section,
    .page-news__categories-section,
    .page-news__why-choose-section,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 40px 0;
    }

    .page-news__news-grid,
    .page-news__featured-grid,
    .page-news__categories-grid,
    .page-news__feature-list {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    /* Button responsiveness for mobile */
    .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;
        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-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    /* FAQ mobile adaptation */
    .page-news__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-news__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-news__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }
}

/* Color Contrast Safeguards */
.page-news__light-bg {
    background-color: #f9f9f9; /* Light background */
    color: #333333; /* Dark text */
}

.page-news__dark-bg {
    background-color: #8B0000; /* Dark red background */
    color: #ffffff; /* White text */
}

/* Specific overrides for text on brand colors if needed */
.page-news__why-choose-section .page-news__feature-title {
    color: #8B0000; /* Dark red on gold background */
}
.page-news__why-choose-section .page-news__feature-text {
    color: #333333; /* Dark text on white card background */
}
.page-news__why-choose-section .page-news__feature-item {
    background: rgba(255, 255, 255, 0.9); /* Ensure card background is light for dark text */
}