/* v2 mobil uyumluluk katmani. En son yuklenir; legacy stillerini sadece kucuk ekranlarda duzeltir. */

/* Inline stiller sinifla degistirildi; masaustu gorunumu korunur. */
.form-not { width: 100%; float: left; margin: 0 auto 6px; display: block; text-align: center; font-weight: 700; }
.document-wrap { width: min(772px, 100%); margin: auto; }

/* ---------------------------------------------------------- Tablet / telefon */
/* Referans: anitozelogretim.com style.css + style-mobile.css (max-width:959px) */
@media only screen and (max-width: 959px) {
    img { max-width: 100%; height: auto; }

    /* Ust bar: referandaki 70px logo ve 15px / 12px baslik */
    #header { height: auto; }
    #header .box {
        width: 100%;
        height: auto;
        float: none;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 15px 12px 12px;
        box-sizing: border-box;
        text-align: center;
    }
    #header .box .logo {
        float: none;
        width: 100%;
        height: auto;
        margin: 0;
    }
    #header .box .logo img {
        display: block;
        width: auto;
        max-width: 100%;
        height: 70px;
        margin: auto;
    }
    #header .box .baslik {
        float: none;
        width: 100%;
        margin: 0;
        text-align: center;
        font-size: 15px;
        letter-spacing: 12px;
        line-height: 1.4;
    }

    /* Icerik: referandaki 90% / 5% olculeri, yatay bosluk kaldirildi */
    #page > .box { width: 100%; padding: 0; box-sizing: border-box; }
    #page .box h1,
    #page .box h2,
    #page .box h3 { line-height: 1.15; }
    #page .box h1 { font-size: clamp(34px, 12vw, 72px); text-align: center; }
    #page .box h2 { font-size: 43.37px; text-align: center; }
    #page .box h3 {
        float: left;
        width: 90%;
        margin-left: 5%;
        font-size: 43.37px;
        text-align: center;
    }
    #page .box h5 {
        float: left;
        width: 90%;
        margin-left: 5%;
        font-size: 5vw;
        line-height: 25px;
        letter-spacing: 3px;
        text-align: center;
    }
    #page .box h3.basvurusayfasi {
        float: left;
        width: 90%;
        margin: 43px 5% 40px;
        padding: 150px 0 55px;
        font-size: 43.37px;
        text-align: center;
        background: url("../img/sinavucretsiz.png") no-repeat top center;
    }

    /* Ana sayfa butonlari: referans 80% / 62px / 20px gradyan */
    #page .box .butonlar {
        float: left;
        width: 80%;
        margin: 50px 10%;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
        box-sizing: border-box;
    }
    #page .box .butonlar > a { width: 100%; }
    #page .box .butonlar svg { display: none; }
    .basvurubuton, .belgebuton {
        width: 100%;
        height: 62px;
        margin: 0;
        float: none;
        padding: 0 10px;
        border-radius: 5px;
        font-size: 20px;
    }
    .basvurubuton {
        background: linear-gradient(90deg, rgba(120,179,78,1) 0%, rgba(105,166,69,1) 48%, rgba(121,179,79,1) 100%);
    }
    .belgebuton {
        background: linear-gradient(229deg, rgba(244,112,0,1) 0%, rgba(247,153,0,1) 100%);
    }
    .basvurubuton span, .belgebuton span {
        height: 62px;
        font-size: 20px;
        font-weight: 800;
        font-family: 'HelveticaTrCondensedBlack', Arial, sans-serif;
    }

    /* Basvuru formu: referans 90% genislik, 18px input, 62px tamam butonu */
    form#basvuru {
        float: left;
        width: 90%;
        margin: 35px 5% 0;
    }
    form#basvuru > .blok,
    form#basvuru > .blok:nth-child(even),
    form#basvuru > .blok:nth-child(odd) {
        float: left;
        width: 100%;
        height: auto;
        min-height: 38px;
        margin: 0 0 20px;
        margin-right: 0;
        box-sizing: border-box;
    }
    form#basvuru .blok input[type="text"] {
        float: left;
        width: 90%;
        height: 17px;
        margin: 0 5%;
        padding: 10px 0;
        background: none;
        border: none;
        border-bottom: 1px solid #ff6414;
        border-radius: 0;
        box-sizing: content-box;
        color: #014067;
        font-size: 18px;
        line-height: 1.3;
    }
    form#basvuru .blok input[type="text"]::placeholder { font-size: 20px; }
    form#basvuru .blok input[type="text"].bos { border-bottom: 2px solid #a90000; }

    /* Sinif secilmeden once tek alan; secilince tarih yanyana acilir (v2 form davranisi) */
    form#basvuru .secim-satiri {
        float: left;
        display: flex;
        flex-direction: row;
        gap: 16px;
        width: 100%;
        margin: 0 0 20px;
        box-sizing: border-box;
    }
    form#basvuru .secim-satiri .blok {
        float: none;
        width: calc(50% - 8px);
        height: auto;
        min-height: 38px;
        margin: 0;
        box-sizing: border-box;
    }
    form#basvuru .secim-satiri.tek-alan .sinifsec { width: 100%; }
    form#basvuru .secim-satiri .blok select {
        float: left;
        width: 100%;
        height: 20px;
        margin: 10px 0 0;
        padding: 0 0 3px;
        background: none;
        border: none;
        border-bottom: 1px solid #ff6414;
        border-radius: 0;
        box-sizing: content-box;
        color: #014067;
        font-size: 15px;
        line-height: 1.3;
    }
    form#basvuru .secim-satiri .blok select.placeholder { color: #8d999f; }
    form#basvuru .secim-satiri .blok select option { color: #014067; }
    form#basvuru .secim-satiri .blok select:focus { outline: none; }

    form#basvuru .inputs .input label.css-label {
        float: none;
        display: block;
        width: auto;
        font-size: 18px;
        line-height: 1.45;
    }
    .form-not { font-size: 13px; line-height: 1.6; }
    .form-alert { width: 90%; max-width: 90%; margin: 18px 5%; box-sizing: border-box; }
    #page .box p.muted.center { width: 100% !important; margin-left: 0 !important; }

    form#basvuru .tamamla {
        clear: both;
        width: 100%;
        height: auto;
        margin: 0 auto;
        padding-top: 34px;
        display: flex;
        justify-content: center;
        box-sizing: border-box;
    }
    form#basvuru .tamamla button.tamambuton,
    form#basvuru .tamamla button.tamambuton-genis {
        width: 267px;
        max-width: 100%;
        height: 62px;
        margin: 0;
        float: none;
        padding: 0 10px;
        border-radius: 5px;
        font-size: 20px;
        background: linear-gradient(90deg, rgba(120,179,78,1) 0%, rgba(105,166,69,1) 48%, rgba(121,179,79,1) 100%);
    }
    form#basvuru .tamamla button.tamambuton-genis { width: 300px; }
    form#basvuru .tamamla button.tamambuton span,
    form#basvuru .tamamla button.tamambuton-genis span {
        height: 62px;
        font-size: 20px;
        font-weight: 800;
        font-family: 'HelveticaTrCondensedBlack', Arial, sans-serif;
    }

    /* Giris belgesi: referans tipografi/radius, akici genislik (770px sabit degil) */
    .document-wrap { width: min(772px, 100%); margin: auto; }
    .document-actions {
        width: min(772px, calc(100% - 24px));
        max-width: 100%;
        gap: 10px;
        flex-wrap: wrap;
        margin: 18px auto 0;
    }
    .document-actions .btn { flex: 1 1 140px; }
    #belge { width: 100%; float: none; margin: 20px auto 0; }
    #belge .baslik {
        float: none;
        width: 100%;
        font-size: 28px;
        letter-spacing: 2px;
        text-align: center;
    }
    #belge .baslik b { padding: 0 !important; }
    #belge .blok {
        width: 100%;
        float: none;
        margin: 45px 0 0;
        padding: 12px;
        border: 1px solid #014067;
        -webkit-border-radius: 50px;
        -moz-border-radius: 50px;
        border-radius: 50px;
        box-sizing: border-box;
    }
    #belge .blok .satir,
    #belge .blok .bilgi {
        float: none !important;
        width: 100% !important;
        margin: 15px 0 0;
    }
    #belge .blok .satir > div,
    #belge .blok .satir > div > div {
        float: none !important;
        width: auto !important;
        margin: 0 0 8px !important;
        box-sizing: border-box;
    }
    #belge .blok .bilgi .baslik {
        float: none !important;
        width: 100%;
        font-size: 20.83px;
        text-align: center;
    }
    #belge .blok .bilgi .baslik img { max-width: 100%; height: auto; }
    #belge .blok .bilgi .girisb,
    #belge .blok .bilgi .girisb2 {
        float: none !important;
        width: 100% !important;
        box-sizing: border-box;
        margin: 10px 0;
    }
    #belge .blok .bilgi .girisb2 {
        border-left: 0 !important;
        border-top: 1px dotted #014067;
        padding-top: 10px;
    }
    #belge .blok .bilgi .girisb .bilgiler,
    #belge .blok .bilgi .girisb2 .bilgiler {
        float: none !important;
        width: 100% !important;
        height: auto;
        min-height: 92px;
        display: block;
        box-sizing: border-box;
    }
    #belge .blok .bilgi .girisb .bilgiler span,
    #belge .blok .bilgi .girisb2 .bilgiler span {
        display: block;
        width: 100% !important;
        height: auto;
        min-height: 92px;
        padding: 10px !important;
        text-align: center;
        box-sizing: border-box;
    }
    #belge .blok .bilgi .girisb .bilgiler span { font-size: 29.17px; }
    #belge .blok .bilgi .girisb2 .bilgiler span { font-size: 15px; }
    #belge .blok .bilgi .not {
        float: none !important;
        width: 100% !important;
        margin: 25px 0 0 !important;
        padding: 10px 25px 15px !important;
        display: block;
        box-sizing: border-box;
        font-size: 16px;
        line-height: 1.5;
    }
    #belge .blok .bilgi .not span { font-size: 16px; line-height: 1.5; }
    #belge .blok .bilgi .not span b,
    #belge .blok .bilgi .not b { font-size: 22px; }

    /* Alt bar: referans 160px, ortalanmis tek kolon, ilk satir 80px, alt yari #024067 */
    #footer {
        position: relative;
        height: 160px;
        min-height: 160px;
        background: url("../img/footerbg.png") repeat-x top center;
    }
    #footer .box {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        width: auto;
        max-width: 100%;
        height: 160px;
        margin: auto;
        padding: 0 12px 30px;
        gap: 0;
        box-sizing: border-box;
        background: url("../img/footerbg2.png") no-repeat center top;
    }
    #footer .box .bilgiler {
        float: none;
        margin: 20px auto 0;
        padding-left: 0;
        background: none;
        text-align: center;
        line-height: 15px;
    }
    #footer .box .bilgiler:nth-child(1) { margin-top: 80px; }
    #footer .box .bilgiler b { color: #FFF; }
    #footer .box .bilgiler b a { color: #FFF; }
    #footer .box .bilgiler br { display: block; }
    #footer .box::before {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 50%;
        background-color: #024067;
        z-index: -1;
    }

    /* Modallar (v2 modern yapi korunur) */
    .modal {
        width: min(480px, calc(100% - 24px));
        max-height: calc(100vh - 24px);
        padding: 24px 18px 20px;
        border-radius: 14px;
        -webkit-overflow-scrolling: touch;
    }
    .modal-title { font-size: 22px; }
    .modal-photo { width: min(600px, calc(100% - 24px)); }
    .modal-photo img.foto { max-height: 55vh; }
    .modal-field input { font-size: 16px; height: 46px; }
    .modal-actions .btn { height: 46px; font-size: 13px; }
    .dev-code { font-size: 20px; letter-spacing: 3px; }

    /* Yonetim paneli */
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-shell > * { min-width: 0; }
    .sidebar { position: static; height: auto; padding: 12px; overflow: hidden; min-width: 0; }
    .sidebar-brand { margin-bottom: 10px; }
    .sidebar-brand img { max-height: 52px; }
    .sidebar-title { margin: 10px 4px 6px; }
    .sidebar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding-bottom: 4px;
    }
    .sidebar a.nav { margin: 0; white-space: normal; font-size: 13px; }
    .admin-topbar { height: auto; min-height: 58px; padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
    .admin-content { padding: 16px 12px 36px; }
    .panel { padding: 14px; }
    .stat-grid { gap: 10px; }
    .stat { padding: 14px; }
    .stat b { font-size: 26px; }
    .table-wrap { max-width: 100%; }
    .table-wrap table.data th,
    .table-wrap table.data td { padding: 8px; font-size: 12px; }
    .table-wrap table.data th { white-space: normal; }
    .toolbar .field { min-width: 0; width: 100%; }
    .filter-form select, .filter-form input { min-width: 0; width: 100%; }
    .grid-rooms { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
    .login-card { padding: 26px 20px; }
    .inline-form { display: inline-flex; flex-wrap: wrap; gap: 4px; }
}

/* ---------------------------------------------------------- Telefon */
@media only screen and (max-width: 620px) {
    #header .box { padding: 12px 10px 10px; }
    form#basvuru > .blok,
    form#basvuru > .blok:nth-child(even),
    form#basvuru > .blok:nth-child(odd) { margin-bottom: 20px; }
    #belge .blok .bilgi .girisb .satir > div { width: 50% !important; }
    .admin-topbar .muted { display: none; }
    .admin-form .row,
    .admin-form .row.two { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------- Dar telefon */
@media only screen and (max-width: 380px) {
    .basvurubuton span, .belgebuton span, .tamambuton span { white-space: normal; }
    #belge .blok .bilgi .girisb .satir > div { width: 100% !important; }
    .modal-actions { flex-direction: column; }
}
