/* ===================================
   FEATURES OVERVIEW SECTION - INFINITE KINETIC SLIDE (SADE FLOW)
   =================================== */
:root {
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-glow: rgba(165, 180, 252, 0.15);
    --card-size: 320px;
    /* Increased from 240px */
    --slide-gap: 80px;
    /* Increased gap for larger cards */
}

.features-overview {
    padding: 150px 0;
    background: #00204e;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Background Atmosphere */
.features-overview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, var(--accent-glow) 0%, transparent 60%);
    z-index: 0;
}

/* SLIDER CORE STRUCTURE */
.features-slider-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 80px;
    /* Space between rows */
    position: relative;
    z-index: 1;
}

.slider-row {
    width: 100%;
    overflow: hidden;
    display: flex;
    position: relative;
    padding: 30px 0;
}

/* Linear Mask for smooth edges */
.slider-row::before,
.slider-row::after {
    content: '';
    position: absolute;
    top: 0;
    width: 250px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.slider-row::before {
    left: 0;
    background: linear-gradient(to right, #00204e, transparent);
}

.slider-row::after {
    right: 0;
    background: linear-gradient(to left, #00204e, transparent);
}

.slider-track {
    display: flex;
    width: max-content;
    gap: var(--slide-gap);
    animation-duration: 40s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Direction Logic */
.row-left .slider-track {
    animation-name: slideLeft;
}

.row-right .slider-track {
    animation-name: slideRight;
}

@keyframes slideLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - (var(--slide-gap) / 2)));
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(calc(-50% - (var(--slide-gap) / 2)));
    }

    100% {
        transform: translateX(0);
    }
}

/* The Minimalist Diamond Card */
.feature-card-detailed {
    flex-shrink: 0;
    width: var(--card-size);
    height: var(--card-size);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    position: relative;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 25px;
    cursor: pointer;

    transform: rotate(45deg);
    border-radius: 40px;
    margin: 50px;
    overflow: hidden;
    /* Ensure content stays within diamond bounds */
}

/* New internal wrapper to handle counter-rotation cleanly */
.feature-card-content {
    transform: rotate(-45deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140%;
    height: 140%;
    color: #fff;
}

/* Hover Freeze & Enhance */
.slider-track:hover {
    animation-play-state: paused;
    /* Hovering over a card stops the world */
}

.feature-card-detailed:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(45deg) scale(1.1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    z-index: 10;
}

/* Feature Icon & Content */
.feature-icon-box {
    width: 90px;
    height: 90px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: 0.4s ease;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card-detailed:hover .feature-icon-box {
    transform: rotate(-45deg) scale(1.15);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 42px;
    transition: 0.3s;
}

.feature-card-detailed:hover .feature-icon {
    filter: brightness(0);
}

.feature-card-detailed h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    text-transform: capitalize;
    line-height: 1.2;
}

.feature-card-detailed p {
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    max-width: 220px;
    margin: 0;
    transition: 0.3s;
}

.feature-card-detailed:hover p {
    color: #fff;
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .features-overview {
        padding: 80px 0;
    }

    .slider-track {
        animation-duration: 40s;
        /* Slower than 25s for better mobile readability */
    }

    .feature-card-detailed {
        width: 200px;
        /* Slightly larger for better finger-friendly look */
        height: 200px;
        margin: 30px;
        /* Reduced gap for mobile */
    }

    .feature-card-content {
        width: 130%;
        height: 130%;
    }

    .feature-icon-box {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .feature-icon {
        font-size: 28px;
    }

    .feature-card-detailed h3 {
        font-size: 1rem;
        padding: 0 10px;
    }

    .feature-card-detailed p {
        display: none;
    }

    /* Hide description on mobile to save space */
}

/* Vibrant Color Mapping (Inspired by App UI) */
.card-eczane {
    background: #FF6B6B !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-ilan {
    background: #9D70FF !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-otobus {
    background: #4FACFE !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-hava {
    background: #A3CB38 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-usta {
    background: #FFB347 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-cicek {
    background: #F53D7A !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-su {
    background: #00D2FF !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-taksi {
    background: #FFD32D !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-yol-yardim {
    background: #778CA3 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-gezi {
    background: #5AD070 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-yemek {
    background: #FF8E53 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-konaklama {
    background: #12CBC4 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-namaz {
    background: #1B9CFC !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-haber {
    background: #8258FA !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-etkinlik {
    background: #FD7272 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.card-mekan {
    background: #FF4B91 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Icon specific emoji contrast */
.feature-icon-box {
    color: #333;
    /* For emojis if filter doesn't work well */
}

.feature-card-detailed:hover {
    transform: rotate(45deg) scale(1.1) translateZ(50px);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.4);
}