/*
 * Ana sayfa — telefon düzeni (18 Kasım 2026). Yalnız ana sayfada yüklenir (functions.php, is_front_page) ve yalnız ≤ 767 px'te çalışır
 * (19 Kas 2026'ya kadar 600 px; 601-767 arası ara düzen — dosya sonu).
 *
 * Sorun: üç bölüm telefonda yana kayan şeritti ve kaydırılabildiğine dair işaret yoktu — Eğitim Programlarımız'da yalnız
 * Anaokulu + İlkokul, alttaki düğmelerde yalnız Eğitim Ortaklığı + Etkinliklerimiz görünüyordu (Ortaokul, liseler, STEM, Medya gizli).
 * Çözüm: hepsi alt alta akan ızgara. Başvuru kutuları 3 + 1 yerine 2 × 2.
 * Geri almak: functions.php'deki anasayfa_mobil_css satırı. Yedek: _yedek/kokleji-anasayfa-mobil-oncesi-20261118/
 */

/* ---------------------------------------------------------------- Eğitim Programlarımız: üzerine gelince hareket (18 Kas 2026)
 * Yalnız fareli cihazlarda (hover: hover) — dokunmatikte basılı kalan "hover" görünümü olmasın. Kart hafifçe kalkar ve gölge alır,
 * resim biraz parlar, alttaki renkli şerit koyulaşır. */
@media (hover: hover) {
    body.home div#education-flex-container .item {
        transition: transform .25s ease, box-shadow .25s ease;
        cursor: pointer;
    }

    body.home div#education-flex-container .item:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
    }

    body.home div#education-flex-container .item img,
    body.home div#education-flex-container .item .btn-group {
        transition: filter .25s ease;
    }

    body.home div#education-flex-container .item:hover img { filter: brightness(1.06) saturate(1.12); }
    body.home div#education-flex-container .item:hover .btn-group { filter: brightness(.88); }
    body.home div#education-flex-container .item:hover .btn-group a { text-decoration: none; letter-spacing: .4px; }
    body.home div#education-flex-container .item .btn-group a { transition: letter-spacing .25s ease; }

    /* Eğitim Ortaklığı · Etkinliklerimiz · STEM · Medyada Oğuzkaan — aynı dil: kalkar, gölge, kutu koyulaşır, çerçevenin içi dolar */
    body.home div#activity-flex-container .item-container {
        transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
    }

    body.home div#activity-flex-container .item-container:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
        filter: brightness(.94) saturate(1.1);
    }

    body.home div#activity-flex-container .item-container a {
        transition: background-color .25s ease, letter-spacing .25s ease;
    }

    body.home div#activity-flex-container .item-container:hover a {
        background-color: rgba(255, 255, 255, .16);
        letter-spacing: .4px;
        text-decoration: none;
    }
}

/* 19 Kas 2026: sınır 600 → 767 px — açık iPhone Duo (626 px) masaüstü düzeninde kalıp 49 px yana taşıyordu. */
@media only screen and (max-width: 767px) {

    /* ---------------------------------------------------------------- başvuru kutuları: 2 × 2 */
    body.home div#insert:not(.kampusler) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 10px 8px 0;
    }

    body.home div#insert:not(.kampusler) .item {
        width: auto !important;
        margin: 0 !important;
        border-radius: 8px;
    }

    body.home div#insert:not(.kampusler) .item:empty { display: none; }

    body.home div#insert:not(.kampusler) .item img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* ---------------------------------------------------------------- Eğitim Programlarımız: 2 sütun, Fen Lisesi tam genişlik */
    body.home div#education-container .row h3 {
        margin: 22px 0 10px;
        font-size: 18px;
        padding-left: 4px;
    }

    body.home div#education-flex-container {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        overflow: visible !important;
        white-space: normal !important;
        padding: 0 4px;
    }

    body.home div#education-flex-container div.item,
    body.home div#education-flex-container div.item-container {
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body.home div#education-flex-container .item img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        display: block;
    }

    /* tek kalan beşinci (Fen Lisesi) iki sütuna yayılır; resim aynı yükseklikte kalsın diye geniş oran */
    body.home div#education-flex-container > .item:nth-child(5):last-child { grid-column: 1 / -1; justify-self: stretch; max-width: none !important; }
    body.home div#education-flex-container > .item:nth-child(5):last-child .item-container { width: 100% !important; align-items: stretch; }
    body.home div#education-flex-container > .item:nth-child(5):last-child img { aspect-ratio: 8 / 3; }

    body.home div#education-flex-container .item .btn-group a {
        font-size: 13px;
        white-space: normal;
    }

    /* ---------------------------------------------------------------- Eğitim Ortaklığı · Etkinlikler · STEM · Medya: 2 × 2 */
    body.home div#activity-container { margin: 16px 0; }
    body.home div#activity-container .row { padding: 0 4px; }

    body.home div#activity-flex-container {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        overflow: visible !important;
        white-space: normal !important;
        padding: 0 4px;
    }

    body.home div#activity-flex-container .item-container {
        width: auto !important;
        height: 96px !important;
        margin: 0 !important;
    }

    body.home div#activity-flex-container .item-container a {
        width: 88% !important;
        height: 78% !important;
        margin: 0 !important;
        padding: 6px !important;
        font-size: 13px !important;
        line-height: 16px !important;
        white-space: normal !important;
    }
}

/* ---------------------------------------------------------------- 601-767 px ara düzen (19 Kas 2026 — iPhone Duo açık 626, iPad mini 744)
 * Telefon ızgarası burada fazla iri kalıyor: başvuru kutuları tek satırda 4'lü, eğitim programları 3 sütun (Fen Lisesi yayılmaz),
 * alt düğmeler 2 × 2 kalır. */
@media only screen and (min-width: 601px) and (max-width: 767px) {
    body.home div#insert:not(.kampusler) { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    body.home div#education-flex-container { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body.home div#education-flex-container > .item:nth-child(5):last-child { grid-column: auto; }
    body.home div#education-flex-container > .item:nth-child(5):last-child img { aspect-ratio: 4 / 3; }

    body.home div#activity-flex-container .item-container { height: 110px !important; }
    body.home div#activity-flex-container .item-container a { font-size: 14px !important; }
}
