/* BAİBÜ başvuru bilgilendirme — mobil öncelikli, framework yok */

:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #1b2430;
    --muted: #5a6572;
    --border: #d5dde6;
    --header-border: #c5d4e8;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    --radius: 12px;
    --yesil: #1b5e20;
    --yesil-hover: #145a18;
    --mavi: #0d47a1;
    --mavi-hover: #0a3a84;
    --turkuaz: #006064;
    --turkuaz-hover: #004d50;
    --kirmizi: #b71c1c;
    --kirmizi-hover: #961818;
    --focus: #1565c0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 2px solid var(--focus);
    z-index: 1000;
    border-radius: 8px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ——— Header ——— */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1rem 1.25rem;
}

.header-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .header-brand {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
}

.header-logo {
    flex-shrink: 0;
    width: 56px;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}

@media (min-width: 640px) {
    .header-logo {
        width: 72px;
    }
}

.site-title {
    margin: 0;
    font-size: clamp(1rem, 2.5vw + 0.5rem, 1.35rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.35;
    color: #0d2137;
}

.info-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #1b3a6b;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    text-align: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.info-banner__intro {
    color: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.info-banner .header-link,
.info-banner__link {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    white-space: nowrap;
}

.info-banner .header-link:hover,
.info-banner__link:hover {
    text-decoration-thickness: 2px;
}

.info-banner .header-link:focus-visible,
.info-banner__link:focus-visible {
    outline: 3px solid #ffca28;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ——— Layout ——— */
.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1rem 2.5rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1rem 1.15rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.section-heading {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #102a43;
}

/* ——— Renkli butonlar ——— */
.info-buttons-section {
    padding-bottom: 1.25rem;
}

.info-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 480px) {
    .info-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .info-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

.info-btn {
    display: block;
    width: 100%;
    padding: 0.85rem 0.75rem;
    border: none;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.08s ease, filter 0.12s ease;
}

.info-btn:hover {
    filter: brightness(1.05);
}

.info-btn:active {
    transform: translateY(1px);
}

.info-btn:focus-visible {
    outline: 3px solid #ffca28;
    outline-offset: 2px;
}

.info-btn--yesil {
    background: linear-gradient(180deg, #2e7d32 0%, var(--yesil) 100%);
}

.info-btn--yesil:hover {
    background: linear-gradient(180deg, #388e3c 0%, var(--yesil-hover) 100%);
}

.info-btn--mavi {
    background: linear-gradient(180deg, #1565c0 0%, var(--mavi) 100%);
}

.info-btn--mavi:hover {
    background: linear-gradient(180deg, #1976d2 0%, var(--mavi-hover) 100%);
}

.info-btn--turkuaz {
    background: linear-gradient(180deg, #00838f 0%, var(--turkuaz) 100%);
}

.info-btn--turkuaz:hover {
    background: linear-gradient(180deg, #0097a7 0%, var(--turkuaz-hover) 100%);
}

.info-btn--kirmizi {
    background: linear-gradient(180deg, #c62828 0%, var(--kirmizi) 100%);
}

.info-btn--kirmizi:hover {
    background: linear-gradient(180deg, #d32f2f 0%, var(--kirmizi-hover) 100%);
}

/* ——— Filtreler ——— */
.filters-section .field {
    margin-bottom: 1rem;
}

.filters-section .field:last-of-type {
    margin-bottom: 0;
}

.filters-section label,
.filters-section legend {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
    color: #243b53;
}

.filters-section select {
    width: 100%;
    max-width: 100%;
    padding: 0.6rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.filters-section select:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 1px;
}

.field--radios {
    border: 0;
    padding: 0;
    margin: 0 0 0.25rem;
}

.field--radios legend {
    padding: 0;
}

.d-none {
    display: none !important;
}

.filters-section #duzeyRadioRow {
    gap: 0.75rem;
}

.filters-section .duzey-option label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.65rem 1.35rem;
    margin-bottom: 0;
    border: 2px solid #b8c5d8;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    color: #1b3a6b;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.filters-section .duzey-option label:hover {
    background: linear-gradient(180deg, #eef3f8 0%, #e2eaf3 100%);
    border-color: #7a94b8;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.filters-section .duzey-option label:has(input:checked) {
    background: linear-gradient(180deg, #254a85 0%, #1b3a6b 100%);
    border-color: #1b3a6b;
    color: #fff;
    box-shadow: 0 3px 10px rgba(27, 58, 107, 0.35);
}

.filters-section .duzey-option label:has(input:focus-visible) {
    outline: 3px solid #ffca28;
    outline-offset: 2px;
}

.filters-section .duzey-option input {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
    accent-color: var(--mavi);
    cursor: pointer;
}

.filters-section .duzey-option label:has(input:checked) input {
    accent-color: #fff;
}

.radio-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

@media (min-width: 560px) {
    .radio-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem 1.5rem;
    }
}

.radio-row label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    margin-bottom: 0;
    cursor: pointer;
}

.radio-row input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--mavi);
}

/* ——— Program sonuçları (kartlar) ——— */
.sonuc-durumu {
    min-height: 1.35rem;
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.sonuc-durumu.is-error {
    color: var(--kirmizi);
    font-weight: 600;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.results-message {
    margin: 0;
    padding: 1rem 0.75rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--muted);
    font-style: italic;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #fafbfc;
}

.results-message--error {
    color: var(--kirmizi);
    font-style: normal;
    font-weight: 600;
    border-color: #ffcdd2;
    background: #fff5f5;
}

.program-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.program-card__table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0;
}

.program-card__table-scroll:not(:last-child) {
    margin-bottom: 0.35rem;
}

.program-card table {
    width: 100%;
    margin-bottom: 15px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.program-card__table-scroll:last-child table {
    margin-bottom: 0;
}

.program-card th,
.program-card td {
    border: 1px solid #adb5bd;
    padding: 0.5rem 0.55rem;
    text-align: center;
    vertical-align: middle;
}

.program-card th {
    background: #e0e6ed;
    font-weight: 700;
    color: #102a43;
    white-space: nowrap;
}

.program-card td {
    background: var(--surface);
    white-space: normal;
    word-break: break-word;
}

.program-card tbody tr:nth-child(even) td {
    background: #fafbfc;
}

/* ——— Şehit yakını notu ——— */
.program-notice {
    margin-top: 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
    background: #fff5f5;
}

.program-notice__text {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #6a1b1b;
}

/* ——— Site footer ——— */
.site-footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
}

/* ——— Modal (<dialog>) ——— */
.modal {
    width: 95vw;
    max-width: 95vw;
    height: 95vh;
    max-height: 95vh;
    overflow-y: auto;
    margin: auto;
    border-radius: 12px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(1px);
}

.modal__inner {
    min-height: 100%;
    box-sizing: border-box;
    background: var(--surface);
    border-radius: 12px;
    padding: 1.25rem 1.5rem 1.15rem;
    border: 1px solid var(--border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    line-height: 1.6;
}

.modal__title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    color: #102a43;
}

.modal__body {
    margin: 0 0 1rem;
    color: var(--text);
    font-size: 0.95rem;
}

.modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.modal__close:hover {
    background: #e8eef5;
}

.modal__close:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.modal-body-divided {
    margin-bottom: 1rem;
}

.bg-section-1 {
    background-color: #f0f4f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.bg-section-2 {
    background-color: #fdf6e3;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.bg-section-3 {
    background-color: #eefaf6;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.bg-section-4 {
    background-color: #fef0f0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.modal-table th,
.modal-table td {
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: left;
}

#modalYesil .modal-body-divided ul,
#modalYesil .modal-body-divided ol {
    margin: 0.5rem 0 0;
    padding-left: 1.35rem;
}

#modalYesil .modal-body-divided li {
    margin-bottom: 0.65rem;
    line-height: 1.5;
}

#modalYesil .modal-body-divided li:last-child {
    margin-bottom: 0;
}

/* ——— Mobil (≤768px) ——— */
@media (max-width: 768px) {
    .info-banner {
        flex-direction: column;
        flex-wrap: wrap;
        text-align: center;
        gap: 0.65rem;
        padding: 0.85rem 0.75rem;
        font-size: 0.88rem;
    }

    .info-banner__intro,
    .info-banner__note,
    .info-banner .header-link,
    .info-banner__link {
        white-space: normal;
        flex-shrink: 1;
        max-width: 100%;
    }

    .modal {
        width: 95vw;
        max-width: 95vw;
        max-height: 90vh;
        height: auto;
    }

    .modal__inner {
        min-height: 0;
        padding: 1rem 0.85rem;
        font-size: 0.92rem;
    }

    .modal-body-divided .bg-section-1,
    .modal-body-divided .bg-section-2,
    .modal-body-divided .bg-section-3,
    .modal-body-divided .bg-section-4 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px;
    }

    .modal-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .modal-table thead,
    .modal-table tbody {
        display: table;
        width: 100%;
    }

    .modal-table th,
    .modal-table td {
        padding: 8px;
        font-size: 0.85rem;
    }

    .program-card {
        padding: 0.85rem 0.75rem;
    }

    .program-card__table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .program-card table {
        font-size: 0.76rem;
        margin-bottom: 12px;
    }

    .program-card th,
    .program-card td {
        padding: 0.4rem 0.45rem;
    }

    .program-card th {
        white-space: normal;
        font-size: 0.74rem;
    }
}
