/* features/features.css */

.feat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 640px) {
    .feat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }
}

.feat-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 16px 8px 16px 14px;
    min-height: 150px;
    border-radius: 16px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 14px 34px rgba(0,0,0,0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* <picture> wrapper: flex akışının DIŞINDA (absolute) — flex item olmaz, phantom boşluk yaratmaz.
   İçindeki .feat-bg absolute inset:0 ile kartı doldurur. */
.feat-card picture { position: absolute; inset: 0; z-index: 0; }

/* Full card background image (mobil: renk webp / desktop: mevcut webp — <picture> ile) */
.feat-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
}

/* Right-side art */
.feat-art-wrap {
    position: relative;
    z-index: 2;
    flex: 0 0 120px;
    overflow: visible;
}

.feat-art {
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: 0;
    right: -28px;
    width: calc(100% + 28px);
    height: calc(100% + 12px);
    object-fit: contain;
    object-position: center center;
    transform-origin: center center;
    transform: scale(var(--fa-scale, 0.82));
    transition: transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    pointer-events: none;
    user-select: none;
}

.feat-card:hover .feat-art {
    transform: scale(calc(var(--fa-scale, 0.82) + 0.06));
}

/* Subtle bottom gradient only for text readability */
.feat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.45) 50%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.feat-card-left {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.feat-top {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.feat-title {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.15;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.feat-desc {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.62);
    line-height: 1.5;
    margin-top: 4px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* CTA → gerçek buton (Goji primary yeşil, siyah metin) */
.feat-cta {
    align-self: flex-start;
    margin-top: 11px;   /* desc ile arası +1px */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7.5px 15px;
    /* premium muted: koyu translucent surface (kart yüzeyi tonu) + subtle border + hafif depth */
    background: rgba(8, 12, 18, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.2);
    color: #eef2f7;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    border-radius: 10px;
    white-space: nowrap;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}
/* hover/focus: çok hafif Goji green accent (normal state sakin) */
.feat-card:hover .feat-cta { background: rgba(0, 255, 135, 0.10); border-color: rgba(0, 255, 135, 0.40); color: #fff; }
.feat-card:focus-visible { outline: 2px solid rgba(0, 255, 135, 0.55); outline-offset: 2px; }

/* ── Desktop-only icon optik denge ────────────────────────────────────────
   8 art görseli farklı en-boy oranında: sabit 120px kolon + object-fit:contain
   hepsini genişliğe sığdırınca algılanan BOY değişiyor (geniş görsel → kısa/küçük,
   uzun görsel → büyük). Kart başına --fa-scale ile görsel ağırlığı eşitliyoruz;
   hedef = kare-ish kartların (~0.82) ortalama boyutu. Ölçüm: render edilen ikon
   avg(w,h) px. SADECE >=640px; mobil blok scale'ini kendi sabitiyle ezer (dokunulmaz). */
@media (min-width: 640px) {
    .feat-sport        { --fa-scale: 0.89; }  /* AR 1.25 en geniş → 81px kısaydı, büyüt */
    .feat-slots        { --fa-scale: 0.85; }  /* AR 1.13 geniş ama yoğun kompozisyon → hafif büyüt */
    .feat-bonuses      { --fa-scale: 0.82; }  /* AR 0.95 kare-ish → baseline */
    .feat-tournaments  { --fa-scale: 0.74; }  /* AR 0.80 en uzun/dominant (120px) → küçült */
    .feat-loyalty      { --fa-scale: 0.75; }  /* AR 0.83 uzun/ağır (117px) → küçült */
    .feat-cashback     { --fa-scale: 0.82; }  /* AR 1.00 kare → baseline */
    .feat-lootbox      { --fa-scale: 0.83; }  /* AR 1.00 ama kompakt duruyordu → çok hafif büyüt */
    .feat-achievements { --fa-scale: 0.82; }  /* AR 1.00 kare → baseline */
}

@media (max-width: 639px) {
    .feat-grid { gap: 8px; }

    /* GRID: satır1=icon (auto), satır2=içerik (1fr) — explicit, flex-grow phantom boşluğu yok */
    .feat-card {
        display: grid;
        grid-template-rows: auto 1fr;
        row-gap: 3px;
        justify-items: center;
        text-align: center;
        padding: 8px 8px 14px;   /* üst padding 12→8: icon alanı birkaç px yukarı */
        min-height: 190px;
        border-radius: 16px;
    }

    .feat-overlay {
        background: linear-gradient(to bottom,
            rgba(0,0,0,0.1) 0%,
            rgba(0,0,0,0.5) 50%,
            rgba(0,0,0,0.9) 100%);
    }

    /* art: satır1, kompakt yükseklik → title'a yakın */
    .feat-art-wrap {
        grid-row: 1;
        width: 100%;
        height: 66px;
        position: relative;
        overflow: visible;
    }

    .feat-art {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        right: 0;
        object-fit: contain;
        object-position: center center;
        transform: scale(0.9);
        transform-origin: center center;
        filter: drop-shadow(0 6px 14px rgba(0,0,0,0.6));
    }

    .feat-card:hover .feat-art { transform: scale(0.96); }

    /* text: satır2, icon'dan hemen sonra; 1fr'yi doldurur (buton en altta) */
    .feat-card-left {
        grid-row: 2;
        width: 100%;
        justify-content: flex-start;   /* icon'a yakın title */
        align-items: center;
        text-align: center;
        padding: 0;
        gap: 6px;   /* feat-top → cta min boşluk +1px */
    }
    /* buton en altta (title/desc üstte kompakt kalır) */
    .feat-card-left > .feat-cta { margin-top: auto; }

    .feat-top {
        align-items: center;
        gap: 2px;
    }

    .feat-title  { font-size: 15px; line-height: 1.1; }
    .feat-desc   { display: -webkit-box; font-size: 12px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

    /* CTA mobilde: tam-genişlik yeşil buton (uniform + touch-friendly), metin ortalı */
    .feat-cta {
        align-self: stretch;
        margin-top: 8px;
        padding: 8.5px 12px;   /* mobil buton yüksekliği -1px */
    }
}

@media (min-width: 768px) {
    .feat-card { min-height: 160px; }
}
