/* Base styles for the page */
.page-index-popular-games {
    font-family: 'Arial', sans-serif;
    color: #1F2D3D; /* Text Main */
    background-color: #F4F7FB; /* Background */
    line-height: 1.6;
}

/* Hero Section */
.page-index-popular-games__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: #F4F7FB; /* Match page background */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden; /* Ensure no overflow */
}

.page-index-popular-games__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

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

.page-index-popular-games__hero-content {
    max-width: 900px;
    padding: 40px 20px 60px;
    z-index: 1;
    position: relative;
}

.page-index-popular-games__main-title {
    font-size: 48px;
    font-weight: 700;
    color: #2F6BFF; /* Primary color */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-index-popular-games__hero-description {
    font-size: 18px;
    color: #1F2D3D; /* Text Main */
    margin-bottom: 30px;
}

.page-index-popular-games__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%; /* For button responsiveness */
    max-width: 100%; /* For button responsiveness */
    box-sizing: border-box; /* For button responsiveness */
    overflow: hidden; /* For button responsiveness */
}

.page-index-popular-games__btn-primary,
.page-index-popular-games__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 100%; /* Button responsive */
    box-sizing: border-box; /* Button responsive */
    white-space: normal; /* Button responsive */
    word-wrap: break-word; /* Button responsive */
}

.page-index-popular-games__btn-primary {
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button color */
    color: #FFFFFF;
    border: none;
}

.page-index-popular-games__btn-primary:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
    transform: translateY(-2px);
}

.page-index-popular-games__btn-secondary {
    background: #FFFFFF; /* Card BG */
    color: #2F6BFF; /* Primary color */
    border: 2px solid #2F6BFF;
}

.page-index-popular-games__btn-secondary:hover {
    background: #2F6BFF;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* General Content Sections */
.page-index-popular-games__games-overview,
.page-index-popular-games__why-choose,
.page-index-popular-games__faq-section {
    padding: 60px 0;
}

.page-index-popular-games__game-category {
    padding: 50px 0;
}

.page-index-popular-games__dark-section {
    background-color: #2F6BFF; /* Primary color */
    color: #FFFFFF;
}

.page-index-popular-games__dark-section .page-index-popular-games__section-title,
.page-index-popular-games__dark-section .page-index-popular-games__section-description,
.page-index-popular-games__dark-section .page-index-popular-games__game-title,
.page-index-popular-games__dark-section .page-index-popular-games__game-text {
    color: #FFFFFF;
}

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

.page-index-popular-games__section-title {
    font-size: 38px;
    font-weight: 700;
    color: #2F6BFF; /* Primary color */
    text-align: center;
    margin-bottom: 25px;
}

.page-index-popular-games__section-description {
    font-size: 17px;
    color: #1F2D3D; /* Text Main */
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

/* Game Category Layout */
.page-index-popular-games__container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.page-index-popular-games__container--reversed {
    flex-direction: row-reverse;
}

.page-index-popular-games__game-content {
    flex: 1;
}

.page-index-popular-games__game-image-wrapper {
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-index-popular-games__game-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}

.page-index-popular-games__game-title {
    font-size: 32px;
    font-weight: 700;
    color: #2F6BFF; /* Primary color */
    margin-bottom: 20px;
}

.page-index-popular-games__game-text {
    font-size: 17px;
    color: #1F2D3D; /* Text Main */
    margin-bottom: 30px;
}

/* Why Choose Section */
.page-index-popular-games__why-choose-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.page-index-popular-games__why-choose-item.page-index-popular-games__card {
    background: #FFFFFF; /* Card BG */
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.page-index-popular-games__why-choose-item.page-index-popular-games__card:hover {
    transform: translateY(-5px);
}

.page-index-popular-games__why-choose-heading {
    font-size: 24px;
    font-weight: 700;
    color: #2F6BFF; /* Primary color */
    margin-bottom: 15px;
}

.page-index-popular-games__why-choose-text {
    font-size: 16px;
    color: #1F2D3D; /* Text Main */
}

.page-index-popular-games__why-choose-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-index-popular-games__why-choose-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}

/* FAQ Section */
.page-index-popular-games__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

details.page-index-popular-games__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #D6E2FF; /* Border color */
    overflow: hidden;
    background: #FFFFFF; /* Card BG */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
details.page-index-popular-games__faq-item summary.page-index-popular-games__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    color: #1F2D3D; /* Text Main */
}
details.page-index-popular-games__faq-item summary.page-index-popular-games__faq-question::-webkit-details-marker {
    display: none;
}
details.page-index-popular-games__faq-item summary.page-index-popular-games__faq-question:hover {
    background: #F4F7FB; /* Background color */
    color: #2F6BFF; /* Primary color */
}
.page-index-popular-games__faq-qtext {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: inherit; /* Inherit color from summary */
}
.page-index-popular-games__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    color: #2F6BFF; /* Primary color */
    flex-shrink: 0;
    margin-left: 20px;
    width: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}
details.page-index-popular-games__faq-item[open] .page-index-popular-games__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect */
}
details.page-index-popular-games__faq-item .page-index-popular-games__faq-answer {
    padding: 0 25px 20px;
    background: #F4F7FB; /* Background color */
    border-radius: 0 0 8px 8px;
    font-size: 16px;
    color: #1F2D3D; /* Text Main */
}
.page-index-popular-games__faq-answer p {
    margin: 0;
    color: #1F2D3D; /* Text Main */
}
.page-index-popular-games__faq-answer a {
    color: #2F6BFF; /* Primary color */
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-index-popular-games__main-title {
        font-size: 42px;
    }
    .page-index-popular-games__hero-description {
        font-size: 17px;
    }
    .page-index-popular-games__section-title {
        font-size: 34px;
    }
    .page-index-popular-games__game-title {
        font-size: 28px;
    }
    .page-index-popular-games__game-text {
        font-size: 16px;
    }
    .page-index-popular-games__why-choose-grid {
        gap: 20px;
    }
    .page-index-popular-games__why-choose-heading {
        font-size: 22px;
    }
    .page-index-popular-games__faq-qtext {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    /* Hero Section */
    .page-index-popular-games__hero-section {
        padding-top: 10px !important; /* Small top padding for mobile */
    }
    .page-index-popular-games__hero-content {
        padding: 30px 15px 40px;
    }
    .page-index-popular-games__main-title {
        font-size: 32px !important; /* Fixed value for mobile, as clamp is discouraged */
        margin-bottom: 15px;
    }
    .page-index-popular-games__hero-description {
        font-size: 15px;
        margin-bottom: 25px;
    }
    .page-index-popular-games__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-index-popular-games__btn-primary,
    .page-index-popular-games__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* General Content Sections */
    .page-index-popular-games__games-overview,
    .page-index-popular-games__why-choose,
    .page-index-popular-games__faq-section,
    .page-index-popular-games__game-category {
        padding: 40px 0;
    }
    .page-index-popular-games__container {
        flex-direction: column;
        gap: 30px;
        padding-left: 15px;
        padding-right: 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-index-popular-games__section-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    .page-index-popular-games__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }

    /* Game Category Layout */
    .page-index-popular-games__game-content {
        order: 2; /* Content below image on mobile */
    }
    .page-index-popular-games__game-image-wrapper {
        order: 1; /* Image above content on mobile */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-index-popular-games__game-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-index-popular-games__game-title {
        font-size: 24px;
        text-align: center;
        margin-top: 20px;
    }
    .page-index-popular-games__game-text {
        font-size: 15px;
        text-align: center;
    }
    .page-index-popular-games__game-content .page-index-popular-games__btn-primary {
        margin: 0 auto; /* Center button in content block */
    }

    /* Why Choose Section */
    .page-index-popular-games__why-choose-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
        margin-bottom: 30px;
    }
    .page-index-popular-games__why-choose-item.page-index-popular-games__card {
        padding: 25px;
    }
    .page-index-popular-games__why-choose-heading {
        font-size: 20px;
    }
    .page-index-popular-games__why-choose-text {
        font-size: 15px;
    }
    .page-index-popular-games__why-choose-image-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-index-popular-games__why-choose-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* FAQ Section */
    .page-index-popular-games__faq-list {
        margin-top: 30px;
    }
    details.page-index-popular-games__faq-item summary.page-index-popular-games__faq-question {
        padding: 15px 20px;
    }
    .page-index-popular-games__faq-qtext {
        font-size: 16px;
    }
    .page-index-popular-games__faq-toggle {
        font-size: 24px;
        margin-left: 15px;
        width: 25px;
    }
    details.page-index-popular-games__faq-item .page-index-popular-games__faq-answer {
        padding: 0 20px 15px;
        font-size: 15px;
    }
    .page-index-popular-games__faq-answer p {
        font-size: 15px;
    }

    /* General image and container responsiveness */
    .page-index-popular-games img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-index-popular-games__section,
    .page-index-popular-games__card,
    .page-index-popular-games__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}