/* style/news.css */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #1A1A1A; /* Dark Grey */
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark: #000;
    --bg-light-transparent: rgba(255, 255, 255, 0.08); /* Light on dark background */
    --border-color-light: rgba(255, 255, 255, 0.15);
    --hover-color-dark: #e6c200; /* Slightly darker gold */
}

/* Base styles for the page-news scope */
.page-news {
    color: var(--text-light); /* Default text color for dark body background */
    background-color: var(--bg-dark); /* Should match body background from shared.css */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    padding-top: 100px; /* Adjust for fixed header on desktop */
}

/* Container for content sections */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Section titles */
.page-news__section-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    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-color: var(--primary-color);
    border-radius: 2px;
}

/* Hero Section */
.page-news__hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)), url('[GALLERY:bg:moto88,news,hero,banner,1920x1080]') no-repeat center center/cover;
    padding: 80px 0;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    padding-top: calc(80px + 10px); /* Adjust for fixed header */
}

.page-news__main-title {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-news__description {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: #f0f0f0;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Ensure responsiveness for multiple buttons */
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 35px;
    background: var(--primary-color);
    color: var(--secondary-color); /* Dark text on gold button */
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to wrap */
}

.page-news__cta-button:hover {
    background: var(--hover-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-news__cta-button--secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.page-news__cta-button--secondary:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-news__cta-button--large {
    padding: 18px 45px;
    font-size: 20px;
}

/* Featured Articles */
.page-news__featured-articles {
    padding: 60px 0;
    background-color: var(--bg-dark); /* Dark section */
}

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

.page-news__article-card {
    background: var(--bg-light-transparent);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure cards have equal height */
    display: flex;
    flex-direction: column;
}

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

.page-news__article-link {
    text-decoration: none;
    color: var(--text-light);
    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;
    justify-content: space-between;
}

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

.page-news__article-excerpt {
    font-size: 15px;
    color: #cccccc;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-news__article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #999999;
    margin-top: 10px;
}

.page-news__article-category {
    background-color: rgba(255, 215, 0, 0.2);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 5px;
    font-weight: bold;
}

/* Latest News Section */
.page-news__latest-news {
    padding: 60px 0;
    background-color: var(--bg-dark);
}

.page-news__news-list {
    display: grid;
    grid-template-columns: 1fr; /* Single column for list */
    gap: 25px;
}

.page-news__news-item {
    background: var(--bg-light-transparent);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.page-news__news-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    padding: 20px;
}

.page-news__news-image {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    margin-right: 20px;
}

.page-news__news-content {
    flex-grow: 1;
}

.page-news__news-title {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

.page-news__news-excerpt {
    font-size: 14px;
    color: #bbbbbb;
    margin-bottom: 10px;
}

.page-news__news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999999;
}

.page-news__news-category {
    background-color: rgba(255, 215, 0, 0.2);
    color: var(--primary-color);
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: bold;
}

/* Pagination */
.page-news__pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.page-news__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-light-transparent);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color-light);
}

.page-news__pagination-link:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

.page-news__pagination-link--active {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
    cursor: default;
}

/* Categories Section */
.page-news__categories-section {
    padding: 60px 0;
    background-color: var(--secondary-color); /* Dark background */
}

.page-news__category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-news__category-tag {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 215, 0, 0.2);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.page-news__category-tag:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

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

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

/* 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.4s ease;
    padding: 0 15px;
    opacity: 0;
    background: var(--bg-light-transparent); /* Light transparent background for answer */
    color: #cccccc;
    font-size: 15px;
    line-height: 1.6;
}

/* FAQ expanded state - ⚠️ Use!important and sufficiently large max-height to ensure expansion */
.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* ⚠️ Use!important to ensure priority, value large enough to accommodate any content */
    padding: 20px 15px !important;
    opacity: 1;
    border-radius: 0 0 5px 5px;
}

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

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

.page-news__faq-question:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Question title style */
.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--primary-color);
    pointer-events: none; /* Prevent h3 tag from blocking click event */
}

/* Toggle icon */
.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    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: var(--text-light);
    transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Final CTA Section */
.page-news__final-cta-section {
    padding: 80px 0;
    background-color: var(--secondary-color); /* Dark background */
    text-align: center;
}

.page-news__final-cta-section .page-news__section-title {
    color: var(--primary-color);
}

.page-news__final-cta-section .page-news__description {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 40px;
    }
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__article-title {
        font-size: 20px;
    }
    .page-news__news-title {
        font-size: 18px;
    }
    .page-news__news-image {
        width: 150px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .page-news {
        padding-top: 70px !important; /* Mobile fixed header adjustment */
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__container {
        padding: 0 15px;
    }

    .page-news__hero-section {
        padding: 60px 0;
        padding-top: calc(60px + 10px); /* Adjust for fixed header */
    }

    .page-news__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-news__description {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Ensure buttons are within padding */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .page-news__cta-button,
    .page-news__cta-button--large {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 25px !important;
        font-size: 16px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }

    .page-news__article-card {
        max-width: 100%;
        box-sizing: border-box;
    }

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

    .page-news__article-title {
        font-size: 18px;
    }

    .page-news__news-link {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .page-news__news-image {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        margin-right: 0;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .page-news__news-content {
        width: 100%;
    }

    .page-news__news-title {
        font-size: 17px;
    }

    .page-news__news-excerpt {
        font-size: 13px;
    }

    .page-news__news-meta {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }

    .page-news__pagination {
        margin-top: 30px;
        flex-wrap: wrap;
    }

    .page-news__category-tag {
        font-size: 14px;
        padding: 8px 15px;
    }

    /* FAQ mobile */
    .page-news__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }

    .page-news__faq-question h3 {
        font-size: 16px;
        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;
    }

    .page-news__final-cta-section {
        padding: 60px 0;
    }
}

/* Ensure all images are responsive */
.page-news img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile specific image adaptation */
@media (max-width: 768px) {
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .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;
    }
}