/* Gamevers Top Games Section - Instant Gaming Replica */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;600;700&display=swap');

/* Force ID-like specificity with class repetition or root scoping */
.indies-container {
    align-items: center;
    background-position: 0;
    background-repeat: no-repeat;
    background-size: contain;
    display: flex;
    justify-content: center;
    padding: 60px;
    will-change: background-position;
    position: relative;
    /* Optimization for Parallax */
}

/* Reset Box Sizing for all children */
.indies-container * {
    box-sizing: border-box;
}

/* Bottom Right: Additional Character Art */
.indies-container .character-bottom-right {
    position: absolute;
    bottom: 2.5em;
    right: 1em;
    width: 15em;
    height: 15em;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: contain;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}


/* Left: Character Art */
.indies-container .character {
    width: 380px;
    /* Fallback */
    flex: 0 0 380px;
    /* Exact base width */
    height: 590px;
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: cover;
    position: relative;
    margin-right: 45px;
    flex-shrink: 0;
    z-index: 2;
    will-change: transform;
    /* Optimization for Parallax */
}

/* Character Glow Effect from IG */
.indies-container .character::after {
    display: block;
    position: absolute;
    content: "";
    bottom: 80px;
    left: 50px;
    width: 500px;
    height: 380px;
    z-index: -1;
    /* Behind character */
    background-image: radial-gradient(rgb(255 192 0 / 26%) -20%, transparent 70%);
    pointer-events: none;
}

/* Right: Contents */
.indies-container .games {
    max-width: 790px;
    width: 100%;
    position: relative;
    z-index: 1;
    /* Overlaps bottom-right character but stays behind the main left character */
}

/* Headline styles removed to inherit theme defaults */
.indies-container .headline {
    margin-bottom: 30px;
    width: 100%;
}

/* Listing Grid */
.indies-container .listing-items {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
}

/* Card Item */
.indies-container .item {
    width: calc(50% - 15px);
    /* Ensure precise 2-column split */
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
    position: relative;
    /* Anchor for absolute badge */
    /* Reset margins */
}

/* Cover Image Wrapper (Visual Container) */
/* Cover Image Wrapper (Visual Container) */
.indies-container .card-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    /* Standard widescreen ratio */
}

/* NEW: Media Clipper (Handles Radius & Overflow) */
.indies-container .card-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Clip video overflow */
    border-radius: 10px;
    /* Rounded corners here */
    z-index: 0;
}

/* Cover Image */
/* Cover Image */
.indies-container .cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    display: block;
    box-shadow: none;
    background: #000;
}

.indies-container .cover:hover {
    transform: none;
    box-shadow: none;
}

.indies-container .picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border: none;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border: none;
    margin: 0;
    padding: 0;
    transition: opacity 0.3s ease-out;
    /* Fade out speed */
    background: #000;
}

/* Immediate Reappear on Hover Out (Default State) */
.indies-container .card-visual:not(.video-playing) .picture {
    transition: opacity 0s !important;
    /* Immediate */
    opacity: 1;
}

/* Video Frame */
/* Video Frame */
.indies-container .gv-video-frame {
    position: absolute;
    width: 270% !important;
    /* Matches gv-sp Zoom Crop */
    height: 270% !important;
    top: -100% !important;
    left: -100% !important;
    z-index: 2;
    /* On top of image */
    pointer-events: none;
    background: #000;
    opacity: 0;
    /* HIDDEN BY DEFAULT (Fixes Black Screen) */
    transition: opacity 0.4s ease-out;
}

.indies-container .gv-video-frame iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Playing State (Applied by JS to card-visual) */
.indies-container .card-visual.video-playing .picture {
    opacity: 0;
}

.indies-container .card-visual.video-playing .gv-video-frame {
    opacity: 1;
    /* Fade in container (with black bg + video) */
}

/* Discount Badge */
/* Discount Badge (Featured Game Style) */
/* Discount Badge (Featured Game Style) */
/* Discount Badge */
/* Product Label (New/Hot/etc) */
.indies-container .gv-label {
    position: absolute;
    top: 1em;
    right: 1em;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    color: #fff;
    /* font-family: 'Barlow', sans-serif; */
    /* font-weight: 700; */
    font-size: 0.67rem;
    padding: 0.3em 1em 0.1em 1em;
    border-radius: 0.3em;
    /* text-transform: uppercase; */
    box-shadow: 0 0.2em 0.9em rgba(0, 0, 0, 0.3);
    z-index: 20;
    pointer-events: none;
    line-height: 1.2;
    letter-spacing: 0.07em;
    transition: opacity 0.3s ease, transform 0.3s ease;
}


/* Specific Label Colors (if needed, usually handled by inline style or generic classes) */
.indies-container .gv-label.hot {
    /* background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); */
    /* color: #fff; */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Discount Badge */
.indies-container .discount {
    position: absolute;
    bottom: -0.3em;
    left: -0.2em;
    top: auto;
    background: linear-gradient(135deg, #ff3c4d 0%, #ff9300 100%);
    color: #fff;
    font-family: 'Barlow',
        sans-serif;
    font-weight: 800;
    text-shadow: 0 0.1em 1em rgba(0, 0, 0, 0.5);
    padding: 0.4em 0.8em;
    border-radius: 2em 6em 2em 2em;
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 0.2em 0.8em rgba(255, 95, 109, 0.4);
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 0.3s ease,
        transform 0.3s ease;
    /* Transition for hiding */
}

/* HOVER EFFECTS */

/* 1. Grow Image Container */
.indies-container .card-visual:hover .card-media {
    transform: scale(1.05);
    /* Grow a bit */
    z-index: 5;
    /* Pop over */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    /* Add depth */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}

/* 2. Hide Discount & Label (ONLY if video exists) */
.indies-container .card-visual.has-video:hover .discount,
.indies-container .card-visual.has-video:hover .gv-label {
    opacity: 0;
    transform: translateY(10px);
    /* Slide down */
}

/* 3. Move Badges to match scale (ONLY if NO video) */
.indies-container .card-visual:not(.has-video):hover .gv-label {
    transform: translate(5px, -5px) scale(1.05);
    /* Move out and grow slightly to match */
}

.indies-container .card-visual:not(.has-video):hover .discount {
    transform: translate(-5px, 5px) scale(1.05);
}

/* Ensure smooth return for card-media */
.indies-container .card-media {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}

/* Shine Effect */
.indies-container .discount::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: gv-top-shine 3s infinite;
}

@keyframes gv-top-shine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

/* Information Block */
.indies-container .information {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    align-items: center;
}

.indies-container .text {
    flex: 1;
    margin-right: 15px;
    min-width: 0;
    /* Flexbox text-overflow fix */
}

.indies-container .name .title {
    font-family: 'Barlow', sans-serif !important;
    color: #fff !important;
    display: block;
    line-height: 1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.indies-container .sub {
    font-family: 'Barlow', sans-serif !important;
    font-size: 13px !important;
    color: #aaa !important;
    display: block;
    line-height: 1;
}

/* Price */
.indies-container .price {
    font-family: 'Barlow', sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #fff !important;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1 !important;
}

.indies-container .price del {
    font-size: 12px !important;
    color: #999 !important;
    font-weight: 400 !important;
    text-decoration: line-through;
    opacity: 0.8;
    margin-bottom: 2px;
    display: block;
}

.indies-container .price ins {
    text-decoration: none;
    color: #fff !important;
    background: transparent;
    display: block;
}

/* Responsive Character Scaling (Exact IG Breakpoints) */
@media (max-width: 1635px) {
    .indies-container .character-bottom-right {
        display: none;
    }
}

@media (max-width: 1260px) {
    .indies-container .character {
        margin: -10px 20px -10px 0px;
    }
}

@media (max-width: 1100px) {
    .indies-container .character {
        flex: 0 0 336px;
        height: 551px;
    }

    .indies-container .character-bottom-right {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 1000px) {
    .indies-container .character {
        flex: 0 0 287px;
        height: 471px;
    }

    .indies-container .character-bottom-right {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 900px) {
    .indies-container .character {
        flex: 0 0 240px;
        height: 394px;
    }

    .indies-container .character::after {
        bottom: 40px !important;
        height: 240px !important;
        left: -90px !important;
        width: 260px !important;
    }

    .indies-container .character-bottom-right {
        width: 120px;
        height: 120px;
        opacity: 0.5;
    }
}

@media (max-width: 750px) {
    .indies-container .character {
        flex: 0 0 174px;
        height: 284px;
    }

    .indies-container .character-bottom-right {
        display: none;
    }
}

@media (max-width: 600px) {
    .indies-container .character {
        flex: 0 0 134px;
        height: 220px;
    }
}

@media (max-width: 500px) {
    .indies-container .character {
        display: none;
    }

    .indies-container {
        height: auto;
        /* Allow container to shrink if character is gone */
        padding-bottom: 30px;
    }
}

/* Original Responsive Block (Adjusted) */
@media (max-width: 1024px) {
    .indies-container {
        /* Keep height auto or specific if needed, but IG keeps flex row mostly until very small? */
        /* Actually IG keeps Row layout until 500px where character hides. 
           So we should NOT force column at 1024px anymore if we want "Exact Style".
           We'll trust the flex shrinking above. */
        height: auto;
        /* padding: 20px; */
    }

    /*
    .indies-container .character {
        width: 100%;
        height: 300px;
        margin: 0 0 -50px 0;
        background-position: center bottom;
        background-size: contain;
    }
    */
    .indies-container .games {
        width: 100%;
        padding: 20px 0;
        /* Adjust padding for smaller screens */
    }
}

@media (max-width: 600px) {
    .indies-container .item {
        width: 100%;
    }

    .indies-container {
        padding: 0 20px;
    }
}