/* =========================================================
   GAMES PAGE — games.css
   Eswatini Funzone | Matches homepage design system
   ========================================================= */

/* ── Active nav link highlight ── */
.nav-active {
    color: var(--primary-purple) !important;
    position: relative;
}
.nav-active::after {
    width: 100% !important;
}

/* =========================================================
   GAMES HERO
   ========================================================= */
.games-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 90px;
    overflow: hidden;
    background: var(--brand-blue);
}

.games-hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    animation: floatParticle linear infinite;
    opacity: 0.55;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    user-select: none;
}

@keyframes floatParticle {
    0%   { transform: translateY(0) rotate(0deg);   opacity: 0.55; }
    50%  { opacity: 0.8; }
    100% { transform: translateY(-130px) rotate(25deg); opacity: 0; }
}

.games-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem;
}

.games-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.5rem 1.6rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    backdrop-filter: blur(8px);
    text-transform: uppercase;
}

.games-hero-content h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-bottom: 1.2rem;
}

.games-hero-content p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.85);
    max-width: 640px;
    margin: 0 auto 2.5rem;
    font-weight: 600;
}

.games-hero .hero-buttons {
    justify-content: center;
}

.games-hero .btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.8);
    color: #fff;
}

.games-hero .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: #fff;
}

.games-hero .wave-divider .shape-fill {
    fill: var(--bg-light);
}

/* =========================================================
   STATS STRIP
   ========================================================= */
.stats-strip {
    background: var(--bg-light);
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 3px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(155, 81, 224, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.1));
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-purple);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-label {
    font-family: var(--font-text);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================================
   GAMES SECTION
   ========================================================= */
.games-section {
    background: linear-gradient(180deg, var(--bg-light) 0%, #f0e8ff 50%, var(--bg-light) 100%);
}

/* ── 3-column responsive grid ── */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

/* ── Individual Game Card ── */
.game-card {
    background: var(--bg-white);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 3px solid transparent;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-14px) scale(1.02);
    box-shadow: 0 28px 55px rgba(155, 81, 224, 0.22);
    border-color: var(--primary-purple);
}

.game-card:nth-child(2):hover { border-color: var(--teal); }
.game-card:nth-child(3):hover { border-color: var(--primary-red); }
.game-card:nth-child(4):hover { border-color: var(--primary-red); }
.game-card:nth-child(5):hover { border-color: var(--teal); }
.game-card:nth-child(6):hover { border-color: var(--orange); }

/* ── Image wrapper ── */
.game-img-wrap {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.game-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.game-card:hover .game-img-wrap img {
    transform: scale(1.1);
}

/* ── Hover overlay ── */
.game-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(155, 81, 224, 0.92) 0%,
        rgba(255, 51, 102, 0.5) 55%,
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.game-card:nth-child(2) .game-img-overlay {
    background: linear-gradient(to top, rgba(0, 172, 255, 0.92) 0%, rgba(0, 210, 255, 0.4) 55%, transparent 100%);
}
.game-card:nth-child(3) .game-img-overlay {
    background: linear-gradient(to top, rgba(255, 51, 102, 0.92) 0%, rgba(255, 145, 0, 0.4) 55%, transparent 100%);
}
.game-card:nth-child(4) .game-img-overlay {
    background: linear-gradient(to top, rgba(130, 30, 60, 0.92) 0%, rgba(255, 51, 102, 0.5) 55%, transparent 100%);
}
.game-card:nth-child(5) .game-img-overlay {
    background: linear-gradient(to top, rgba(58, 123, 213, 0.92) 0%, rgba(0, 210, 255, 0.4) 55%, transparent 100%);
}
.game-card:nth-child(6) .game-img-overlay {
    background: linear-gradient(to top, rgba(200, 100, 0, 0.92) 0%, rgba(255, 215, 0, 0.4) 55%, transparent 100%);
}

.game-card:hover .game-img-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    transform: translateY(15px);
    transition: transform 0.4s ease;
    color: #fff;
}

.game-card:hover .overlay-content {
    transform: translateY(0);
}

.overlay-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.overlay-content p {
    color: rgba(255,255,255,0.95);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.game-book-btn {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.8);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition);
}

.game-book-btn:hover {
    background: #fff;
    color: var(--primary-purple);
}

/* ── Badge ── */
.game-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--badge-bg, var(--gradient-primary));
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.35rem 1.1rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2;
}

/* ── Card Body ── */
.game-body {
    padding: 1.8rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-icon-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.game-emoji {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.game-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(155, 81, 224, 0.1);
    color: var(--primary-purple);
    font-family: var(--font-text);
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    border: 1.5px solid rgba(155, 81, 224, 0.2);
}

.tag-hot {
    background: rgba(255, 51, 102, 0.1);
    color: var(--primary-red);
    border-color: rgba(255, 51, 102, 0.25);
}

.tag-new {
    background: rgba(0, 210, 255, 0.1);
    color: #0099cc;
    border-color: rgba(0, 210, 255, 0.25);
}

.game-body h3 {
    font-size: 1.65rem;
    color: var(--primary-purple);
    margin-bottom: 0.7rem;
}

.game-body p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

.game-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.game-features span {
    background: #f4f0fc;
    color: var(--primary-purple);
    font-family: var(--font-text);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    border: 1.5px solid rgba(155, 81, 224, 0.15);
}

.game-cta {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    border: 3px solid var(--primary-purple);
    color: var(--primary-purple);
    background: transparent;
    transition: var(--transition);
    align-self: flex-start;
    margin-top: auto;
}

.game-cta:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(155, 81, 224, 0.4);
}

/* =========================================================
   PHOTO STRIP (Snapshot Gallery)
   ========================================================= */
.photo-strip {
    background: #fffaf0;
}

.photo-strip-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.2rem;
}

.strip-item {
    border-radius: 20px;
    overflow: hidden;
    height: 200px;
    position: relative;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border: 4px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.strip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.strip-item:hover {
    transform: translateY(-10px) scale(1.04);
    border-color: var(--strip-color, var(--primary-purple));
    box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

.strip-item:hover img {
    transform: scale(1.12);
}

.strip-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    padding: 0.6rem 0.5rem;
    letter-spacing: 0.3px;
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

.strip-item:hover .strip-caption {
    transform: translateY(0);
}

/* =========================================================
   CTA BANNER
   ========================================================= */
.games-cta-banner {
    background: var(--gradient-primary);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.games-cta-banner::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.games-cta-banner::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 350px;
    height: 350px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.cta-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.cta-banner-text h2 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 0.6rem;
}

.cta-banner-text p {
    color: rgba(255,255,255,0.88);
    font-size: 1.1rem;
    max-width: 550px;
    margin: 0;
}

.cta-banner-actions {
    display: flex;
    gap: 1.2rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.games-cta-banner .btn-primary {
    background: #fff;
    color: var(--primary-purple);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.games-cta-banner .btn-primary:hover {
    background: var(--yellow);
    color: var(--text-dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 14px 30px rgba(0,0,0,0.25);
}

.games-cta-banner .btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.8);
    color: #fff;
}

.games-cta-banner .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: #fff;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

@media (max-width: 1100px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .photo-strip-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .games-hero {
        min-height: 75vh;
        text-align: center;
    }

    .games-hero-content h1 {
        font-size: 2.8rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .photo-strip-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .strip-item {
        height: 160px;
    }

    .strip-caption {
        transform: translateY(0);
        font-size: 0.78rem;
    }

    .cta-banner-inner {
        flex-direction: column;
        text-align: center;
    }

    .cta-banner-text h2 {
        font-size: 2.2rem;
    }

    .cta-banner-actions {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .games-hero-content h1 {
        font-size: 2.2rem;
    }

    .games-hero-content p {
        font-size: 1rem;
    }

    .photo-strip-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .strip-item {
        height: 140px;
    }

    .game-img-wrap {
        height: 210px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.7rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}
