/* style/resources.css */

/* Base Styles */
.page-resources {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Default text color for light background */
    line-height: 1.6;
    background-color: #FFFFFF; /* Ensures white background as per instruction */
}

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

.page-resources__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand primary color */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-resources__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: #555555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__sub-title {
    font-size: 1.8em;
    color: #017439;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-resources__card-title {
    font-size: 1.3em;
    color: #017439;
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-resources__card-title a {
    color: #017439;
    text-decoration: none;
}

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

.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__card-link {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box; /* Ensure padding doesn't push width */
}

.page-resources__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

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

.page-resources__btn-secondary {
    background-color: #FFFFFF;
    color: #017439;
    border: 2px solid #017439;
}

.page-resources__btn-secondary:hover {
    background-color: #e0e0e0;
    color: #017439;
}

.page-resources__card-link {
    background-color: #017439;
    color: #FFFFFF;
    border: 1px solid #017439;
    padding: 8px 15px;
    font-size: 0.9em;
    margin-top: 15px;
}

.page-resources__card-link:hover {
    background-color: #005a2e;
    border-color: #005a2e;
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    padding: 100px 20px;
    background: linear-gradient(rgba(1, 116, 57, 0.8), rgba(1, 116, 57, 0.8)), url('[GALLERY:hero_bg:1920x1080:thái hoà 88, online betting, vibrant casino, sports stadium, winning moments]') center/cover no-repeat;
    color: #FFFFFF;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding-top: var(--header-offset, 120px); /* Apply header offset here */
}

.page-resources__main-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFF00; /* Yellow for main title as per color scheme */
}

.page-resources__subtitle {
    font-size: 1.3em;
    max-width: 900px;
    margin: 0 auto 40px auto;
    line-height: 1.5;
}

.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Intro Section */
.page-resources__intro-section {
    padding: 80px 0;
    background-color: #FFFFFF;
}

.page-resources__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.page-resources__grid--reverse {
    grid-template-columns: 1fr 1fr; /* Default order */
}

.page-resources__intro-content p {
    margin-bottom: 15px;
    color: #333333;
}

.page-resources__intro-image img,
.page-resources__security-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Game Strategy Section */
.page-resources__game-strategy-section {
    padding: 80px 0;
    background-color: #017439; /* Dark background */
    color: #FFFFFF;
}

.page-resources__game-strategy-section .page-resources__section-title,
.page-resources__game-strategy-section .page-resources__section-description {
    color: #FFFFFF;
}

.page-resources__strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-resources__strategy-card {
    background-color: #FFFFFF;
    color: #333333;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-resources__strategy-card img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: cover;
}

.page-resources__strategy-card .page-resources__card-title a {
    color: #017439;
}

.page-resources__strategy-card .page-resources__card-text {
    flex-grow: 1;
    margin-bottom: 20px;
}

/* News Section */
.page-resources__news-section {
    padding: 80px 0;
    background-color: #f8f8f8;
}

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

.page-resources__news-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 25px;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.page-resources__news-card .page-resources__card-title a {
    color: #017439;
}

.page-resources__news-card .page-resources__card-text {
    flex-grow: 1;
    margin-bottom: 15px;
    color: #555555;
}

/* Promotions Section */
.page-resources__promotions-section {
    padding: 80px 0;
    background-color: #017439;
    color: #FFFFFF;
}

.page-resources__promotions-section .page-resources__section-title,
.page-resources__promotions-section .page-resources__section-description {
    color: #FFFFFF;
}

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

.page-resources__promo-card {
    background-color: #FFFFFF;
    color: #333333;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-resources__promo-card img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: cover;
}

.page-resources__promo-card .page-resources__card-title a {
    color: #017439;
}

.page-resources__promo-card .page-resources__card-text {
    flex-grow: 1;
    margin-bottom: 20px;
}

/* Security & Support Section */
.page-resources__security-support-section {
    padding: 80px 0;
    background-color: #FFFFFF;
}

.page-resources__security-content p {
    margin-bottom: 15px;
    color: #333333;
}

.page-resources__security-support-section .page-resources__btn-primary,
.page-resources__security-support-section .page-resources__btn-secondary {
    margin-top: 20px;
    margin-right: 15px;
}

/* FAQ Section */
.page-resources__faq-section {
    padding: 80px 0;
    background-color: #017439;
    color: #FFFFFF;
}

.page-resources__faq-section .page-resources__section-title,
.page-resources__faq-section .page-resources__section-description {
    color: #FFFFFF;
}

.page-resources__faq-list {
    max-width: 800px;
    margin: 40px auto;
}

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

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    background-color: #f5f5f5;
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-question h3 {
    margin: 0;
    color: #017439;
    font-size: 1.1em;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #017439;
}

.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, padding 0.3s ease;
    background-color: #FFFFFF;
    color: #333333;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 15px 25px;
}

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

.page-resources__faq-answer p:last-child {
    margin-bottom: 0;
}

.page-resources__faq-answer a {
    color: #017439;
    text-decoration: underline;
}

.page-resources__cta-buttons--faq {
    margin-top: 40px;
}

/* Video Section */
.page-resources__video-section {
    padding: 80px 0;
    background-color: #f8f8f8;
    text-align: center;
}

.page-resources__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto 30px auto;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    background-color: #000; /* Fallback for video */
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__main-title {
        font-size: 3em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__grid {
        grid-template-columns: 1fr;
    }
    .page-resources__grid--reverse {
        grid-template-columns: 1fr;
    }
    .page-resources__intro-image,
    .page-resources__security-image {
        order: -1; /* Image first on mobile for intro/security */
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding: 80px 15px;
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
    }

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

    .page-resources__subtitle {
        font-size: 1.1em;
    }

    .page-resources__section-title {
        font-size: 1.8em;
    }

    .page-resources__section-description {
        font-size: 1em;
    }

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

    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources a[class*="button"],
    .page-resources 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-resources__cta-buttons,
    .page-resources__button-group,
    .page-resources__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-resources__strategy-grid,
    .page-resources__news-grid,
    .page-resources__promo-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile image responsiveness */
    .page-resources img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-resources__intro-section,
    .page-resources__game-strategy-section,
    .page-resources__news-section,
    .page-resources__promotions-section,
    .page-resources__security-support-section,
    .page-resources__faq-section,
    .page-resources__video-section,
    .page-resources__container,
    .page-resources__card,
    .page-resources__faq-item,
    .page-resources__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    
    /* Mobile video responsiveness */
    .page-resources video,
    .page-resources__video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }

    .page-resources__video-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure video section has correct padding-top on mobile */
    }
}

/* Ensure content area images are not small */
.page-resources__intro-image img,
.page-resources__strategy-card img,
.page-resources__promo-card img,
.page-resources__security-image img,
.page-resources__video {
    min-width: 200px;
    min-height: 200px;
}