/*
Theme Name: RAJA88JP Flatsome Child
Theme URI: 
Description: Flatsome Child Theme for RAJA88JP
Author: Antigravity
Author URI: 
Template: flatsome
Version: 1.0.2
*/

html,
body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

@media (max-width: 991px) {

    /* Fix Jackpot Play Banner overflow */
    .home-progressive-jackpot .border-container {
        gap: 10px !important;
        flex-direction: column;
    }

    .home-progressive-jackpot .jackpot-container {
        font-size: 24px !important;
        letter-spacing: 2px !important;
    }

    .home-progressive-jackpot .jackpot-play-section img {
        width: 60px !important;
    }

    /* Fix SEO text / APK section stacking */
    .download-apk {
        flex-direction: column !important;
    }

    .download-apk>div {
        flex-basis: 100% !important;
    }

    .download-apk .h2 {
        font-size: 24px !important;
        line-height: 1.2 !important;
        margin-top: 15px !important;
    }

    .download-apk img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Fix mobile menu cut off by enabling horizontal scroll */
    .menu-slide .top-menu {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

    .menu-slide .top-menu::-webkit-scrollbar {
        display: none; /* Safari and Chrome */
    }

    /* Hide the desktop manual scroll chevrons on mobile */
    .menu-slide > i {
        display: none !important;
    }

    /* Fix home inner container (Jackpot and Lottery) layout on mobile */
    .home-inner-container {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .home-inner-container > div {
        width: 100% !important;
    }

    /* Fix Popular Games overflow and enable adaptive smooth scrolling on mobile */
    .popular-game-title-container {
        max-width: 100vw;
        overflow: hidden;
    }
    
    .popular-game-title-container .container-content {
        width: 100%;
    }

    .popular-game-title-container .container-content .game-list {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        scrollbar-width: none; /* Firefox */
        width: 100%;
        gap: 10px;
        padding-bottom: 10px;
    }
    
    .popular-game-title-container .container-content .game-list::-webkit-scrollbar {
        display: none; /* Safari and Chrome */
    }

    .popular-game-title-container .container-content .game-list .games-group {
        /* Adapt to screen width (approx 2.5 items visible), bounded by min/max */
        width: 42vw !important; 
        min-width: 130px !important;
        max-width: 180px !important;
        flex-shrink: 0 !important;
        scroll-snap-align: start;
    }
}

/* Fix overlapping banner due to fixed aspect ratio */
.banner {
    aspect-ratio: auto !important;
    height: auto !important;
}
/* Override Flatsome default banner styles */
.banner {
    display: block !important;
    height: auto !important;
}

/* --- PREMIUM UI BEAUTIFICATION --- */

/* 1. Game Populer Section Beautification */
.popular-game-title-container .container-title {
    position: relative;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 0, 0, 0.4) !important;
}

.popular-game-title-container .container-title span {
    background: linear-gradient(90deg, #ff0844 0%, #ffb199 100%) !important;
    color: #fff !important;
    padding: 10px 30px !important;
    border-radius: 8px 8px 0 0;
    font-weight: 800;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 -4px 15px rgba(255, 8, 68, 0.4);
    display: inline-block;
}

.popular-game-title-container .container-title span::after {
    display: none !important; /* Hide old pseudo-element triangle if it exists */
}

.popular-game-title-container .container-content .game-list .game-item {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease !important;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(20, 25, 45, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.popular-game-title-container .container-content .game-list .game-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 8, 68, 0.5);
}

.popular-game-title-container .container-content .game-list .game-item .game-name {
    padding: 8px;
    color: #ffd700 !important;
    font-weight: 600;
}

/* 2. Content / APK Download Section Beautification */
.download-apk {
    background: rgba(10, 15, 40, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 30px;
}

.download-apk .h2 {
    color: #ffc107 !important; /* Brilliant Gold */
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 0px 4px 15px rgba(255, 193, 7, 0.3);
    margin-bottom: 20px !important;
    font-size: 28px;
}

.download-apk p {
    font-size: 16px;
    line-height: 1.7;
    color: #e0e0e0 !important;
    font-style: normal !important;
    margin-bottom: 25px;
}

/* Make the button pop */
.download-apk .button1 {
    display: inline-block;
    background: linear-gradient(to right, #f12711, #f5af19) !important;
    color: #fff !important;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 16px;
    text-transform: uppercase;
    box-shadow: 0 5px 20px rgba(241, 39, 17, 0.4);
    transition: all 0.3s ease;
    text-decoration: none !important;
    border: none;
}

.download-apk .button1:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(241, 39, 17, 0.6);
    background: linear-gradient(to right, #f5af19, #f12711) !important;
}

/* Image styling */
.download-apk img {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s ease;
}

.download-apk img:hover {
    transform: scale(1.03);
}

/* --- POSTS AND PAGES UI BEAUTIFICATION --- */

/* Base background for default templates */
body.page, body.single, body.blog, body.archive {
    background-color: #01031a !important;
}

body.page #main, body.single #main, 
body.blog #main, body.archive #main {
    background-color: transparent !important;
}

/* Glassmorphism card style for content wrappers */
.page-wrapper .page-inner, 
.post-wrapper .post-inner,
.blog-wrapper .post-inner,
#content .page-inner {
    background: rgba(10, 15, 40, 0.8) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
    color: #e0e0e0 !important;
    padding: 40px !important;
    margin: 40px auto !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

/* Typography Improvements */
.entry-title, .page-title {
    color: #ffc107 !important; /* Brilliant Gold */
    font-size: 32px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    margin-bottom: 25px !important;
    text-shadow: 0 4px 15px rgba(255, 193, 7, 0.3) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    line-height: 1.3 !important;
}

.entry-content p, .page-content p {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #d1d5db !important;
    margin-bottom: 20px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

/* Style headings inside content */
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4,
.page-content h1, .page-content h2, .page-content h3, .page-content h4 {
    color: #ffb199 !important;
    font-weight: 700 !important;
    margin-top: 30px !important;
    margin-bottom: 15px !important;
}

/* Links */
.entry-content a, .page-content a {
    color: #ff0844 !important;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.entry-content a:hover, .page-content a:hover {
    color: #ffb199 !important;
    text-decoration: underline;
}

/* Quotes and Lists */
.entry-content blockquote, .page-content blockquote {
    background: rgba(255, 255, 255, 0.05) !important;
    border-left: 4px solid #ff0844 !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #f3f4f6 !important;
}

.entry-content ul, .page-content ul,
.entry-content ol, .page-content ol {
    margin-left: 20px !important;
    margin-bottom: 20px !important;
}

.entry-content ul li, .page-content ul li,
.entry-content ol li, .page-content ol li {
    color: #d1d5db !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    margin-bottom: 10px !important;
}
