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

/* Variables for colors, ensuring WCAG AA contrast */
:root {
    --page-index-popular-games-primary-color: #007bff; /* Blue */
    --page-index-popular-games-secondary-color: #28a745; /* Green */
    --page-index-popular-games-text-dark: #333333; /* Dark gray for light backgrounds */
    --page-index-popular-games-text-light: #ffffff; /* White for dark backgrounds */
    --page-index-popular-games-background-light: #f8f9fa; /* Light gray background */
    --page-index-popular-games-background-dark: #0056b3; /* Darker blue for contrast */
    --page-index-popular-games-border-color: #dee2e6;
}

.page-index-popular-games {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--page-index-popular-games-text-dark);
}

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

.page-index-popular-games__section {
    padding: 60px 0;
    background-color: var(--page-index-popular-games-background-light);
}

.page-index-popular-games__section:nth-of-type(even) {
    background-color: #ffffff;
}

.page-index-popular-games__hero-section {
    background: linear-gradient(135deg, var(--page-index-popular-games-primary-color) 0%, var(--page-index-popular-games-secondary-color) 100%);
    color: var(--page-index-popular-games-text-light);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-index-popular-games__main-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--page-index-popular-games-text-light);
}

.page-index-popular-games__hero-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px;
    color: var(--page-index-popular-games-text-light);
}

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

.page-index-popular-games__button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1.1em;
    cursor: pointer;
}

.page-index-popular-games__button--primary {
    background-color: var(--page-index-popular-games-secondary-color);
    color: var(--page-index-popular-games-text-light);
    border: 2px solid var(--page-index-popular-games-secondary-color);
}

.page-index-popular-games__button--primary:hover {
    background-color: #218838; /* Darker green */
    transform: translateY(-2px);
}

.page-index-popular-games__button--secondary {
    background-color: transparent;
    color: var(--page-index-popular-games-text-light);
    border: 2px solid var(--page-index-popular-games-text-light);
}

.page-index-popular-games__button--secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.page-index-popular-games__section-title {
    font-size: 2.5em;
    color: var(--page-index-popular-games-primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-index-popular-games__section-subtitle {
    font-size: 1.1em;
    color: var(--page-index-popular-games-text-dark);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-index-popular-games__feature-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index-popular-games__feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-index-popular-games__feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.1));
}

.page-index-popular-games__feature-title {
    font-size: 1.5em;
    color: var(--page-index-popular-games-primary-color);
    margin-bottom: 15px;
}

.page-index-popular-games__feature-description {
    font-size: 1em;
    color: var(--page-index-popular-games-text-dark);
}

.page-index-popular-games__game-categories .page-index-popular-games__category-card {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    overflow: hidden;
    flex-wrap: wrap;
}

.page-index-popular-games__game-categories .page-index-popular-games__category-card--reverse {
    flex-direction: row-reverse;
}

.page-index-popular-games__category-content {
    flex: 1;
    padding: 40px;
    min-width: 300px;
}

.page-index-popular-games__category-image-wrapper {
    flex: 1;
    min-width: 300px;
    height: 350px;
    overflow: hidden;
}

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

.page-index-popular-games__category-title {
    font-size: 2em;
    color: var(--page-index-popular-games-primary-color);
    margin-bottom: 15px;
}

.page-index-popular-games__category-description {
    margin-bottom: 25px;
    color: var(--page-index-popular-games-text-dark);
}

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

.page-index-popular-games__step-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
}

.page-index-popular-games__step-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--page-index-popular-games-secondary-color);
    margin-bottom: 15px;
}

.page-index-popular-games__step-title {
    font-size: 1.4em;
    color: var(--page-index-popular-games-primary-color);
    margin-bottom: 10px;
}

.page-index-popular-games__step-description {
    color: var(--page-index-popular-games-text-dark);
}

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

.page-index-popular-games__app-download .page-index-popular-games__app-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.page-index-popular-games__app-text {
    flex: 1;
    min-width: 300px;
}

.page-index-popular-games__app-image-wrapper {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.page-index-popular-games__app-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-index-popular-games__app-benefits {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.page-index-popular-games__app-benefits li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: var(--page-index-popular-games-text-dark);
}

.page-index-popular-games__benefit-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    filter: invert(30%) sepia(80%) saturate(1000%) hue-rotate(100deg) brightness(90%) contrast(100%); /* Greenish tint */
}

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

.page-index-popular-games__promo-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index-popular-games__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-index-popular-games__promo-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.1));
}

.page-index-popular-games__promo-title {
    font-size: 1.5em;
    color: var(--page-index-popular-games-primary-color);
    margin-bottom: 15px;
}

.page-index-popular-games__promo-description {
    color: var(--page-index-popular-games-text-dark);
}

.page-index-popular-games__safety {
    background-color: var(--page-index-popular-games-background-light);
}

.page-index-popular-games__safety-intro {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--page-index-popular-games-text-dark);
}

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

.page-index-popular-games__safety-item {
    background-color: #ffffff;
    border-left: 5px solid var(--page-index-popular-games-primary-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-index-popular-games__safety-subtitle {
    font-size: 1.4em;
    color: var(--page-index-popular-games-primary-color);
    margin-bottom: 15px;
}

.page-index-popular-games__safety-item p {
    color: var(--page-index-popular-games-text-dark);
}

.page-index-popular-games__faq {
    background-color: #ffffff;
}

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

.page-index-popular-games__accordion-item {
    border: 1px solid var(--page-index-popular-games-border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-index-popular-games__accordion-header {
    background-color: var(--page-index-popular-games-primary-color);
    color: var(--page-index-popular-games-text-light);
    padding: 18px 25px;
    width: 100%;
    text-align: left;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-index-popular-games__accordion-header::after {
    content: '+';
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.page-index-popular-games__accordion-header.active {
    background-color: var(--page-index-popular-games-background-dark);
}

.page-index-popular-games__accordion-header.active::after {
    transform: rotate(45deg);
}

.page-index-popular-games__accordion-content {
    padding: 0 25px;
    background-color: var(--page-index-popular-games-background-light);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.page-index-popular-games__accordion-content p {
    padding: 15px 0;
    color: var(--page-index-popular-games-text-dark);
}

.page-index-popular-games__accordion-item.active .page-index-popular-games__accordion-content {
    max-height: 200px; /* Adjust based on content */
    padding: 15px 25px;
}

.page-index-popular-games__final-cta {
    background: linear-gradient(135deg, var(--page-index-popular-games-primary-color) 0%, var(--page-index-popular-games-background-dark) 100%);
    color: var(--page-index-popular-games-text-light);
    text-align: center;
    padding: 80px 0;
}

.page-index-popular-games__final-cta-content {
    max-width: 900px;
}

.page-index-popular-games__final-cta-title {
    color: var(--page-index-popular-games-text-light);
    margin-bottom: 25px;
}

.page-index-popular-games__final-cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: var(--page-index-popular-games-text-light);
}

.page-index-popular-games__button--large {
    padding: 18px 40px;
    font-size: 1.2em;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-index-popular-games__main-title {
        font-size: 2.8em;
    }
    .page-index-popular-games__section-title {
        font-size: 2em;
    }
    .page-index-popular-games__category-content, .page-index-popular-games__category-image-wrapper {
        flex: 1 1 100%;
    }
    .page-index-popular-games__app-content {
        flex-direction: column;
    }
    .page-index-popular-games__app-text, .page-index-popular-games__app-image-wrapper {
        min-width: unset;
    }
}

@media (max-width: 768px) {
    .page-index-popular-games__hero-section {
        padding: 80px 0;
    }
    .page-index-popular-games__main-title {
        font-size: 2.2em;
    }
    .page-index-popular-games__hero-description {
        font-size: 1em;
    }
    .page-index-popular-games__button {
        padding: 12px 25px;
        font-size: 1em;
    }
    .page-index-popular-games__section-title {
        font-size: 1.8em;
    }
    .page-index-popular-games__category-card {
        flex-direction: column !important; /* Override reverse for mobile */
    }
    .page-index-popular-games__category-image-wrapper {
        height: 250px;
    }
    .page-index-popular-games__cta-center .page-index-popular-games__button--large {
        padding: 15px 30px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .page-index-popular-games__container {
        padding: 0 15px;
    }
    .page-index-popular-games__hero-section {
        padding: 60px 0;
    }
    .page-index-popular-games__main-title {
        font-size: 1.8em;
    }
    .page-index-popular-games__section-title {
        font-size: 1.5em;
    }
    .page-index-popular-games__hero-cta-group {
        flex-direction: column;
        gap: 15px;
    }
    .page-index-popular-games__button {
        width: 100%;
    }
    .page-index-popular-games__category-content {
        padding: 25px;
    }
    .page-index-popular-games__category-title {
        font-size: 1.5em;
    }
    .page-index-popular-games__app-content {
        padding: 25px;
    }
}