:root {
    --primary-color: #0A2A5C; /* Deep Blue */
    --secondary-color: #FFD700; /* Gold */
    --accent-color: #E53935; /* Bright Red for emphasis */
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark: #121212; /* Body background from shared.css */
    --card-bg-dark: rgba(255, 255, 255, 0.08); /* Slightly transparent white for dark bg */
    --border-color-dark: rgba(255, 255, 255, 0.15);
    --shadow-dark: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-resources {
    background-color: var(--bg-dark); /* Ensure page content background matches body */
    color: var(--text-light); /* Light text for dark background */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    padding-top: 120px; /* Fixed nav bar spacing for desktop */
}

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

.page-resources__hero-section {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #061A36 100%);
    border-bottom: 5px solid var(--secondary-color);
}

.page-resources__main-title {
    font-size: 3.2em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

.page-resources__hero-description {
    font-size: 1.2em;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 30px;
}

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

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 35px;
    background: var(--accent-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
}

.page-resources__cta-button:hover {
    background: #c02d2a; /* Slightly darker red */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-resources__cta-button--secondary {
    background: var(--primary-color);
    border: 2px solid var(--secondary-color);
}

.page-resources__cta-button--secondary:hover {
    background: #071e3f; /* Slightly darker blue */
    border-color: var(--text-light);
}

.page-resources__cta-buttons--center {
    justify-content: center;
    margin-top: 40px;
}

/* General Section Styling */
.page-resources__game-guides-section,
.page-resources__promotions-section,
.page-resources__faq-section,
.page-resources__brand-section,
.page-resources__blog-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color-dark);
}

.page-resources__game-guides-section {
    background-color: #1a1a1a;
}

.page-resources__promotions-section {
    background-color: var(--bg-dark);
}

.page-resources__faq-section {
    background-color: #1a1a1a;
}

.page-resources__brand-section {
    background-color: var(--bg-dark);
}

.page-resources__blog-section {
    background-color: #1a1a1a;
    border-bottom: none;
}

.page-resources__section-title {
    font-size: 2.5em;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-resources__section-description {
    font-size: 1.1em;
    color: var(--text-light);
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px;
}

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

.page-resources__guide-card {
    background: var(--card-bg-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-resources__guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-resources__guide-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color-dark);
}

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

.page-resources__guide-title {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

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

.page-resources__guide-title a:hover {
    color: var(--text-light);
}

.page-resources__guide-excerpt {
    color: var(--text-light);
    font-size: 0.95em;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-resources__read-more-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    align-self: flex-start;
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__read-more-button:hover {
    background: #071e3f;
    transform: translateY(-2px);
}

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

.page-resources__promo-card {
    background: var(--card-bg-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-resources__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-resources__promo-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color-dark);
}

.page-resources__promo-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-resources__promo-title {
    font-size: 1.4em;
    color: var(--secondary-color);
    padding: 20px 25px 10px;
    line-height: 1.3;
}

.page-resources__promo-text {
    color: var(--text-light);
    font-size: 0.95em;
    padding: 0 25px 20px;
    flex-grow: 1;
}

.page-resources__promo-button {
    display: block;
    width: calc(100% - 50px);
    margin: 0 25px 25px;
    padding: 12px 20px;
    background: var(--accent-color);
    color: var(--text-light);
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__promo-button:hover {
    background: #c02d2a; /* Slightly darker red */
    transform: translateY(-2px);
}

/* FAQ Section */
.page-resources__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: var(--primary-color);
    color: var(--text-light);
    border: 1px solid var(--border-color-dark);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-resources__faq-question:hover {
    background: #08224b;
    border-color: var(--secondary-color);
}

.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: var(--secondary-color);
}

.page-resources__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--secondary-color);
    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-resources__faq-item.active .page-resources__faq-question {
    border-radius: 8px 8px 0 0;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: var(--text-light);
    transform: rotate(45deg); /* Change from + to X or - */
}

.page-resources__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 25px;
    opacity: 0;
    background: var(--card-bg-dark);
    border-radius: 0 0 8px 8px;
    border: 1px solid var(--border-color-dark);
    border-top: none;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Sufficiently large */
    padding: 20px 25px !important;
    opacity: 1;
}

.page-resources__faq-answer p {
    margin: 0;
    color: var(--text-light);
    font-size: 1em;
}

.page-resources__app-download-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__app-download-button:hover {
    background: #c02d2a;
    transform: translateY(-2px);
}

/* Brand Section */
.page-resources__brand-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: center;
}

.page-resources__brand-item {
    background: var(--card-bg-dark);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__brand-icon {
    width: 80px; /* Display size, actual image from GALLERY will be >= 200x200px */
    height: 80px; /* Display size */
    object-fit: contain;
    margin-bottom: 20px;
    filter: brightness(1.2); /* Slightly brighten for visibility on dark bg, not changing hue/saturation */
}

.page-resources__brand-item-title {
    font-size: 1.4em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.page-resources__brand-item p {
    color: var(--text-light);
    font-size: 0.95em;
}

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

.page-resources__blog-item {
    background: var(--card-bg-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-resources__blog-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-resources__blog-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color-dark);
}

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

.page-resources__blog-item-title {
    font-size: 1.3em;
    color: var(--secondary-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-resources__blog-item-title:hover {
    color: var(--text-light);
}

.page-resources__blog-item-excerpt {
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-resources__blog-item-date {
    color: #999;
    font-size: 0.85em;
    align-self: flex-end;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__main-title {
        font-size: 2.8em;
    }
    .page-resources__section-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-resources {
        padding-top: 100px !important; /* Fixed nav bar spacing for mobile */
        font-size: 16px;
        line-height: 1.6;
    }

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

    .page-resources__hero-section {
        padding: 40px 0;
    }

    .page-resources__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-resources__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
    }
    
    .page-resources__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 25px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

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

    .page-resources__game-guides-section,
    .page-resources__promotions-section,
    .page-resources__faq-section,
    .page-resources__brand-section,
    .page-resources__blog-section {
        padding: 50px 0;
    }

    .page-resources__guides-grid,
    .page-resources__promos-grid,
    .page-resources__brand-content,
    .page-resources__blog-list {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .page-resources__guide-card,
    .page-resources__promo-card,
    .page-resources__brand-item,
    .page-resources__blog-item {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }

    .page-resources__guide-image,
    .page-resources__promo-image,
    .page-resources__blog-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Ensure images are responsive */
        object-fit: cover;
    }

    .page-resources__guide-title,
    .page-resources__promo-title,
    .page-resources__brand-item-title,
    .page-resources__blog-item-title {
        font-size: 1.3em;
    }

    .page-resources__faq-question {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    
    .page-resources__faq-question h3 {
        font-size: 1em;
        width: calc(100% - 40px);
    }
    
    .page-resources__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
        margin-left: 10px;
    }

    .page-resources__faq-answer {
        padding: 0 20px;
    }

    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 20px !important;
    }
    
    .page-resources__app-download-button {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 15px 0 0 0;
    }

    .page-resources__promo-button {
        width: calc(100% - 40px);
        margin: 0 20px 20px;
    }
    
    .page-resources__brand-icon {
        width: 60px;
        height: 60px;
    }
}

/* Ensure all images are responsive by default */
.page-resources img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Contrast Fixes (if needed) */
.page-resources__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-resources__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}

/* Specific overrides for color contrast if default fails */
.page-resources p,
.page-resources li {
    color: var(--text-light); /* Ensure paragraphs and list items are light on dark background */
}

/* Ensure link colors have good contrast */
.page-resources a {
    color: var(--secondary-color); /* Gold links */
    text-decoration: none;
}

.page-resources a:hover {
    color: var(--text-light); /* White on hover */
    text-decoration: underline;
}

/* Ensure all containers with images or buttons are responsive */
.page-resources__section,
.page-resources__card,
.page-resources__container,
.page-resources__cta-buttons,
.page-resources__promos-grid,
.page-resources__brand-content,
.page-resources__blog-list {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent content overflow */
}

/* Ensure video responsive styles (though no video section, keep for safety) */
.page-resources video,
.page-resources__video {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

.page-resources__video-section,
.page-resources__video-container,
.page-resources__video-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 768px) {
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}