/* style/news.css */

/* Variables */
:root {
    --primary-color: #0A2463;
    --secondary-color: #FFD700;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark-card: rgba(10, 36, 99, 0.8);
    --border-color: #e0e0e0;
}

/* Base styles for the page content, ensuring contrast with shared body background */
.page-news {
    font-family: 'Arial', sans-serif;
    color: var(--text-light); /* Assuming body is dark-bg-1 */
    line-height: 1.6;
}

/* Padding for fixed header */
.page-news__section:first-of-type {
    padding-top: 120px; /* Desktop: Adjust based on shared header height */
}

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

.page-news__section {
    padding: 60px 0;
    margin-bottom: 30px;
}

.page-news__main-title,
.page-news__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-light); /* For dark backgrounds */
}

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

.page-news__intro-text strong,
.page-news__section-description strong {
    color: var(--secondary-color);
}

.page-news__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-news__light-bg {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.page-news__dark-section {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-news__light-bg .page-news__main-title,
.page-news__light-bg .page-news__section-title,
.page-news__light-bg .page-news__intro-text,
.page-news__light-bg .page-news__section-description {
    color: var(--text-dark);
}

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

.page-news__article-card {
    background: #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;
    color: var(--text-dark);
}

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

.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: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.3;
}

.page-news__article-title a.page-news__article-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a.page-news__article-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.page-news__article-summary {
    font-size: 16px;
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-news__article-date {
    font-size: 14px;
    color: #888888;
    margin-bottom: 15px;
    display: block;
}

.page-news__read-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-align: center;
}

.page-news__read-more-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

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

.page-news__pagination-link {
    display: block;
    padding: 10px 15px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover,
.page-news__pagination-link--active {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Game Types Section */
.page-news__game-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-news__game-type-card {
    background: var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-light);
}

.page-news__game-type-image {
    width: 100%;
    max-width: 250px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-news__game-type-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.page-news__game-type-text {
    font-size: 16px;
    color: #f0f0f0;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-news__btn-secondary:hover {
    background: #e0b300;
    transform: translateY(-2px);
}

/* Promotion News Section */
.page-news__promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-news__promotion-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dark);
}

.page-news__promotion-image {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-news__promotion-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.page-news__promotion-text {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-news__btn-primary:hover {
    background: #e0b300;
    transform: translateY(-2px);
}

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

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

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: 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;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important;
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    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: #f5f5f5;
    border-color: #d0d0d0;
}

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

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: var(--text-dark);
}

.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: var(--primary-color);
    transform: rotate(45deg);
}

.page-news__faq-answer p {
    font-size: 16px;
    color: #555555;
    line-height: 1.7;
    margin: 0;
}

.page-news__faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-news__faq-answer a:hover {
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-news__main-title {
        font-size: 32px;
    }

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

    .page-news__intro-text,
    .page-news__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-news__section {
        padding: 40px 0;
    }

    .page-news__articles-grid,
    .page-news__game-types-grid,
    .page-news__promotions-grid {
        gap: 20px;
    }

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

    .page-news__game-type-title,
    .page-news__promotion-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .page-news__section:first-of-type {
        padding-top: 100px !important; /* Mobile: Adjust based on shared header height */
    }

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

    .page-news__main-title {
        font-size: 28px;
    }

    .page-news__section-title {
        font-size: 24px;
    }

    .page-news__intro-text,
    .page-news__section-description {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .page-news__article-card,
    .page-news__game-type-card,
    .page-news__promotion-card {
        padding: 20px;
    }

    .page-news__article-image,
    .page-news__game-type-image,
    .page-news__promotion-image {
        height: 160px;
        max-width: 100% !important;
        width: 100% !important;
        object-fit: cover;
    }

    .page-news__article-title,
    .page-news__game-type-title,
    .page-news__promotion-title {
        font-size: 18px;
    }

    .page-news__article-summary,
    .page-news__game-type-text,
    .page-news__promotion-text {
        font-size: 14px;
    }

    .page-news__read-more-btn,
    .page-news__btn-secondary,
    .page-news__btn-primary {
        padding: 10px 18px;
        font-size: 14px;
    }

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

    .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;
    }

    /* Ensure all image containers are responsive */
    .page-news__articles-grid > *, .page-news__game-types-grid > *, .page-news__promotions-grid > *,
    .page-news__articles-grid,
    .page-news__game-types-grid,
    .page-news__promotions-grid,
    .page-news__section,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 24px;
    }

    .page-news__section-title {
        font-size: 22px;
    }

    .page-news__article-image,
    .page-news__game-type-image,
    .page-news__promotion-image {
        height: 140px;
    }
}