/* 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 (#0d0d0d) */
}

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

.page-news__dark-section {
    background-color: #017439; /* Brand primary color for dark sections */
    color: #ffffff;
    padding: 60px 0;
}

.page-news__light-bg {
    background-color: #f5f5f5; /* Light background for contrast */
    color: #333333; /* Dark text for light background */
    padding: 60px 0;
}

.page-news__section-title {
    font-size: 2.5em;
    color: inherit; /* Inherit from parent section */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1em;
    color: inherit;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

.page-news__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5); /* Darken image for text readability */
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 20px;
    color: #ffffff;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
    color: #ffffff;
}

.page-news__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* Buttons */
.page-news__btn-primary {
    display: inline-block;
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-news__btn-primary:hover {
    background-color: #a00606;
}

.page-news__btn-secondary {
    display: inline-block;
    background-color: #ffffff;
    color: #017439;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 2px solid #017439;
    cursor: pointer;
}

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

.page-news__btn-link {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__btn-link:hover {
    color: #004a25;
    text-decoration: underline;
}

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

.page-news__news-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333;
    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-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

.page-news__card-title {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: bold;
    color: #017439;
}

.page-news__card-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #004a25;
    text-decoration: underline;
}

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

/* Featured Articles List */
.page-news__articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-news__article-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark section */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

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

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

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

.page-news__article-title {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: bold;
    color: #ffffff;
}

.page-news__article-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #f0f0f0;
    text-decoration: underline;
}

.page-news__article-text {
    font-size: 0.95em;
    color: #e0e0e0;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Promotions CTA Section */
.page-news__promotions-cta .page-news__flex-container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-news__promo-content {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.page-news__promo-image-wrapper {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.page-news__promo-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Responsible Gambling Section */
.page-news__responsible-gambling .page-news__container {
    text-align: center;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
}

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

.page-news__faq-item {
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    color: #333333;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background-color: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: #e5e5e5;
}

.page-news__faq-title {
    font-size: 1.15em;
    margin: 0;
    color: #017439;
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #017439;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

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

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #ffffff;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Ensure it expands sufficiently */
    padding: 15px 25px;
}

.page-news__faq-answer p {
    margin: 0;
    font-size: 0.95em;
    color: #555555;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
}

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

    /* Fixed header spacing for mobile */
    .page-news__hero-section {
      padding-top: var(--header-offset, 120px) !important;
    }

    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__btn-primary, .page-news__btn-secondary {
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-news__section-description {
        font-size: 0.9em;
        margin-bottom: 30px;
    }

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

    .page-news__promotions-cta .page-news__flex-container {
        flex-direction: column;
        gap: 30px;
    }
    .page-news__promo-content,
    .page-news__promo-image-wrapper {
        text-align: center;
    }

    /* Images responsive rules (Crucial) */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Image containers responsive rules (Crucial) */
    .page-news__hero-section,
    .page-news__latest-news,
    .page-news__featured-articles,
    .page-news__promotions-cta,
    .page-news__responsible-gambling,
    .page-news__faq-section,
    .page-news__container,
    .page-news__news-card,
    .page-news__article-item,
    .page-news__promo-content,
    .page-news__promo-image-wrapper,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    /* Buttons responsive rules (Crucial) */
    .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; /* Ensure full width */
      box-sizing: border-box !important;
      white-space: normal !important;
      word-wrap: break-word !important;
      padding-left: 15px !important; /* Add padding for text inside */
      padding-right: 15px !important;
      text-align: center; /* Center text in full-width buttons */
    }

    /* Button containers responsive rules (Crucial) */
    .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 !important;
      padding-right: 15px !important;
      overflow: hidden !important;
      display: flex;
      flex-direction: column; /* Stack buttons vertically on mobile */
      gap: 10px; /* Space between stacked buttons */
    }

    /* Specific adjustments for article content padding */
    .page-news__card-content,
    .page-news__article-content {
        padding: 15px;
    }

    .page-news__faq-question {
      padding: 15px 20px;
    }
    .page-news__faq-answer {
      padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
      padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
}