/* Main Wrapper with Background & Rounding */
.gv-features-section-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    margin-bottom: 0px;
    background-color: #000;
    /* Fallback */
}

/* The Background Image Layer */
.gv-features-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* Parallax Magic */
    z-index: 0;
}

/* Content Overlay (Title + Grid) */
.gv-features-content-overlay {
    position: relative;
    z-index: 1;
    padding: 20px 1.5em 1.8em 1.5em;
    /* Add inner padding */
    background: rgba(0, 0, 0, 0.2);
    /* Optional generic overlay for text readiness */
}

/* Title Style */
.gv-features-title {
    width: 100%;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
    margin-top: 0;
    /* Reset top margin since we have padding now */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gv-features-title.gv-in-view {
    opacity: 1;
    transform: translateY(0);
}


/* Feature Card (Instant Gaming Replica - Fluid & Responsive) */
.gv-game-features-container {
    --columns: 7;
    --gap: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    justify-content: center;
    width: 100%;
    margin-bottom: 0px;
    padding: 0;
}


/* Feature Card (Glassmorphism & Modern) */
.gv-feature-card {
    /* Fluid calculation */
    flex: 0 0 calc((100% / var(--columns)) - ((var(--gap) * (var(--columns) - 1)) / var(--columns)));
    height: 107px;

    /* Modern Glassmorphism (Premium) */
    background: rgba(50, 50, 50, 0.3);
    /* More transparent to show blur */
    backdrop-filter: blur(20px) saturate(180%);
    /* Stronger blur + vivid colors */
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle border */

    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
    cursor: default;

    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;

    /* Prepare for spotlight */
    position: relative;
    overflow: hidden;
    --glow-x: 0px;
    --glow-y: 0px;
    --glow-intensity: 0;
}

/* Spotlight Overlay (Magic Bento Style) */
.gv-feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;

    background: radial-gradient(300px circle at var(--glow-x) var(--glow-y),
            rgba(255, 255, 255, calc(var(--glow-intensity) * 0.8)),
            transparent 60%);

    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    z-index: 2;
    pointer-events: none;
    transition: opacity 0.4s ease;
}


/* Hover Icon (Top Right) */
.gv-hover-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 14px;
    height: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
    pointer-events: none;
    /* Let clicks pass through if needed */
}

.gv-feature-card:hover .gv-hover-icon {
    opacity: 1;
}

.gv-feature-card:hover {
    /* Solid Glass on Hover */
    border-color: rgba(255, 255, 255, 0.3);
    /* Brighter border */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    transform: none !important;
}

/* Icon Container */
.gv-feature-icon {
    width: 32px;
    height: 25px;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gv-feature-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Default Grey #7a7a7a */
    filter: brightness(0) saturate(100%) invert(51%) sepia(9%) saturate(16%) hue-rotate(336deg) brightness(96%) contrast(89%);
    opacity: 1;
    transition: filter 0.2s ease;
}

.gv-feature-card:hover .gv-feature-icon img {
    /* Active White */
    filter: brightness(0) invert(1);
}

/* Feature Name */
.gv-feature-name {
    font-family: barlow, arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #7a7a7a;
    /* Default Grey */
    line-height: 1.2;
    white-space: normal;
    max-width: 100%;
    text-shadow: none;
    /* No shadow on grey */
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.gv-feature-card:hover .gv-feature-name {
    color: #ffffff;
    /* Active White */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Entrance Animations */
@keyframes gvFeatureFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gv-game-features-container.gv-in-view .gv-feature-card {
    animation: gvFeatureFadeUp 0.5s ease-out forwards;
}

.gv-game-features-container.gv-animations-done .gv-feature-card {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
}

.gv-game-features-container.gv-animations-done .gv-feature-card:hover {
    transform: none !important;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Responsive Breakpoints (Verified) */

/* Tablet Landscape (< 1024px) */
@media screen and (max-width: 1024px) {
    .gv-game-features-container {
        --columns: 5;
        --gap: 10px;
    }
}

/* Tablet Portrait (< 768px) */
@media screen and (max-width: 768px) {
    .gv-game-features-container {
        --columns: 4;
    }
}

/* Mobile Slider (< 500px) */
@media screen and (max-width: 500px) {
    .gv-game-features-container {
        /* Slider Mode */
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        margin: 0 -15px !important;
        /* Full width touch */
        padding: 0 15px !important;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
    }

    .gv-game-features-container::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .gv-feature-card {
        flex: 0 0 100px;
        /* Fixed mobile width */
        border-radius: 8px;
        padding: 10px;
    }

    .gv-feature-name {
        font-size: 13px;
        line-height: 1.1;
    }
}