/* style/index.css */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-button-color: #C30808;
    --login-button-color: #C30808;
    --text-on-dark-bg: #FFFFFF;
    --text-on-light-bg: #333333;
    --button-text-color: #FFFF00;
    --default-bg-color: #FFFFFF;
    --border-color: #e0e0e0;
    --card-bg-color: #ffffff;
    --dark-section-bg: #017439;
}

.page-index {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-on-light-bg);
    background-color: var(--default-bg-color);
}

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

.page-index__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-index__section-description {
    font-size: 18px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px;
    color: var(--text-on-light-bg);
}

/* Common CTA Button Styling */
.page-index__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--button-text-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.page-index__cta-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Specific button colors */
.page-index__cta-button--register {
    background: var(--register-button-color);
    color: var(--button-text-color);
}

.page-index__cta-button--login {
    background: var(--login-button-color);
    color: var(--button-text-color);
}

/* HERO Section */
.page-index__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-color: #0a0a0a;
    color: var(--text-on-dark-bg);
}

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

.page-index__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
}

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

.page-index__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    border-radius: 12px;
}

.page-index__hero-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--text-on-dark-bg);
}

.page-index__hero-content p {
    font-size: 22px;
    margin-bottom: 30px;
    color: var(--text-on-dark-bg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-index__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Module 1: Introduction */
.page-index__introduction-section {
    padding: 80px 0;
    background-color: var(--default-bg-color);
    color: var(--text-on-light-bg);
}

/* Module 2: Quick Links */
.page-index__quick-links-section {
    padding: 80px 0;
    background-color: var(--dark-section-bg);
    color: var(--text-on-dark-bg);
}

.page-index__quick-links-section .page-index__section-title {
    color: var(--text-on-dark-bg);
}

.page-index__quick-links-section .page-index__section-description {
    color: var(--text-on-dark-bg);
}

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

.page-index__link-card {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-on-light-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__link-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-index__link-card img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-index__link-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.page-index__link-card p {
    font-size: 16px;
    color: var(--text-on-light-bg);
}

/* Module 3: Core Games */
.page-index__core-games-section {
    padding: 80px 0;
    background-color: var(--default-bg-color);
    color: var(--text-on-light-bg);
}

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

.page-index__game-card {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-index__game-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.page-index__game-card h3 {
    font-size: 24px;
    padding: 20px 20px 0;
    margin-bottom: 10px;
}

.page-index__game-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-index__game-card h3 a:hover {
    text-decoration: underline;
}

.page-index__game-card p {
    font-size: 16px;
    padding: 0 20px 20px;
    color: var(--text-on-light-bg);
}

.page-index__view-all-games {
    text-align: center;
    margin-top: 60px;
}

/* Module 4: Promotions */
.page-index__promotions-section {
    padding: 80px 0;
    background-color: var(--dark-section-bg);
    color: var(--text-on-dark-bg);
}

.page-index__promotions-section .page-index__section-title {
    color: var(--text-on-dark-bg);
}

.page-index__promotions-section .page-index__section-description {
    color: var(--text-on-dark-bg);
}

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

.page-index__promotion-item {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.page-index__promotion-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-index__promotion-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-index__promotion-item h3 {
    font-size: 22px;
    padding: 20px 20px 0;
    color: var(--primary-color);
}

.page-index__promotion-item p {
    font-size: 16px;
    padding: 0 20px 20px;
    color: var(--text-on-light-bg);
}

.page-index__view-all-promotions {
    text-align: center;
    margin-top: 60px;
}

/* Module 5: Security & Support */
.page-index__security-support-section {
    padding: 80px 0;
    background-color: var(--default-bg-color);
    color: var(--text-on-light-bg);
}

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

.page-index__feature-item {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-index__feature-item img {
    width: 250px;
    height: 250px;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-index__feature-item h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.page-index__feature-item p {
    font-size: 16px;
    color: var(--text-on-light-bg);
}

.page-index__contact-support {
    text-align: center;
    margin-top: 60px;
}

/* Module 6: FAQ */
.page-index__faq-section {
    padding: 80px 0;
    background-color: var(--dark-section-bg);
    color: var(--text-on-dark-bg);
}

.page-index__faq-section .page-index__section-title {
    color: var(--text-on-dark-bg);
}

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

.page-index__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

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

.page-index__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--primary-color);
    pointer-events: none;
}

.page-index__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    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-index__faq-item.active .page-index__faq-toggle {
    color: var(--primary-color);
    transform: rotate(45deg);
}

.page-index__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: #f9f9f9;
    color: var(--text-on-light-bg);
    font-size: 16px;
}

.page-index__faq-item.active .page-index__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to contain any content */
    padding: 20px 25px !important;
    opacity: 1;
    border-radius: 0 0 8px 8px;
}

/* Module 7: Latest Blog Content */
.page-index__latest-blog-section {
    padding: 80px 0;
    background-color: var(--default-bg-color);
    color: var(--text-on-light-bg);
}

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

.page-index__blog-card {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-index__blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.page-index__blog-card h3 {
    font-size: 22px;
    padding: 20px 20px 0;
    margin-bottom: 10px;
}

.page-index__blog-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-index__blog-card h3 a:hover {
    text-decoration: underline;
}

.page-index__blog-card p {
    font-size: 16px;
    padding: 0 20px;
    color: var(--text-on-light-bg);
}

.page-index__blog-date {
    display: block;
    font-size: 14px;
    color: #888;
    padding: 10px 20px 20px;
}

.page-index__view-all-news {
    text-align: center;
    margin-top: 60px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-index__hero-content h1 {
        font-size: 40px;
    }
    .page-index__hero-content p {
        font-size: 20px;
    }
    .page-index__section-title {
        font-size: 30px;
    }
    .page-index__section-description {
        font-size: 17px;
    }
}

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

    .page-index__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-index__hero-content h1 {
        font-size: 32px;
    }
    .page-index__hero-content p {
        font-size: 18px;
    }
    .page-index__hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    .page-index__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-index__section-title {
        font-size: 28px;
    }
    .page-index__section-description {
        font-size: 16px;
    }

    .page-index__container {
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }

    /* Images responsive */
    .page-index img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    .page-index__link-cards, .page-index__game-categories, .page-index__promotion-list, .page-index__features, .page-index__blog-articles {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-index__link-card, .page-index__game-card, .page-index__promotion-item, .page-index__feature-item, .page-index__blog-card {
        padding: 20px;
        text-align: left;
    }

    .page-index__link-card img, .page-index__feature-item img {
        
        
        margin-bottom: 15px;
    }
    
    .page-index__link-card h3, .page-index__game-card h3, .page-index__promotion-item h3, .page-index__feature-item h3, .page-index__blog-card h3 {
        font-size: 20px;
        padding: 0;
    }
    .page-index__game-card h3 a {
        display: block;
    }

    .page-index__game-card p, .page-index__promotion-item p, .page-index__feature-item p, .page-index__blog-card p {
        font-size: 15px;
        padding: 0;
    }

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

    .page-index__blog-date {
        padding: 10px 0 0;
    }

    .page-index__introduction-section, .page-index__quick-links-section, .page-index__core-games-section, .page-index__promotions-section, .page-index__security-support-section, .page-index__faq-section, .page-index__latest-blog-section {
        padding: 40px 0;
    }
}