/* style/index-popular-games.css */

/* Custom Colors */
:root {
    --color-background: #08160F;
    --color-card-bg: #11271B;
    --color-text-main: #F2FFF6;
    --color-text-secondary: #A7D9B8;
    --color-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --color-border: #2E7A4E;
    --color-glow: #57E38D;
    --color-gold: #F2C14E;
    --color-divider: #1E3A2A;
    --color-deep-green: #0A4B2C;
}

.page-index-popular-games {
    font-family: 'Arial', sans-serif;
    background-color: var(--color-background); /* Dark background */
    color: var(--color-text-main); /* Light text for dark background */
}

.page-index-popular-games__light-text {
    color: var(--color-text-main);
}

.page-index-popular-games__dark-section {
    background-color: var(--color-background);
    color: var(--color-text-main);
}

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

.page-index-popular-games__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 60px;
    text-align: center;
    overflow: hidden;
    background-color: var(--color-deep-green);
}

.page-index-popular-games__hero-image-wrapper {
    width: 100%;
    max-height: 700px;
    overflow: hidden;
}

.page-index-popular-games__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.page-index-popular-games__hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 40px 20px;
    margin-top: -150px; /* Pull content up over the image slightly for visual flow, not overlay */
    background-color: rgba(17, 39, 27, 0.9); /* Card BG with transparency */
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-border);
}

.page-index-popular-games__hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-gold);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(87, 227, 141, 0.5);
}

.page-index-popular-games__hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-index-popular-games__hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-index-popular-games__btn-primary,
.page-index-popular-games__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-index-popular-games__btn-primary {
    background: var(--color-button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-index-popular-games__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
}

.page-index-popular-games__btn-secondary {
    background-color: transparent;
    color: var(--color-glow);
    border: 2px solid var(--color-glow);
    box-shadow: 0 4px 15px rgba(87, 227, 141, 0.2);
}

.page-index-popular-games__btn-secondary:hover {
    background-color: rgba(87, 227, 141, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(87, 227, 141, 0.4);
}

.page-index-popular-games__section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 8px rgba(87, 227, 141, 0.3);
}

.page-index-popular-games__section-description {
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: var(--color-text-secondary);
}

.page-index-popular-games__intro-section,
.page-index-popular-games__why-choose-section,
.page-index-popular-games__promotions-section,
.page-index-popular-games__cta-section {
    padding: 80px 0;
    background-color: var(--color-deep-green);
    border-bottom: 1px solid var(--color-divider);
}

.page-index-popular-games__games-showcase,
.page-index-popular-games__get-started-section,
.page-index-popular-games__faq-section {
    padding: 80px 0;
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-divider);
}

.page-index-popular-games__game-grid,
.page-index-popular-games__feature-grid,
.page-index-popular-games__steps-grid,
.page-index-popular-games__promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-index-popular-games__game-card,
.page-index-popular-games__feature-card,
.page-index-popular-games__step-card,
.page-index-popular-games__promo-card,
.page-index-popular-games__faq-item {
    background-color: var(--color-card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: center;
    color: var(--color-text-main);
}

.page-index-popular-games__game-card:hover,
.page-index-popular-games__feature-card:hover,
.page-index-popular-games__step-card:hover,
.page-index-popular-games__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.page-index-popular-games__game-image,
.page-index-popular-games__promo-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-index-popular-games__feature-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 20px auto;
    display: block;
    min-width: 200px; /* Enforce min size for content images */
    min-height: 200px; /* Enforce min size for content images */
}

.page-index-popular-games__game-title,
.page-index-popular-games__feature-title,
.page-index-popular-games__step-title,
.page-index-popular-games__promo-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 10px;
}

.page-index-popular-games__game-title a,
.page-index-popular-games__step-title a,
.page-index-popular-games__promo-title a {
    color: var(--color-text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-index-popular-games__game-title a:hover,
.page-index-popular-games__step-title a:hover,
.page-index-popular-games__promo-title a:hover {
    color: var(--color-glow);
}

.page-index-popular-games__game-description,
.page-index-popular-games__feature-description,
.page-index-popular-games__step-description,
.page-index-popular-games__promo-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    flex-grow: 1;
}

.page-index-popular-games__inline-link {
    color: var(--color-glow);
    text-decoration: none;
    font-weight: 500;
}

.page-index-popular-games__inline-link:hover {
    text-decoration: underline;
}

.page-index-popular-games__highlight-text {
    color: var(--color-gold);
    font-weight: 600;
}

.page-index-popular-games__step-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-glow);
    margin-bottom: 15px;
    display: block;
}

.page-index-popular-games__faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.page-index-popular-games__faq-item {
    text-align: left;
    cursor: pointer;
    padding: 20px 25px;
}

.page-index-popular-games__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text-main);
    cursor: pointer;
    list-style: none; /* For <summary> */
}

.page-index-popular-games__faq-question::-webkit-details-marker {
    display: none;
}

.page-index-popular-games__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    color: var(--color-glow);
    transition: transform 0.3s ease;
}

.page-index-popular-games__faq-item[open] .page-index-popular-games__faq-toggle {
    transform: rotate(45deg);
}

.page-index-popular-games__faq-answer {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    padding-top: 15px;
    border-top: 1px solid var(--color-divider);
    margin-top: 15px;
}

.page-index-popular-games__faq-answer p {
    margin-bottom: 0;
    color: var(--color-text-secondary);
}

.page-index-popular-games__cta-center {
    text-align: center;
    margin-top: 50px;
}

.page-index-popular-games__cta-section {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-index-popular-games__hero-content {
        margin-top: -100px;
        padding: 30px 20px;
    }
    .page-index-popular-games__game-grid,
    .page-index-popular-games__feature-grid,
    .page-index-popular-games__steps-grid,
    .page-index-popular-games__promotions-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-index-popular-games__hero-section {
        padding-bottom: 40px;
    }
    .page-index-popular-games__hero-content {
        margin-top: -50px;
        padding: 25px 15px;
    }
    .page-index-popular-games__hero-title {
        font-size: 2rem;
    }
    .page-index-popular-games__hero-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    .page-index-popular-games__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-index-popular-games__btn-primary,
    .page-index-popular-games__btn-secondary {
        padding: 12px 20px;
        font-size: 1rem;
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-index-popular-games__section-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    .page-index-popular-games__section-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    .page-index-popular-games__intro-section,
    .page-index-popular-games__why-choose-section,
    .page-index-popular-games__promotions-section,
    .page-index-popular-games__cta-section,
    .page-index-popular-games__games-showcase,
    .page-index-popular-games__get-started-section,
    .page-index-popular-games__faq-section {
        padding: 40px 0;
    }
    .page-index-popular-games__game-grid,
    .page-index-popular-games__feature-grid,
    .page-index-popular-games__steps-grid,
    .page-index-popular-games__promotions-grid {
        grid-template-columns: 1fr;
    }
    .page-index-popular-games__game-image,
    .page-index-popular-games__promo-image {
        height: 180px;
        min-width: 200px !important;
        min-height: 180px !important;
    }
    .page-index-popular-games__feature-icon {
        min-width: 200px !important;
        min-height: 200px !important;
        width: 100px;
        height: 100px;
    }
    .page-index-popular-games__card {
        padding: 20px;
    }
    .page-index-popular-games__faq-question {
        font-size: 1.1rem;
    }
    .page-index-popular-games__faq-answer {
        font-size: 0.9rem;
    }

    /* Mobile image adaptation */
    .page-index-popular-games img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-index-popular-games__section,
    .page-index-popular-games__card,
    .page-index-popular-games__container,
    .page-index-popular-games__hero-section,
    .page-index-popular-games__hero-image-wrapper,
    .page-index-popular-games__hero-content,
    .page-index-popular-games__game-card,
    .page-index-popular-games__feature-card,
    .page-index-popular-games__step-card,
    .page-index-popular-games__promo-card,
    .page-index-popular-games__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-index-popular-games__hero-cta-buttons {
        flex-wrap: wrap !important;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .page-index-popular-games__hero-title {
        font-size: 1.7rem;
    }
    .page-index-popular-games__section-title {
        font-size: 1.6rem;
    }
}