/* style/index-popular-games.css */
:root {
    --primary-color: #FFD700;
    --secondary-color: #1A1A2E;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f5f5f5;
    --bg-dark: #1A1A2E;
    --button-hover-dark: #e6c200;
    --button-hover-light: #0d0d0d;
}

.page-index-popular-games {
    font-family: 'Arial', sans-serif;
    color: var(--text-light); /* Default text color for the main body on dark background */
    background-color: var(--bg-dark); /* Inherits from shared.css body background */
    line-height: 1.6;
}

/* Video Section */
.page-index-popular-games__video-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px);
    background-color: var(--secondary-color);
}

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

.page-index-popular-games__video-link {
    display: block;
    text-decoration: none;
    position: relative;
    width: 100%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index-popular-games__video-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-index-popular-games__video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.page-index-popular-games__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    object-fit: cover;
    pointer-events: none; /* Prevent video controls from blocking click event on parent link */
}

.page-index-popular-games__video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.page-index-popular-games__video-link:hover .page-index-popular-games__video-overlay {
    opacity: 1;
}

.page-index-popular-games__video-click-hint {
    color: var(--text-light);
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    background: rgba(255, 215, 0, 0.8); /* Using primary color with opacity */
    border-radius: 5px;
    white-space: nowrap;
}

.page-index-popular-games__video-cta {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.page-index-popular-games__play-now-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.page-index-popular-games__play-now-button:hover {
    background: var(--button-hover-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Title Section */
.page-index-popular-games__title-section {
    background-color: var(--secondary-color);
    padding: 80px 20px;
    text-align: center;
    color: var(--text-light);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.page-index-popular-games__title-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-index-popular-games__main-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-index-popular-games__title-description {
    font-size: 20px;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-index-popular-games__cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index-popular-games__cta-button:hover {
    background-color: var(--button-hover-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-index-popular-games__section-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-index-popular-games__section-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    line-height: 1.7;
}

/* Games Showcase Section */
.page-index-popular-games__games-showcase-section {
    background-color: var(--secondary-color);
    padding: 80px 20px;
    color: var(--text-light);
}

.page-index-popular-games__games-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-index-popular-games__game-categories {
    margin-top: 60px;
}

.page-index-popular-games__category-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 60px;
    margin-bottom: 20px;
    text-align: center;
}

.page-index-popular-games__category-description {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

.page-index-popular-games__game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.page-index-popular-games__game-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-index-popular-games__game-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.page-index-popular-games__game-card h4 {
    font-size: 22px;
    color: var(--primary-color);
    margin: 20px 20px 10px 20px;
    font-weight: 600;
}

.page-index-popular-games__game-card p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 20px 20px 20px;
    flex-grow: 1;
}

.page-index-popular-games__game-button {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px 20px;
    padding: 12px 0;
    background: var(--primary-color);
    color: var(--text-dark);
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-index-popular-games__game-button:hover {
    background-color: var(--button-hover-dark);
}

/* Why ee88 Section */
.page-index-popular-games__why-ee88 {
    margin-top: 80px;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 60px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-index-popular-games__why-ee88-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.page-index-popular-games__why-ee88-item {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index-popular-games__why-ee88-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-index-popular-games__why-ee88-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 8px;
}

.page-index-popular-games__why-ee88-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-index-popular-games__why-ee88-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

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

.page-index-popular-games__cta-center--margin-top {
    margin-top: 40px;
}

.page-index-popular-games__cta-button--large {
    padding: 18px 45px;
    font-size: 20px;
    border-radius: 10px;
}

/* FAQ Section */
.page-index-popular-games__faq-section {
    background-color: var(--bg-light);
    padding: 80px 20px;
    color: var(--text-dark);
}

.page-index-popular-games__faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-index-popular-games__faq-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 50px;
}

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

.page-index-popular-games__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    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;
}

.page-index-popular-games__faq-question:hover {
    background: var(--bg-light);
    border-color: #d0d0d0;
}

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

.page-index-popular-games__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    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: 32px;
    height: 32px;
}

.page-index-popular-games__faq-item.active .page-index-popular-games__faq-toggle {
    transform: rotate(45deg); /* Change to X or rotate */
    color: var(--secondary-color);
}

.page-index-popular-games__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-color: #fcfcfc;
    border-top: 1px solid #eee;
}

.page-index-popular-games__faq-item.active .page-index-popular-games__faq-answer {
    max-height: 2000px !important; 
    padding: 20px 25px !important;
    opacity: 1;
    border-radius: 0 0 8px 8px;
}

.page-index-popular-games__faq-answer p {
    font-size: 16px;
    color: var(--text-dark);
    margin: 0;
}

/* Brand Section */
.page-index-popular-games__brand-section {
    background-color: var(--secondary-color);
    padding: 80px 20px;
    color: var(--text-light);
}

.page-index-popular-games__brand-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-index-popular-games__brand-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
}

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

.page-index-popular-games__brand-item {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index-popular-games__brand-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-index-popular-games__brand-item h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-index-popular-games__brand-item p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Blog Section */
.page-index-popular-games__blog-section {
    background-color: var(--bg-light);
    padding: 80px 20px;
    color: var(--text-dark);
}

.page-index-popular-games__blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-index-popular-games__blog-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 50px;
}

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

.page-index-popular-games__blog-item {
    background-color: #fff;
    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;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-index-popular-games__blog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-index-popular-games__blog-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-index-popular-games__blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.page-index-popular-games__blog-item-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 20px 20px 10px 20px;
    line-height: 1.4;
}

.page-index-popular-games__blog-item-excerpt {
    font-size: 15px;
    color: var(--text-dark);
    margin: 0 20px 15px 20px;
    flex-grow: 1;
    line-height: 1.6;
}

.page-index-popular-games__blog-item-date {
    font-size: 14px;
    color: #888;
    margin: 0 20px 20px 20px;
    text-align: right;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-index-popular-games__main-title {
        font-size: 42px;
    }
    .page-index-popular-games__title-description {
        font-size: 18px;
    }
    .page-index-popular-games__section-title,
    .page-index-popular-games__faq-title,
    .page-index-popular-games__brand-title,
    .page-index-popular-games__blog-title {
        font-size: 34px;
    }
    .page-index-popular-games__category-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .page-index-popular-games__video-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-index-popular-games__video-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        overflow: hidden !important;
    }
    .page-index-popular-games__video-link {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-index-popular-games__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 4px;
        overflow: hidden !important;
    }
    .page-index-popular-games__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        border-radius: 4px;
        object-fit: contain;
    }
    .page-index-popular-games__video-cta {
        margin-top: 20px;
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .page-index-popular-games__play-now-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 30px !important;
        font-size: 16px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-index-popular-games__video-click-hint {
        font-size: 14px !important;
        padding: 8px 16px !important;
    }

    .page-index-popular-games__title-section {
        padding: 60px 15px;
    }
    .page-index-popular-games__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-index-popular-games__title-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-index-popular-games__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-index-popular-games__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal;
        word-wrap: break-word;
    }

    .page-index-popular-games__games-showcase-section,
    .page-index-popular-games__faq-section,
    .page-index-popular-games__brand-section,
    .page-index-popular-games__blog-section {
        padding: 60px 15px;
    }
    .page-index-popular-games__section-title,
    .page-index-popular-games__faq-title,
    .page-index-popular-games__brand-title,
    .page-index-popular-games__blog-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-index-popular-games__section-description {
        font-size: 16px;
        margin-bottom: 40px;
    }
    .page-index-popular-games__category-title {
        font-size: 24px;
        margin-top: 40px;
        margin-bottom: 15px;
    }
    .page-index-popular-games__category-description {
        font-size: 15px;
        margin-bottom: 30px;
    }
    .page-index-popular-games__game-grid {
        gap: 20px;
    }
    .page-index-popular-games__game-image {
        height: 180px;
    }
    .page-index-popular-games__game-card h4 {
        font-size: 20px;
        margin: 15px 15px 8px 15px;
    }
    .page-index-popular-games__game-card p {
        font-size: 14px;
        margin: 0 15px 15px 15px;
    }
    .page-index-popular-games__game-button {
        width: calc(100% - 30px);
        margin: 0 15px 15px 15px;
        padding: 10px 0;
        font-size: 15px;
    }

    .page-index-popular-games__why-ee88 {
        padding: 40px 20px;
    }
    .page-index-popular-games__why-ee88-content {
        gap: 30px;
    }
    .page-index-popular-games__why-ee88-item {
        padding: 25px;
    }
    .page-index-popular-games__why-ee88-title {
        font-size: 20px;
    }
    .page-index-popular-games__why-ee88-description {
        font-size: 15px;
    }
    .page-index-popular-games__cta-button--large {
        padding: 15px 30px;
        font-size: 18px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-index-popular-games__faq-question {
        padding: 15px 20px;
    }
    .page-index-popular-games__faq-question h3 {
        font-size: 16px;
    }
    .page-index-popular-games__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    .page-index-popular-games__faq-answer {
        padding: 0 20px;
    }
    .page-index-popular-games__faq-item.active .page-index-popular-games__faq-answer {
        padding: 15px 20px !important;
    }

    .page-index-popular-games__brand-content {
        gap: 20px;
    }
    .page-index-popular-games__brand-item {
        padding: 25px;
    }
    .page-index-popular-games__brand-item h3 {
        font-size: 20px;
    }
    .page-index-popular-games__brand-item p {
        font-size: 15px;
    }

    .page-index-popular-games__blog-list {
        gap: 20px;
    }
    .page-index-popular-games__blog-image {
        height: 160px;
    }
    .page-index-popular-games__blog-item-title {
        font-size: 18px;
        margin: 15px 15px 8px 15px;
    }
    .page-index-popular-games__blog-item-excerpt {
        font-size: 14px;
        margin: 0 15px 10px 15px;
    }
    .page-index-popular-games__blog-item-date {
        margin: 0 15px 15px 15px;
    }

    /* Ensure all images, videos, and buttons are responsive */
    .page-index-popular-games img,
    .page-index-popular-games video,
    .page-index-popular-games a[class*="button"],
    .page-index-popular-games a[class*="btn"] {
        max-width: 100% !important;
        height: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-index-popular-games__video-section,
    .page-index-popular-games__video-container,
    .page-index-popular-games__video-wrapper,
    .page-index-popular-games__title-section,
    .page-index-popular-games__title-container,
    .page-index-popular-games__cta-buttons,
    .page-index-popular-games__games-showcase-section,
    .page-index-popular-games__games-container,
    .page-index-popular-games__game-categories,
    .page-index-popular-games__game-grid,
    .page-index-popular-games__why-ee88,
    .page-index-popular-games__why-ee88-content,
    .page-index-popular-games__faq-section,
    .page-index-popular-games__faq-container,
    .page-index-popular-games__faq-list,
    .page-index-popular-games__brand-section,
    .page-index-popular-games__brand-container,
    .page-index-popular-games__brand-content,
    .page-index-popular-games__blog-section,
    .page-index-popular-games__blog-container,
    .page-index-popular-games__blog-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }
    .page-index-popular-games__cta-buttons,
    .page-index-popular-games__game-grid,
    .page-index-popular-games__why-ee88-content,
    .page-index-popular-games__brand-content,
    .page-index-popular-games__blog-list {
        flex-direction: column;
        align-items: center;
    }
    .page-index-popular-games__game-card,
    .page-index-popular-games__why-ee88-item,
    .page-index-popular-games__brand-item,
    .page-index-popular-games__blog-item {
        width: 100%;
        max-width: 400px; /* Limit individual card width on small screens */
    }
}

@media (max-width: 480px) {
    .page-index-popular-games__main-title {
        font-size: 28px;
    }
    .page-index-popular-games__section-title,
    .page-index-popular-games__faq-title,
    .page-index-popular-games__brand-title,
    .page-index-popular-games__blog-title {
        font-size: 24px;
    }
    .page-index-popular-games__category-title {
        font-size: 22px;
    }
    .page-index-popular-games__cta-button--large {
        font-size: 16px;
        padding: 12px 25px;
    }
    .page-index-popular-games__faq-question h3 {
        font-size: 15px;
    }
    .page-index-popular-games__faq-toggle {
        font-size: 22px;
        width: 26px;
        height: 26px;
    }
    .page-index-popular-games__video-click-hint {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
}