/* style/resources.css */

/* --- General Page Styles --- */
.page-resources {
    color: #ffffff; /* Body background #0a0a0a is dark, so text is light */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: transparent; /* Assuming body handles the main background */
    padding-top: 0; /* Assumes shared.css sets body padding-top: var(--header-offset) */
}

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

.page-resources__section-title {
    font-size: 36px;
    font-weight: 700;
    color: #FFD700; /* Primary brand color */
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

.page-resources__sub-heading {
    font-size: 24px;
    font-weight: 600;
    color: #FFD700;
    margin-bottom: 15px;
}

.page-resources__sub-heading a {
    color: #FFD700;
    text-decoration: none;
}

.page-resources__sub-heading a:hover {
    text-decoration: underline;
}

/* --- Introduction Section --- */
.page-resources__introduction-section {
    background-color: rgba(30, 144, 255, 0.1); /* Auxiliary color with transparency */
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-resources__introduction-section--with-bg {
    background-image: url('[GALLERY:hero_resources:1920x1080:typhu88,resources,guides,strategy,betting]'); /* Use the hero image as background */
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 100px 0;
}

.page-resources__introduction-section--with-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: 1;
}

.page-resources__introduction-section--with-bg .page-resources__container {
    position: relative;
    z-index: 2;
}

.page-resources__main-heading,
.page-resources__intro-description {
    color: #FFD700; /* Ensure text is visible on dark overlay */
}

.page-resources__main-heading {
    font-size: 48px;
    font-weight: 800;
    color: #FFD700; /* Primary brand color */
    margin-bottom: 25px;
    line-height: 1.2;
    padding: 0 10px;
    box-sizing: border-box;
}

.page-resources__intro-description {
    font-size: 20px;
    color: #f0f0f0;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
    box-sizing: border-box;
}

.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    padding: 0 10px;
    box-sizing: border-box;
}

.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-link {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
    text-align: center;
}

.page-resources__btn-primary {
    background-color: #FFD700; /* Primary brand color */
    color: #1a1a1a; /* Dark text for contrast */
    border: 2px solid #FFD700;
}

.page-resources__btn-primary:hover {
    background-color: #e6c200;
    border-color: #e6c200;
    transform: translateY(-2px);
}

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

.page-resources__btn-secondary:hover {
    background-color: #FFD700;
    color: #1a1a1a;
    transform: translateY(-2px);
}

.page-resources__btn-link {
    background-color: transparent;
    color: #1E90FF;
    text-decoration: underline;
    padding: 0;
    border: none;
    font-size: 16px;
    font-weight: 500;
}

.page-resources__btn-link:hover {
    color: #6aafff;
    text-decoration: none;
}

/* --- Guides Section --- */
.page-resources__guides-section {
    padding: 80px 0;
    background-color: #0a0a0a; /* Dark background from body */
}

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

.page-resources__guide-card {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for card */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    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.3);
}

.page-resources__guide-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency, object-fit will ensure image scales */
    object-fit: cover;
    display: block;
}

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

.page-resources__card-title {
    font-size: 22px;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

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

.page-resources__card-text {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-resources__card-link {
    display: inline-block;
    color: #1E90FF;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-resources__card-link:hover {
    color: #6aafff;
    text-decoration: underline;
}

/* --- Security & Responsible Gaming Section --- */
.page-resources__security-rg-section {
    padding: 80px 0;
    background-color: rgba(30, 144, 255, 0.05); /* Light transparency of auxiliary color */
}

.page-resources__security-rg-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.page-resources__security-rg-content:last-child {
    margin-bottom: 0;
}

.page-resources__security-rg-content--reverse {
    flex-direction: row-reverse;
}

.page-resources__text-block {
    flex: 1;
    color: #f0f0f0;
}

.page-resources__text-block p {
    margin-bottom: 20px;
    font-size: 17px;
}

.page-resources__image-block {
    flex: 1;
    text-align: center;
}

.page-resources__image-block img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: block; /* Ensure image behaves as a block element */
}

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

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

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05); /* Card background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.08); /* Question background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-resources__faq-question:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.page-resources__faq-question:active {
    background: rgba(255, 255, 255, 0.15);
}

.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #FFD700; /* Question text color */
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-resources__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #FFD700;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: #1E90FF;
}

.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 20px;
    opacity: 0;
    color: #cccccc; /* Answer text color */
    background-color: rgba(255, 255, 255, 0.03); /* Slightly darker background for answer */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 5px 5px;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Use !important, large value for content */
    padding: 20px !important;
    opacity: 1;
}

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

/* --- Latest News Section --- */
.page-resources__latest-news-section {
    padding: 80px 0;
    background-color: rgba(30, 144, 255, 0.1);
}

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

.page-resources__news-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-resources__news-card img {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-resources__full-news-cta {
    text-align: center;
    margin-top: 60px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-resources__main-heading {
        font-size: 40px;
    }

    .page-resources__intro-description {
        font-size: 18px;
    }

    .page-resources__section-title {
        font-size: 32px;
    }

    .page-resources__security-rg-content {
        flex-direction: column;
        text-align: center;
    }

    .page-resources__security-rg-content--reverse {
        flex-direction: column; /* Keep consistent for tablet */
    }

    .page-resources__image-block img {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    /* --- General Mobile Adaptations --- */
    .page-resources__container {
        padding: 30px 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .page-resources__main-heading {
        font-size: 30px;
        margin-bottom: 20px;
        padding: 0 5px;
    }

    .page-resources__intro-description {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 5px;
    }

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

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

    /* --- Buttons Mobile Adaptations --- */
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources__btn-link {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 0 auto;
    }

    /* --- Image Mobile Adaptations (Global Rule) --- */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Specific image height adjustments for mobile */
    .page-resources__guide-card img,
    .page-resources__news-card img {
        
        object-fit: cover !important;
    }

    /* --- Guides Grid Mobile Adaptations --- */
    .page-resources__guides-grid,
    .page-resources__news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* --- Security RG Mobile Adaptations --- */
    .page-resources__security-rg-content {
        gap: 20px;
        margin-bottom: 40px;
    }

    /* --- FAQ Mobile Adaptations --- */
    .page-resources__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-resources__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-resources__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px !important;
    }
}

/* Ensure no filter is used on images */
.page-resources img {
    filter: none;
}