/* style/resources.css */

/* Base styles for the page content, ensuring contrast with dark body background */
.page-resources {
    font-family: 'Arial', sans-serif;
    color: #ffffff; /* Light text for dark body background */
    line-height: 1.6;
    background-color: transparent; /* Body background from shared.css */
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 600px;
    padding: var(--header-offset, 120px) 20px 60px; /* Fixed header spacing */
    background-color: #1A237E; /* Main brand color for hero background */
    overflow: hidden;
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    color: #FFD700; /* Accent color for title */
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

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

.page-resources__hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensure padding doesn't cause overflow */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
    max-width: 100%; /* Ensure responsiveness */
}

.page-resources__btn-primary {
    background-color: #FFD700; /* Accent color */
    color: #1A237E; /* Main brand color for text */
    border: 2px solid #FFD700;
}

.page-resources__btn-primary:hover {
    background-color: #e6c200;
    border-color: #e6c200;
}

.page-resources__btn-secondary {
    background-color: transparent;
    color: #FFD700; /* Accent color */
    border: 2px solid #FFD700;
}

.page-resources__btn-secondary:hover {
    background-color: #FFD700;
    color: #1A237E;
}

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

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background image */
    filter: brightness(0.6); /* Darken image without changing color */
}

/* Section General Styles */
.page-resources__introduction-section,
.page-resources__guide-section,
.page-resources__game-types-section,
.page-resources__strategy-section,
.page-resources__news-section,
.page-resources__faq-section,
.page-resources__cta-section {
    padding: 80px 0;
    background-color: #1A237E; /* Dark brand color for sections */
    color: #ffffff; /* Light text */
}

.page-resources__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: #FFD700; /* Accent color for section titles */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
    color: #f0f0f0;
}

/* Grid Layout for Cards */
.page-resources__grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Card Styles */
.page-resources__card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter background for cards */
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce minimum image size */
    min-height: 200px; /* Enforce minimum image size */
}

.page-resources__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #FFD700; /* Accent color for card titles */
    line-height: 1.3;
}

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

.page-resources__card-title a:hover {
    color: #ffffff;
}

.page-resources__card-description {
    font-size: 1em;
    color: #e0e0e0;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow description to take available space */
}

/* Video Section */
.page-resources__video-section {
    padding: 80px 0;
    background-color: #1A237E;
}

.page-resources__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 0 auto 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-resources__video-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.page-resources__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    cursor: pointer;
}

.page-resources__video-caption {
    text-align: center;
    font-style: italic;
    color: #e0e0e0;
}

/* FAQ Section */
.page-resources__faq-list {
    margin-top: 40px;
}

.page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #1A237E; /* Dark background for question */
    color: #FFD700; /* Accent color for question text */
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
    background-color: #2a348e;
}

.page-resources__faq-heading {
    margin: 0;
    color: inherit;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    transition: transform 0.3s ease;
}

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

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: rgba(255, 255, 255, 0.05); /* Lighter background for answer */
    color: #e0e0e0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 20px 25px;
}

.page-resources__faq-answer p {
    margin-bottom: 15px;
    color: #e0e0e0;
}

.page-resources__faq-answer .page-resources__btn-secondary {
    margin-top: 10px;
    font-size: 0.9em;
    padding: 8px 15px;
    border-radius: 5px;
}

/* CTA Section */
.page-resources__cta-section {
    text-align: center;
    padding: 100px 0;
    background-color: #FFD700; /* Accent color background for strong CTA */
    color: #1A237E; /* Dark text for light background */
}

.page-resources__cta-section .page-resources__section-title {
    color: #1A237E; /* Dark text for title */
}

.page-resources__cta-section .page-resources__text-block {
    color: #333333; /* Darker text for readability on light background */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-resources__cta-buttons .page-resources__btn-primary {
    background-color: #1A237E; /* Main brand color */
    color: #FFD700; /* Accent color text */
    border-color: #1A237E;
}

.page-resources__cta-buttons .page-resources__btn-primary:hover {
    background-color: #0e165e;
    border-color: #0e165e;
}

.page-resources__cta-buttons .page-resources__btn-secondary {
    background-color: transparent;
    color: #1A237E; /* Main brand color */
    border-color: #1A237E;
}

.page-resources__cta-buttons .page-resources__btn-secondary:hover {
    background-color: #1A237E;
    color: #FFD700;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__hero-section {
        min-height: 500px;
    }
}

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

    .page-resources__hero-section {
        padding: var(--header-offset, 120px) 15px 40px;
        min-height: 400px;
    }

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

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

    .page-resources__hero-cta {
        flex-direction: column;
        gap: 15px;
    }

    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-resources__introduction-section,
    .page-resources__guide-section,
    .page-resources__game-types-section,
    .page-resources__strategy-section,
    .page-resources__news-section,
    .page-resources__faq-section,
    .page-resources__cta-section {
        padding: 50px 0;
    }

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

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

    .page-resources__grid-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources__card {
        padding: 20px;
    }

    .page-resources__card-image {
        height: auto; /* Allow height to adjust */
        min-width: 200px;
        min-height: 200px;
        max-width: 100% !important;
        width: 100% !important;
        display: block !important;
    }

    .page-resources__video-wrapper {
        margin-left: 15px;
        margin-right: 15px;
        padding-bottom: 56.25% !important; /* Ensure aspect ratio */
        width: auto !important;
        max-width: calc(100% - 30px) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-resources__faq-question {
        padding: 15px 20px;
        font-size: 1.1em;
    }

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

    .page-resources__cta-section {
        padding: 60px 0;
    }

    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__hero-section {
        min-height: 350px;
    }
}