/* Mobile Responsive Enhancement for GoldenAura Casino */
/* Fixes for mobile view: background, spacing, positioning */

@media (max-width: 768px) {
    /* ===== MAIN APP BACKGROUND - FIXED ===== */
    /* Ensure background stays fixed and doesn't scroll with content */
    html,
    body {
        background-image: url("/woocasino/images/spin-mobile.jpg") !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-attachment: fixed !important; /* CRITICAL: Background stays in place */
        min-height: 100vh !important;
        position: relative !important;
    }

    /* Ensure body fills viewport */
    body {
        height: auto !important;
        min-height: 100vh !important;
    }

    /* Make main content transparent so fixed background shows through */
    .carcass,
    .carcass__body,
    .section_main,
    main,
    .main-content {
        background: transparent !important;
    }

    /* ===== HERO BANNER - NO BACKGROUND (use main body background) ===== */
    /* Remove banner background so main fixed background shows through */
    .games__hero__wrapper {
        background: transparent !important;
        background-image: none !important;
        padding-bottom: 100vw !important; /* Better ratio for mobile */
        position: relative !important;
        width: 100% !important;
        min-height: 400px !important;
    }

    /* Fix banner content positioning */
    .games__hero__offer__wrapper {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        max-width: 500px !important;
        text-align: center !important;
        z-index: 10 !important;
        padding: 20px !important;
    }

    /* Banner text spacing */
    .games__hero__offer__wrapper h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
        color: #fff !important;
        text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
    }

    .games__hero__offer__wrapper h2 {
        font-size: 36px !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
        color: #ffd700 !important;
        text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
    }

    .games__hero__offer__wrapper .bonus-breakdown {
        font-size: 14px !important;
        max-width: 95% !important;
        margin: 10px auto !important;
        line-height: 1.4 !important;
    }

    /* Banner button */
    .button-hero {
        margin-top: 20px !important;
        padding: 12px 30px !important;
        font-size: 16px !important;
    }

    /* ===== LIVE DEPOSITS SECTION SPACING ===== */
    /* Fix positioning after banner */
    .live-deposits-container,
    [class*="live-deposits"],
    [class*="deposits-banner"] {
        margin-top: 20px !important;
        padding: 15px !important;
    }

    /* Live deposits title */
    .live-deposits-title,
    [class*="deposits"] h2,
    [class*="deposits"] h3 {
        margin-bottom: 15px !important;
        padding: 0 10px !important;
    }

    /* Deposit items spacing */
    .deposit-item,
    [class*="deposit-card"],
    [class*="deposit-item"] {
        margin-bottom: 10px !important;
        padding: 12px 15px !important;
    }

    /* ===== GAMES GRID SPACING ===== */
    /* Fix games section positioning and spacing */
    .games-list,
    .games-grid,
    [class*="games-list"],
    [class*="games-grid"] {
        padding: 15px 10px !important;
        margin-top: 15px !important;
    }

    /* Individual game cards */
    .game-card,
    [class*="game-card"],
    [class*="game-item"] {
        margin-bottom: 15px !important;
        padding: 8px !important;
    }

    /* Game card images */
    .game-card img,
    [class*="game-card"] img,
    [class*="game-item"] img {
        width: 100% !important;
        height: auto !important;
        border-radius: 8px !important;
    }

    /* ===== NAVBAR IMPROVEMENTS ===== */
    /* Real navbar positioning */
    .real-navbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1050 !important;
        background: #0b1019 !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
        height: 60px !important;
    }

    /* Navbar container */
    .real-navbar .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 100% !important;
        padding: 0 15px !important;
    }

    /* Logo in navbar */
    .real-navbar .logo img {
        max-height: 40px !important;
        width: auto !important;
    }

    /* ===== HEADER MOBILE FIX ===== */
    /* Main header wrapper */
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1050 !important;
        background: #0b1019 !important;
        height: 60px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
    }

    .header__mob-container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 60px !important;
        padding: 0 15px !important;
    }

    /* Logo positioning */
    .header__logo {
        flex: 0 0 auto !important;
        max-width: 120px !important;
    }

    .header__logo img {
        max-height: 40px !important;
        width: auto !important;
    }

    /* Mobile menu button */
    .header__mobile-menu {
        width: 40px !important;
        height: 40px !important;
        background: #fff !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }

    /* ===== CONTENT SPACING ===== */
    /* Add padding to main content to account for fixed header */
    body {
        padding-top: 60px !important;
    }

    .section_main,
    main,
    .main-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Fix any content overlap */
    .section {
        position: relative !important;
        z-index: 1 !important;
    }

    /* ===== CONTAINER PADDING ===== */
    /* Improve overall container spacing */
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
    }

    /* Section spacing */
    section {
        padding: 15px 0 !important;
    }

    /* ===== GAMES MENU MOBILE ===== */
    /* Fix games category menu positioning */
    .sticky-games-menu-mob,
    .games-menu-mob-wrapper {
        position: sticky !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1040 !important;
        background: #252630 !important;
        padding: 10px 0 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    }

    /* Games menu scrolling */
    .games-menu-mob {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 10px !important;
    }

    .games-menu-mob::-webkit-scrollbar {
        height: 3px !important;
    }

    .games-menu-mob::-webkit-scrollbar-thumb {
        background: #ffd700 !important;
        border-radius: 2px !important;
    }

    /* ===== BANNER BUTTON IMPROVEMENTS ===== */
    /* Play Now button in banner */
    .banner-button,
    [class*="banner"] button,
    [class*="hero"] button,
    .button-hero {
        padding: 14px 35px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        background: linear-gradient(135deg, #ffd700 0%, #ff6b35 100%) !important;
        color: #000 !important;
        border: none !important;
        box-shadow: 0 4px 15px rgba(255,215,0,0.3) !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }

    .banner-button:active,
    .button-hero:active {
        transform: scale(0.98) !important;
    }

    /* ===== TEXT READABILITY ===== */
    /* Improve text contrast on banner */
    .games__hero__wrapper * {
        font-smooth: always !important;
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }

    /* ===== SPACING BETWEEN SECTIONS ===== */
    /* Proper spacing between major sections */
    .games__hero__wrapper + * {
        margin-top: 20px !important;
    }

    [class*="deposits"] + [class*="games"] {
        margin-top: 20px !important;
    }

    /* ===== FOOTER SPACING ===== */
    /* Ensure footer doesn't overlap content */
    .website-footer {
        margin-top: 40px !important;
        padding-top: 40px !important;
    }

    /* ===== OVERFLOW FIXES ===== */
    /* Prevent horizontal scroll */
    html {
        overflow-x: hidden !important;
    }

    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    * {
        max-width: 100% !important;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* ===== TOUCH IMPROVEMENTS ===== */
    /* Better touch targets */
    button,
    a,
    [role="button"] {
        min-height: 44px !important;
        min-width: 44px !important;
        touch-action: manipulation !important;
    }

    /* Remove tap highlight */
    * {
        -webkit-tap-highlight-color: transparent !important;
    }
}

/* ===== TABLET ADJUSTMENTS (768px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .games__hero__wrapper {
        padding-bottom: 60vw !important;
        min-height: 500px !important;
    }

    .games__hero__offer__wrapper h1 {
        font-size: 32px !important;
    }

    .games__hero__offer__wrapper h2 {
        font-size: 48px !important;
    }
}

/* ===== SMALL MOBILE (max-width: 375px) ===== */
@media (max-width: 375px) {
    .games__hero__wrapper {
        padding-bottom: 110vw !important;
        min-height: 350px !important;
    }

    .games__hero__offer__wrapper h1 {
        font-size: 20px !important;
    }

    .games__hero__offer__wrapper h2 {
        font-size: 28px !important;
    }

    .button-hero {
        padding: 10px 25px !important;
        font-size: 14px !important;
    }

    .header__logo {
        max-width: 100px !important;
    }

    .header__logo img {
        max-height: 35px !important;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    /* GPU acceleration for smooth scrolling */
    .games__hero__wrapper,
    .header,
    .sticky-games-menu-mob {
        will-change: transform !important;
        transform: translateZ(0) !important;
        backface-visibility: hidden !important;
    }

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth !important;
    }

    /* Optimize animations */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
}

