/* style/news.css */

/* Base styles for the page-news scope */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
}

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

/* Section styling */
.page-news__hero-section,
.page-news__latest-updates,
.page-news__featured-article,
.page-news__game-strategies,
.page-news__video-section,
.page-news__faq-section,
.page-news__cta-final {
    padding: 80px 0;
    position: relative;
    overflow: hidden; /* Ensure content doesn't overflow */
}

/* Specific background colors for sections */
.page-news__dark-bg {
    background-color: #0a0a0a;
    color: #ffffff;
}

.page-news__light-bg {
    background-color: #ffffff;
    color: #333333; /* Dark text on light background */
}

/* Hero Section */
.page-news__hero-section {
    padding-top: calc(80px + var(--header-offset, 120px)); /* Adjust for fixed header */
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    background-color: #0a0a0a;
    overflow: hidden;
}

.page-news__hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)); /* Dark overlay */
    z-index: 1;
}

.page-news__hero-section .page-news__container {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.6); /* Slightly darken image for text readability */
}

.page-news__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #26A9E0; /* Brand color for title */
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    max-width: 100%; /* Ensure responsiveness */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-news__btn-primary {
    background-color: #26A9E0; /* Brand color */
    color: #ffffff;
    border: 2px solid #26A9E0;
    margin: 10px;
}

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

.page-news__btn-secondary {
    background-color: transparent;
    color: #26A9E0; /* Brand color */
    border: 2px solid #26A9E0;
    margin: 10px;
}

.page-news__btn-secondary:hover {
    background-color: #26A9E0;
    color: #ffffff;
}

/* Section Titles */
.page-news__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 30px;
    color: #26A9E0;
}

.page-news__light-bg .page-news__section-title {
    color: #26A9E0;
}

.page-news__dark-bg .page-news__section-title {
    color: #ffffff;
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

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

.page-news__news-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    color: #333333; /* Dark text on light card background */
}

.page-news__news-card:hover {
    transform: translateY(-5px);
}

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

.page-news__card-content {
    padding: 20px;
}

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

.page-news__card-title a {
    color: #26A9E0; /* Brand color for link */
    text-decoration: none;
}

.page-news__card-title a:hover {
    text-decoration: underline;
}

.page-news__card-excerpt {
    font-size: 0.95em;
    margin-bottom: 15px;
    color: #555555;
}

.page-news__read-more {
    display: inline-block;
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
}

.page-news__read-more:hover {
    text-decoration: underline;
}

/* Featured Article */
.page-news__featured-article .page-news__section-title {
    margin-bottom: 50px;
}

.page-news__article-content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.page-news__article-image {
    flex: 0 0 550px;
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: block;
}

.page-news__text-block {
    flex: 1;
}

.page-news__text-block p {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #f0f0f0;
}

/* Game Strategies */
.page-news__strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__strategy-item {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    color: #333333;
}

.page-news__strategy-title {
    font-size: 1.5em;
    color: #26A9E0;
    margin-bottom: 15px;
}

.page-news__strategy-item p {
    font-size: 1em;
    color: #555555;
}

.page-news__cta-center {
    text-align: center;
    margin-top: 50px;
}

/* Video Section */
.page-news__video-section {
    text-align: center;
    background-color: #0a0a0a;
}

.page-news__video-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.page-news__video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-news__video-wrapper:hover .page-news__video-overlay {
    opacity: 1;
}

.page-news__video-cta {
    display: inline-block;
    padding: 15px 30px;
    background-color: #EA7C07; /* Login color for CTA */
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
    z-index: 11;
}

.page-news__video-cta:hover {
    background-color: #d16b06;
}

/* FAQ Section */
.page-news__faq-section {
    background-color: #ffffff;
    color: #333333;
}

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

.page-news__faq-item {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: #26A9E0;
    transition: color 0.3s ease;
}

.page-news__faq-question:hover {
    color: #1e87c2;
}

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

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

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 15px;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important;
    padding: 15px;
}

.page-news__faq-answer p {
    font-size: 1em;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 0;
}

/* Final CTA */
.page-news__cta-final {
    text-align: center;
}

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

/* Responsive styles */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }

    .page-news__section-title {
        font-size: 2em;
    }

    .page-news__article-content {
        flex-direction: column;
        align-items: center;
    }

    .page-news__article-image {
        max-width: 80%;
        flex: none;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Fixed header offset for mobile */
    .page-news__hero-section {
        padding-top: calc(40px + var(--header-offset, 120px)); /* Adjust for mobile header */
        min-height: 450px;
    }
    
    .page-news__hero-section,
    .page-news__latest-updates,
    .page-news__featured-article,
    .page-news__game-strategies,
    .page-news__video-section,
    .page-news__faq-section,
    .page-news__cta-final {
        padding: 40px 0;
    }

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

    .page-news__main-title {
        font-size: 2em;
    }

    .page-news__intro-text {
        font-size: 1em;
    }

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .page-news__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
        min-width: unset !important; /* Allow images to scale down on mobile */
        min-height: unset !important; /* Allow images to scale down on mobile */
    }
    
    /* Content area images specifically */
    .page-news__article-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        flex: none !important;
    }

    /* Video responsiveness */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !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;
    }

    /* Buttons 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;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

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

    .page-news__faq-question {
        font-size: 1.1em;
    }
}

/* Ensure content area images meet min size requirements for desktop */
.page-news img {
  min-width: 200px;
  min-height: 200px;
}

/* Color contrast enforcement */
.page-news__dark-bg {
    background-color: #0a0a0a;
    color: #ffffff;
}

.page-news__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-news__news-card {
    background-color: #f9f9f9;
    color: #333333;
}
.page-news__strategy-item {
    background-color: #f9f9f9;
    color: #333333;
}

/* Specific colors from instructions */
.page-news__video-cta {
    background-color: #EA7C07;
    color: #ffffff;
}
.page-news__video-cta:hover {
    background-color: #d16b06;
}