/* Zemin */
.regions-grid {
    padding: 2rem 0;
}

.regions-grid .rg-wrap {
    margin: 0 auto;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 220px 130px 170px;
}

/* Alan yerleşimi (referans görsele uygun) */
.rg-a {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
}

.rg-b {
    grid-column: 3 / span 2;
    grid-row: 1 / span 1;
}

.rg-c {
    grid-column: 3 / span 1;
    grid-row: 2 / span 1;
}

.rg-d {
    grid-column: 4 / span 1;
    grid-row: 2 / span 1;
}

.rg-e {
    grid-column: 1 / span 2;
    grid-row: 3 / span 1;
}

.rg-f {
    grid-column: 3 / span 2;
    grid-row: 3 / span 1;
}

/* Kart görselleştirme */
.rg-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    isolation: isolate;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
    background: #333;
}

.rg-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--bg);
    background-size: cover;
    background-position: center;
    filter: brightness(.92);
    transition: transform .5s ease, filter .5s ease;
}

.rg-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.027)rgba(0, 0, 0, 0.021)5) 70%);
}

/* Bayrak (tam ortada) */
.rg-flag {
    width: 80px;
    height: 80px;
    padding: .2rem;
    object-fit: cover;
    background: rgb(255, 255, 255);
    border-radius: 100rem;
    backdrop-filter: blur(4px) saturate(1.1);
    box-shadow: 0 5px 5px rgba(0, 0, 0, .35);
    transition: transform .35s ease;
}

/* Başlık (sol alt köşe) */
.rg-title {
    position: absolute;
    left: 14px;
    bottom: 12px;
    font-weight: 700;
    letter-spacing: .2px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, .6);
}

/* Hover efektleri */
.rg-card:hover::before {
    transform: scale(1.05);
    filter: brightness(.85);
}

.rg-card:hover .rg-flag {
    transform: scale(1.04);
}

/* Responsive kırılımlar */
/* --- Tablet & Mobil: Sıra bozulmadan kare kartlar --- */

@media (max-width: 991.98px) {
    .regions-grid .rg-wrap {
        display: grid;
        grid-template-columns: 50% 50%;
        /* iki sütun 50% - 50% */
        gap: 0;
        /* boşluk yok */
        padding: 0;
        margin: 0;
    }

    /* Kartlar sırayı bozmasın diye tüm grid-override'lar iptal */
    .rg-a,
    .rg-b,
    .rg-c,
    .rg-d,
    .rg-e,
    .rg-f {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    /* Kart kare olsun + kenarlar düz olsun */
    .rg-card {
        aspect-ratio: 1 / 1;
        /* kare */
        border-radius: 0 !important;
        margin: 0;
        padding: 0;
    }
}

/** küçük mobilde bile iki sütun kalsın */
@media (max-width: 576px) {
    .regions-grid .rg-wrap {
        grid-template-columns: 50% 50%;
        grid-template-rows: auto;
    }

    .rg-card {
        aspect-ratio: 1 / 1;
    }


}

/* animasyon azaltma */
@media (prefers-reduced-motion: reduce) {

    .rg-card::before,
    .rg-flag {
        transition: none;
    }
}