/* RX24 Landing — mobile & responsive polish */

:root {
    --gold: #ffd700;
}

a, button {
    -webkit-tap-highlight-color: transparent;
}

@media (hover: none) {
    .game-card:hover {
        transform: none;
        border-color: rgba(255, 215, 0, 0.16);
    }

    .promo-card:hover {
        border-color: rgba(255, 255, 255, 0.06);
    }
}

/* ── Mobile navigation drawer ── */
.nav-overlay {
    position: fixed;
    inset: 0;
    top: var(--nav-h, 64px);
    background: rgba(0, 0, 0, 0.72);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

body.landing-nav-open .nav-overlay {
    opacity: 1;
    visibility: visible;
}

body.landing-nav-open {
    overflow: hidden;
}

.navbar .nav-inner {
    position: relative;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s, background 0.2s;
    flex-shrink: 0;
    z-index: 102;
    margin-left: auto;
    padding: 0;
}

.mobile-toggle:hover,
.mobile-toggle:focus {
    border-color: rgba(255, 215, 0, 0.45);
    background: rgba(255, 215, 0, 0.08);
    outline: none;
}

.mobile-toggle.is-open {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.1);
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 22px;
    height: 22px;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s, width 0.2s;
    transform-origin: center;
}

.mobile-toggle.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-toggle.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 769px) {
    .nav-drawer {
        display: contents;
    }
}

/* ── Tablet & below ── */
@media (max-width: 1024px) {
    section {
        padding: 64px 0;
    }

    .section-header h2,
    .promotions > .container > h2,
    .faq > .container > h2 {
        font-size: 1.65rem;
    }

    .game-card-content {
        padding: 22px;
    }

    .cta-box {
        padding: 48px 28px;
    }
}

/* ── Mobile ── */
@media (max-width: 768px) {
    :root {
        --nav-h: 60px;
    }

    .container {
        padding: 0 16px;
    }

    .navbar .container {
        height: var(--nav-h);
    }

    .brand-logo {
        height: 40px;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .navbar .nav-inner {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }

    .mobile-toggle {
        display: flex;
        order: 3;
    }

    .nav-drawer {
        order: 4;
    }

    .logo-link {
        order: 1;
    }

    .nav-drawer {
        display: block;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        z-index: 101;
        background: linear-gradient(180deg, rgba(8, 8, 8, 0.98) 0%, rgba(0, 0, 0, 0.98) 100%);
        border-bottom: 1px solid rgba(255, 215, 0, 0.12);
        padding: 20px 16px 28px;
        padding-bottom: max(28px, env(safe-area-inset-bottom));
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, visibility 0.3s;
        max-height: calc(100vh - var(--nav-h));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.landing-nav-open .nav-drawer {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    body.landing-nav-open .nav-drawer .nav-links,
    body.landing-nav-open .nav-drawer .nav-actions {
        display: flex;
    }

    .nav-drawer .nav-links {
        flex-direction: column;
        gap: 4px;
        width: 100%;
        margin-bottom: 20px;
    }

    .nav-drawer .nav-links a {
        display: block;
        padding: 14px 16px;
        border-radius: 10px;
        font-size: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .nav-drawer .nav-links a:hover,
    .nav-drawer .nav-links a.active {
        background: rgba(255, 215, 0, 0.08);
    }

    .nav-drawer .nav-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding-top: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-drawer .nav-actions .login-link {
        text-align: center;
        padding: 12px;
        font-size: 0.95rem;
    }

    .nav-drawer .nav-actions .btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    /* Hero */
    .hero {
        padding: 40px 0 56px;
    }

    .hero h1 {
        font-size: clamp(1.85rem, 8vw, 2.4rem);
    }

    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .jackpot-box {
        max-width: 100%;
        padding: 16px 20px;
        margin-bottom: 24px;
    }

    .jackpot-value {
        font-size: clamp(1.5rem, 7vw, 2rem);
        word-break: break-word;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        padding: 14px 20px;
    }

    .hero-visual {
        min-height: 260px;
        margin-bottom: 8px;
    }

    .hero-3d-stage {
        max-width: min(100%, 300px) !important;
    }

    /* Games */
    section {
        padding: 48px 0;
    }

    .section-header {
        margin-bottom: 28px;
    }

    .section-header .view-all {
        width: 100%;
        justify-content: flex-start;
    }

    .game-card {
        min-height: 220px;
    }

    .game-card h3 {
        font-size: 1.15rem;
    }

    .game-card p {
        font-size: 0.82rem;
        max-width: none;
    }

    .game-card-content {
        padding: 20px;
    }

    .game-card .btn-sm {
        width: 100%;
        justify-content: center;
    }

    /* Winners ticker */
    .ticker-item {
        padding: 0 24px;
        font-size: 0.78rem;
    }

    /* Promotions */
    .promotions > .container > h2 {
        margin-bottom: 32px;
    }

    .promo-card {
        padding: 28px 22px;
    }

    .promo-percent {
        font-size: 2.5rem;
    }

    .promo-card .btn {
        width: 100%;
    }

    /* FAQ */
    .faq-question {
        padding: 16px 18px;
        font-size: 0.88rem;
        gap: 12px;
    }

    .faq-item.open .faq-answer {
        padding: 0 18px 16px;
        max-height: 400px;
    }

    /* CTA */
    .cta-section {
        padding: 32px 0 56px;
    }

    .cta-box {
        padding: 40px 20px;
    }

    .cta-box .btn {
        width: 100%;
        max-width: 320px;
    }

    /* Footer */
    .footer {
        padding: 48px 0 0;
    }

    .footer-grid {
        gap: 32px;
        margin-bottom: 32px;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-form input {
        border-radius: 8px;
        width: 100%;
    }

    .newsletter-form button {
        border-radius: 8px;
        width: 100%;
        padding: 14px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 400px) {
    .badge {
        font-size: 0.62rem;
        padding: 5px 12px;
    }

    .promo-percent {
        font-size: 2.1rem;
    }

    .hero-sparkles .sparkle--bokeh {
        opacity: 0.6;
    }
}

/* ── Mobile sticky CTA bar ── */
.mobile-cta-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-cta-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        padding: 12px 16px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.96) 100%);
        border-top: 1px solid rgba(255, 215, 0, 0.22);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    }

    body.landing-nav-open .mobile-cta-bar,
    body.landing-cta-hidden .mobile-cta-bar {
        transform: translateY(110%);
        opacity: 0;
        pointer-events: none;
    }

    body.landing-has-cta-bar {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .mobile-cta-login {
        flex-shrink: 0;
        padding: 12px 16px;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text);
        min-height: 48px;
        display: inline-flex;
        align-items: center;
    }

    .mobile-cta-register {
        flex: 1;
        min-height: 48px;
        padding: 12px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .footer-bottom {
        padding-bottom: max(88px, calc(24px + env(safe-area-inset-bottom)));
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-drawer,
    .nav-overlay,
    .hamburger-line {
        transition: none;
    }

    .ticker-track {
        animation: none;
    }
}
