/* style/news.css */

/* Custom Color Palette */
:root {
    --nextbet-primary: #11A84E; /* Main Color */
    --nextbet-secondary: #22C768; /* Auxiliary Color */
    --nextbet-button-gradient-start: #2AD16F;
    --nextbet-button-gradient-end: #13994A;
    --nextbet-card-bg: #11271B;
    --nextbet-bg: #08160F;
    --nextbet-text-main: #F2FFF6;
    --nextbet-text-secondary: #A7D9B8;
    --nextbet-border: #2E7A4E;
    --nextbet-glow: #57E38D;
    --nextbet-gold: #F2C14E;
    --nextbet-divider: #1E3A2A;
    --nextbet-deep-green: #0A4B2C;

    /* Inherited from shared.css, assuming --background-color is dark */
    --background-color: #08160F; /* Assuming this from custom palette */
}

/* Base styles for the news page, assuming a dark body background from shared.css */
.page-news {
    font-family: 'Arial', sans-serif;
    color: var(--nextbet-text-main); /* Light text for dark background */
    background-color: var(--nextbet-bg); /* Dark background */
    line-height: 1.6;
}

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

/* Section Titles */
.page-news__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--nextbet-gold);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-news__section-description {
    font-size: 1.1em;
    color: var(--nextbet-text-secondary);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.1em;
    box-sizing: border-box; /* Crucial for responsive buttons */
}

.page-news__btn-primary {
    background: linear-gradient(180deg, var(--nextbet-button-gradient-start) 0%, var(--nextbet-button-gradient-end) 100%);
    color: var(--nextbet-text-main);
    border: 2px solid transparent;
}

.page-news__btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 0 15px var(--nextbet-glow);
}

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

.page-news__btn-secondary:hover {
    background: var(--nextbet-primary);
    color: var(--nextbet-text-main);
    box-shadow: 0 0 10px rgba(17, 168, 78, 0.5);
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above content */
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    background-color: var(--nextbet-bg);
    overflow: hidden; /* Ensure no overflow */
}

.page-news__hero-image-wrapper {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

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

.page-news__hero-content-wrapper {
    width: 100%;
    text-align: center;
    padding: 0 20px;
}

.page-news__main-title {
    color: var(--nextbet-gold);
    font-weight: 800;
    margin-bottom: 20px;
    /* No fixed font-size, rely on clamp if needed, otherwise relative */
    font-size: clamp(2em, 4vw, 3.5em); /* Example using clamp */
    line-height: 1.2;
}

.page-news__hero-description {
    font-size: 1.2em;
    color: var(--nextbet-text-secondary);
    max-width: 900px;
    margin: 0 auto 30px;
}

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

/* Latest News Section */
.page-news__latest-news-section {
    padding: 80px 0;
    background-color: var(--nextbet-card-bg); /* Use card background for this section */
    border-top: 1px solid var(--nextbet-divider);
    border-bottom: 1px solid var(--nextbet-divider);
}

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

.page-news__news-card {
    background-color: var(--nextbet-deep-green); /* Slightly different background for cards */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    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 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__news-image {
    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;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-news__card-title a {
    color: var(--nextbet-text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: var(--nextbet-gold);
}

.page-news__card-meta {
    font-size: 0.9em;
    color: var(--nextbet-text-secondary);
    margin-bottom: 15px;
}

.page-news__card-excerpt {
    font-size: 1em;
    color: var(--nextbet-text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more {
    color: var(--nextbet-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    align-self: flex-start; /* Align to start */
}

.page-news__read-more:hover {
    color: var(--nextbet-glow);
    text-decoration: underline;
}

.page-news__view-all-wrapper {
    text-align: center;
    margin-top: 50px;
}

/* Featured Article Section */
.page-news__featured-article-section {
    padding: 80px 0;
    background-color: var(--nextbet-bg);
}

.page-news__article-content {
    max-width: 900px;
    margin: 40px auto 0;
    font-size: 1.1em;
    color: var(--nextbet-text-main);
}

.page-news__article-content h3 {
    font-size: 1.8em;
    color: var(--nextbet-primary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-news__article-content p {
    margin-bottom: 20px;
}

.page-news__article-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 30px;
    display: block;
}

/* Call to Action Section */
.page-news__cta-section {
    padding: 80px 0;
    background-color: var(--nextbet-primary); /* Use primary color for CTA background */
    text-align: center;
    color: var(--nextbet-text-main);
    border-top: 1px solid var(--nextbet-divider);
    border-bottom: 1px solid var(--nextbet-divider);
}

.page-news__cta-section .page-news__section-title {
    color: var(--nextbet-text-main); /* White title on green background */
}

.page-news__cta-section .page-news__section-description {
    color: var(--nextbet-text-main); /* White description on green background */
}

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

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

.page-news__faq-item {
    background-color: var(--nextbet-deep-green);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--nextbet-text-main);
}

.page-news__faq-item summary {
    list-style: none; /* Hide default marker */
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--nextbet-deep-green);
    border-bottom: 1px solid var(--nextbet-divider);
    transition: background-color 0.3s ease;
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-news__faq-item summary:hover {
    background-color: rgba(var(--nextbet-primary), 0.1); /* Subtle hover effect */
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.page-news__faq-qtext {
    flex-grow: 1;
    color: var(--nextbet-text-main);
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--nextbet-gold);
}

.page-news__faq-item[open] .page-news__faq-toggle {
    content: "−"; /* Change to minus when open */
}

.page-news__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: var(--nextbet-text-secondary);
    background-color: var(--nextbet-deep-green);
    border-top: 1px solid var(--nextbet-divider); /* Separator for consistency */
}

/* Responsive Styles */
/* Mobile first approach, desktop styles will override */

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

    .page-news__section-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

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

    /* Hero Section Mobile */
    .page-news__hero-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 40px;
    }

    .page-news__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em); /* Adjust clamp for mobile */
        margin-bottom: 15px;
    }

    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px; /* Add padding to button container */
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important; /* Full width buttons */
        max-width: 100% !important;
        white-space: normal !important; /* Allow text wrapping */
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* News Grid Mobile */
    .page-news__latest-news-section,
    .page-news__featured-article-section,
    .page-news__cta-section,
    .page-news__faq-section {
        padding: 40px 0;
    }

    .page-news__news-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }

    .page-news__news-image {
        height: 180px; /* Adjust image height for mobile */
    }

    .page-news__card-title {
        font-size: 1.2em;
    }

    .page-news__card-excerpt {
        font-size: 0.9em;
    }

    .page-news__article-content {
        font-size: 1em;
    }

    .page-news__article-content h3 {
        font-size: 1.5em;
    }

    /* FAQ Mobile */
    .page-news__faq-item summary {
        font-size: 1em;
        padding: 15px 20px;
    }

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

    /* Image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !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;
    }

    /* Video responsiveness (if any video was added) */
    .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;
    }

    .page-news__hero-image-wrapper {
        padding-bottom: 75%; /* Adjust aspect ratio for mobile hero if needed, e.g., 4:3 */
        margin-bottom: 20px;
    }
}

/* Tablet / Medium Screens */
@media (min-width: 769px) and (max-width: 1024px) {
    .page-news__container {
        padding: 0 30px;
    }

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

    .page-news__hero-section {
        padding-bottom: 50px;
    }

    .page-news__main-title {
        font-size: clamp(2.5em, 5vw, 3em);
    }

    .page-news__hero-description {
        font-size: 1.1em;
    }

    .page-news__news-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns */
        gap: 25px;
    }

    .page-news__news-image {
        height: 200px;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .page-news__hero-section {
        padding-top: 10px;
        padding-bottom: 80px;
    }

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

    .page-news__hero-description {
        font-size: 1.2em;
    }
}