/* style/resources.css */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background-color: #ffffff; /* Explicitly set to match shared body background */
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background: linear-gradient(135deg, #017439, #FFFFFF); /* Brand gradient */
    overflow: hidden; /* Prevent content overflow */
}

.page-resources__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-resources__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-resources__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95); /* Slightly transparent white background for text readability */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: -80px; /* Overlap with image for better visual flow */
    color: #333333;
}

.page-resources__main-title {
    font-size: 3.2em;
    color: #017439; /* Primary brand color */
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-resources__intro-text {
    font-size: 1.3em;
    color: #555555;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    min-width: 180px; /* Ensure buttons have a decent minimum width */
    text-align: center;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.page-resources__btn-register {
    background: #C30808; /* Custom red for register */
    color: #FFFF00; /* Custom yellow for register text */
    border: 2px solid #C30808;
}

.page-resources__btn-register:hover {
    background: #e02020;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.page-resources__btn-login {
    background: #C30808; /* Custom red for login */
    color: #FFFF00; /* Custom yellow for login text */
    border: 2px solid #C30808;
}

.page-resources__btn-login:hover {
    background: #e02020;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

/* General Section Styles */
.page-resources__section {
    padding: 80px 20px;
    text-align: center;
}

.page-resources__section-title {
    font-size: 2.5em;
    color: #017439; /* Primary brand color */
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.page-resources__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #017439;
    border-radius: 2px;
}

.page-resources__section-title--white {
    color: #ffffff;
}
.page-resources__section-title--white::after {
    background-color: #ffffff;
}

.page-resources__section-description {
    font-size: 1.1em;
    color: #666666;
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.page-resources__container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box; /* Ensures padding is included in width */
}

/* About b888 Casino Section */
.page-resources__about-b888 {
    background-color: #f9f9f9;
}

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

.page-resources__text-block {
    color: #333333;
}

.page-resources__text-block p {
    margin-bottom: 15px;
    font-size: 1.05em;
}

.page-resources__text-block p a {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

.page-resources__text-block p a:hover {
    text-decoration: underline;
}

.page-resources__image-block img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

/* Game Guides Section */
.page-resources__game-guides {
    background-color: #017439; /* Primary brand color as background */
    color: #ffffff;
}

.page-resources__game-guides .page-resources__section-description {
    color: #f0f0f0;
}

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

.page-resources__card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333; /* Dark text for light card background */
}

.page-resources__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.page-resources__card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency in cards */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-resources__card-title {
    font-size: 1.4em;
    color: #017439; /* Primary brand color */
    margin: 20px 20px 10px 20px;
    line-height: 1.3;
}

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

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

.page-resources__card p {
    font-size: 1em;
    color: #555555;
    padding: 0 20px 15px 20px;
}

.page-resources__btn-secondary {
    display: inline-block;
    padding: 10px 25px;
    margin: 0 20px 20px 20px;
    background: #ffffff;
    color: #017439; /* Primary brand color for text */
    border: 2px solid #017439;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.page-resources__btn-secondary:hover {
    background: #017439;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Promotions Section */
.page-resources__promotions {
    background-color: #f0fdf5; /* Light green background */
}

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

.page-resources__promo-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__promo-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.page-resources__promo-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-resources__promo-content {
    padding: 20px;
}

.page-resources__promo-title {
    font-size: 1.3em;
    color: #017439;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.page-resources__promo-item p {
    font-size: 0.95em;
    color: #555555;
    padding: 0 0 15px 0;
}

.page-resources__btn-primary {
    display: inline-block;
    padding: 10px 25px;
    margin: 0 0 0 0;
    background: #017439; /* Primary brand color */
    color: #ffffff; /* White text for contrast */
    border: 2px solid #017439;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.page-resources__btn-primary:hover {
    background: #005a2e;
    border-color: #005a2e;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-resources__cta-section {
    margin-top: 60px;
    padding: 40px;
    background: #e6f7ed; /* Lighter green background */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.page-resources__cta-section p {
    font-size: 1.2em;
    color: #333333;
    margin-bottom: 30px;
}

/* Security & Support Section */
.page-resources__security-support {
    background-color: #017439; /* Primary brand color */
    color: #ffffff;
}

.page-resources__text-block--white {
    text-align: left;
}

.page-resources__text-block--white h3 {
    color: #ffffff;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.page-resources__text-block--white p {
    color: #f0f0f0;
    margin-bottom: 20px;
}

.page-resources__btn-contact {
    margin-top: 20px;
}

/* FAQ Section */
.page-resources__faq {
    background-color: #ffffff;
}

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

/* FAQ container style */
.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ default state - answer hidden */
.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;
    background: #f9f9f9;
    color: #555555;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height */
.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough to accommodate any content */
    padding: 20px !important;
    opacity: 1;
    border-radius: 0 0 8px 8px;
}

/* Question style */
.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    z-index: 1; /* Ensure question is above answer transition */
}

.page-resources__faq-item.active .page-resources__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #d0d0d0;
}

.page-resources__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-resources__faq-question:active {
    background: #eeeeee;
}

/* Question title style */
.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click events */
}

/* Toggle icon */
.page-resources__faq-toggle {
    font-size: 28px; /* Larger for better tap target */
    font-weight: bold;
    line-height: 1;
    color: #017439; /* Primary brand color */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click events */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e6f7ed; /* Light background for icon */
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: #ffffff;
    background-color: #017439; /* Primary brand color when active */
    transform: rotate(180deg); /* Rotate for minus sign visual */
}

/* Latest News Section */
.page-resources__latest-news {
    background-color: #f9f9f9;
}

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

.page-resources__news-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.page-resources__news-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-resources__news-content {
    padding: 20px;
}

.page-resources__news-title {
    font-size: 1.3em;
    color: #017439;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

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

.page-resources__news-meta {
    font-size: 0.9em;
    color: #888888;
    margin-bottom: 15px;
}