/* style/news.css */

/* General page styling */
.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 */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: 2;
}

.page-news__hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 30px;
    border-radius: 10px;
    background: rgba(1, 116, 57, 0.8); /* Brand primary color with transparency */
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

.page-news__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* General Section Styling */
.page-news__section {
    padding: 60px 20px;
    text-align: center;
}

.page-news__dark-bg {
    background-color: #017439; /* Primary brand color for dark sections */
    color: #ffffff;
}

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

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

.page-news__section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffffff; /* Default for dark body */
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0; /* Default for dark body */
}

/* Adjust section title/description color for light background sections */
.page-news__featured-news .page-news__section-title,
.page-news__featured-news .page-news__section-description,
.page-news__promotions .page-news__section-title,
.page-news__promotions .page-news__section-description,
.page-news__faq .page-news__section-title {
    color: #333333; /* Dark text for light background sections */
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background-color: #C30808; /* Specific color for register/login */
    color: #FFFF00; /* Specific font color for register/login */
    border: 2px solid #C30808;
}

.page-news__btn-primary:hover {
    background-color: #ff3333;
    border-color: #ff3333;
    color: #ffffff;
}

.page-news__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

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

/* Featured News Grid */
.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: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.3s ease;
}

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

.page-news__card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.page-news__card-content {
    padding: 20px;
    color: #333333; /* Dark text for light card background */
}

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

.page-news__card-title a {
    color: #017439; /* Brand color for link in light card */
    text-decoration: none;
}

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

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

.page-news__card-link {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

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

/* Game Updates List */
.page-news__update-list,
.page-news__guide-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__update-item,
.page-news__guide-item {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.page-news__update-item:hover,
.page-news__guide-item:hover {
    transform: translateY(-5px);
}

.page-news__update-image,
.page-news__guide-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

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

.page-news__update-title,
.page-news__guide-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news__update-title a,
.page-news__guide-title a {
    color: #ffffff; /* White text for dark card background */
    text-decoration: none;
}

.page-news__update-title a:hover,
.page-news__guide-title a:hover {
    text-decoration: underline;
}

.page-news__update-text,
.page-news__guide-text {
    font-size: 0.95em;
    color: #f0f0f0;
}

/* Promotions Cards */
.page-news__promo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__promo-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.3s ease;
}

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

.page-news__promo-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.page-news__promo-content {
    padding: 25px;
    color: #333333; /* Dark text for light card background */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-news__promo-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__promo-title a {
    color: #017439; /* Brand color for link in light card */
    text-decoration: none;
}

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

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

/* CTA Section */
.page-news__cta-section {
    background-color: #017439; /* Primary brand color */
    color: #ffffff;
    padding: 80px 20px;
}

.page-news__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff;
}

.page-news__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

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

/* FAQ Section */
.page-news__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background-color: #f9f9f9;
    color: #333333;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

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

.page-news__faq-heading {
    margin: 0;
    font-size: 1.1em;
    color: #333333;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #017439;
    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 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
    background-color: #ffffff;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 20px;
    padding-top: 0; /* Adjust to prevent double padding with question */
}

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

/* Image responsive styling */
.page-news img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive adjustments */
@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;
    }
    .page-news__cta-title {
        font-size: 2.4em;
    }
    .page-news__news-grid,
    .page-news__update-list,
    .page-news__guide-list,
    .page-news__promo-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        height: 500px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
    }
    .page-news__hero-content {
        padding: 20px;
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__section {
        padding: 40px 15px;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 1em;
    }

    .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;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .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;
      padding-right: 15px;
      flex-wrap: wrap !important;
      gap: 10px;
    }
    .page-news__cta-buttons {
        flex-direction: column;
    }

    .page-news__news-grid,
    .page-news__update-list,
    .page-news__guide-list,
    .page-news__promo-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__card-image,
    .page-news__update-image,
    .page-news__guide-image,
    .page-news__promo-image {
        height: 200px;
    }

    .page-news__card-content,
    .page-news__update-content,
    .page-news__guide-content,
    .page-news__promo-content {
        padding: 15px;
    }

    .page-news__card-title,
    .page-news__update-title,
    .page-news__guide-title,
    .page-news__promo-title {
        font-size: 1.2em;
    }
    .page-news__card-text,
    .page-news__update-text,
    .page-news__guide-text,
    .page-news__promo-text {
        font-size: 0.9em;
    }

    .page-news__cta-section {
        padding: 60px 15px;
    }
    .page-news__cta-title {
        font-size: 2em;
    }
    .page-news__cta-description {
        font-size: 1.1em;
    }
    
    /* Ensure all images are responsive in mobile */
    .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;
    }
    
    .page-news__video-section {
      padding-top: var(--header-offset, 120px) !important;
    }
}

/* Ensure content area images are not smaller than 200px (desktop) */
.page-news__news-card img,
.page-news__update-item img,
.page-news__guide-item img,
.page-news__promo-card img {
    min-width: 200px;
    min-height: 200px;
}
/* For mobile, max-width: 100% takes precedence */
@media (max-width: 768px) {
    .page-news__news-card img,
    .page-news__update-item img,
    .page-news__guide-item img,
    .page-news__promo-card img {
        min-width: unset; /* Reset min-width for mobile responsiveness */
        min-height: unset; /* Reset min-height for mobile responsiveness */
    }
}

/* Color contrast fixes/defaults */
.page-news {
    color: #ffffff; /* Default for dark body background */
}

.page-news__dark-bg {
  color: #ffffff; /* Deep green background, white text */
}

.page-news__light-bg {
  color: #333333; /* White background, dark text */
}

/* Ensure specific button colors are applied */
.page-news__btn-primary {
    background-color: #C30808;
    color: #FFFF00;
    border-color: #C30808;
}
.page-news__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: #ffffff;
}
.page-news__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
}