/* ============================================================ */
/* ===== YETENEKLİ HASAL — TEMİZ STYLE.CSS ===== */
/* ===== Sıfırdan, rem tabanlı, oranlı sistem ===== */
/* ============================================================ */

/* ============================================================ */
/* ===== 1. RESET & TEMEL ===== */
/* ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;  /* 1rem = 16px — temel referans */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f0f0;
    color: #333;
    font-size: 1rem;       /* 16px */
    line-height: 1.6;
    overflow-x: hidden;    /* Yatay taşma yok */
}

a {
    text-decoration: none;
    color: #800020;
    transition: color 0.2s;
}

a:hover {
    color: #6B0018;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================ */
/* ===== 2. HEADER ===== */
/* ============================================================ */
header {
    background: linear-gradient(135deg, rgba(26,0,0,0.85), rgba(128,0,32,0.85)),
                url('../images/logo.png');
    background-size: 100% auto;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.header-container {
    max-width: 75rem;      /* 1200px */
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.logo img {
    height: 3.5rem;        /* 56px */
    width: auto;
    border-radius: 0.75rem;
}

.logo-text h1 {
    color: white;
    font-size: 1.65rem;    /* ~26px */
    font-weight: 800;
    line-height: 1.1;
}

.logo-text h1 span {
    color: #C9A94E;
}

.logo-text p {
    color: rgba(255,255,255,0.7);
    font-size: 0.72rem;    /* ~11.5px */
    letter-spacing: 0.1rem;
}

/* ============================================================ */
/* ===== 3. NAVİGASYON ===== */
/* ============================================================ */
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
    width: 100%;
}

nav a {
    color: white;
    padding: 0.5rem 0.9rem;
    border-radius: 1.25rem;
    font-size: 0.8rem;     /* ~12.8px */
    font-weight: 500;
    transition: all 0.25s;
    background: rgba(255,255,255,0.1);
    white-space: nowrap;
    line-height: 1;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
}

nav a:hover {
    background: rgba(255,215,0,0.25);
}

nav a.active {
    background: #C9A94E;
    color: #1a0000;
    font-weight: 700;
}

nav a.gold {
    background: #C9A94E;
    color: #1a0000;
}

nav a.gold:hover {
    background: #D4AF37;
}

nav a.kilitli {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255,255,255,0.05);
}

nav a.kilitli:hover {
    background: rgba(255,255,255,0.05);
    transform: none;
}

/* ============================================================ */
/* ===== 4. ANA KONTEYNER ===== */
/* ============================================================ */
.container {
    max-width: 75rem;      /* 1200px */
    margin: 0 auto;
    padding: 1.25rem;
}

/* ============================================================ */
/* ===== 5. KARTLAR ===== */
/* ============================================================ */
.kart {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 0.9rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.kart h2 {
    color: #800020;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.6rem;
    font-size: 1.35rem;    /* ~21.6px */
    line-height: 1.3;
}

.kart h3 {
    font-size: 1.1rem;     /* ~17.6px */
    margin: 0.75rem 0;
}

/* ============================================================ */
/* ===== 6. HABERLER ===== */
/* ============================================================ */
.haber-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.haber-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 1px solid #f0e8e8;
}

.haber-card:hover {
    transform: translateY(-0.3rem);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.haber-gorsel {
    height: 9.5rem;        /* 152px */
    background: #e9e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
}

.haber-card .haber-icerik {
    padding: 1rem;
}

.haber-card h3 {
    color: #800020;
    font-size: 1.1rem;     /* ~17.6px */
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.haber-card .tarih {
    color: #999;
    font-size: 0.8rem;     /* ~12.8px */
}

.haber-card p {
    color: #555;
    font-size: 0.9rem;     /* ~14.4px */
    margin: 0.5rem 0;
    line-height: 1.5;
}

/* ============================================================ */
/* ===== 7. DUYURULAR ===== */
/* ============================================================ */
.duyuru-item {
    background: #f8f4f4;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 0.6rem 0;
    border-left: 4px solid #800020;
    font-size: 0.95rem;
    line-height: 1.5;
}

.duyuru-item strong {
    color: #800020;
}

/* ============================================================ */
/* ===== 8. TAKVİM / YAKLAŞAN YARIŞMALAR ===== */
/* ============================================================ */
.takvim-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.6rem;
}

.takvim-item {
    flex: 1 1 12rem;       /* min 192px */
    background: #f8f4f4;
    padding: 1rem 1.25rem;
    border-radius: 0.6rem;
    text-align: center;
    border: 1px solid #e9e0e0;
}

.takvim-item .label {
    font-size: 0.85rem;
    color: #666;
    font-weight: bold;
}

.takvim-item .deger {
    font-size: 1.1rem;
    font-weight: bold;
    color: #800020;
    margin-top: 0.3rem;
}

.takvim-item .kalan {
    font-size: 0.85rem;
    color: #e65100;
    margin-top: 0.3rem;
}

/* ============================================================ */
/* ===== 9. BUTONLAR ===== */
/* ============================================================ */
.buton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #800020;
    color: white;
    padding: 0.65rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    font-size: 0.9rem;     /* ~14.4px */
    line-height: 1;
    min-height: 2.25rem;
    text-align: center;
}

.buton:hover {
    background: #6B0018;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128,0,32,0.3);
}

.buton-gold {
    background: #C9A94E;
    color: #1a0000;
}

.buton-gold:hover {
    background: #D4AF37;
}

/* ============================================================ */
/* ===== 10. HOCA KARTLARI ===== */
/* ============================================================ */
.hoca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.hoca-card {
    background: #f8f4f4;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid #e9e0e0;
    transition: all 0.3s;
}

.hoca-card:hover {
    transform: translateY(-0.3rem);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.hoca-foto {
    width: 7rem;           /* 112px */
    height: 7rem;
    border-radius: 50%;
    background: #ddd;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #999;
}

.hoca-card h3 {
    color: #800020;
    font-size: 1.1rem;
}

.hoca-card .yetki {
    color: #800020;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 0.3rem;
}

/* ============================================================ */
/* ===== 11. OLİMPİYAT KARTLARI ===== */
/* ============================================================ */
.olimpiyat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.olimpiyat-card {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
    height: 12rem;         /* 192px */
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a0000, #800020);
}

.olimpiyat-card:hover {
    transform: scale(1.02);
}

.olimpiyat-card .olimpiyat-yazi {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    text-align: center;
    padding: 1.25rem;
}

.olimpiyat-card .olimpiyat-yazi small {
    display: block;
    font-size: 1rem;
    font-weight: normal;
    opacity: 0.8;
}

/* ============================================================ */
/* ===== 12. PROJE KARTLARI ===== */
/* ============================================================ */
.proje-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.proje-card {
    background: #f8f4f4;
    border-radius: 0.75rem;
    padding: 1.25rem;
    border-left: 5px solid #800020;
    border: 1px solid #e9e0e0;
    transition: all 0.3s;
}

.proje-card:hover {
    transform: translateY(-0.3rem);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.proje-card h3 {
    color: #800020;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.proje-card .durum {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.6rem;
}

.durum.aktif {
    background: #e8f5e9;
    color: #2e7d32;
}

.durum.beklemede {
    background: #fff3e0;
    color: #e65100;
}

.durum.tamamlandi {
    background: #e3f2fd;
    color: #0d47a1;
}

/* ============================================================ */
/* ===== 13. FORM ===== */
/* ============================================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #800020;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #800020;
    outline: none;
}

.form-group textarea {
    min-height: 6rem;
    resize: vertical;
}

/* ============================================================ */
/* ===== 14. ANKET ===== */
/* ============================================================ */
.anket-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid #e9e0e0;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.25s;
}

.anket-option:hover {
    border-color: #800020;
    background: #f8f4f4;
}

.anket-option input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #800020;
    cursor: pointer;
}

/* ============================================================ */
/* ===== 15. BAŞARI ===== */
/* ============================================================ */
.basari-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.basari-item:last-child {
    border-bottom: none;
}

.basari-item .icon {
    font-size: 1.8rem;
    width: 3rem;
    text-align: center;
    flex-shrink: 0;
}

/* ============================================================ */
/* ===== 16. MODAL ===== */
/* ============================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    max-width: 32rem;      /* 512px */
    width: 100%;
    padding: 1.75rem;
    border-radius: 1rem;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    color: #800020;
    margin-bottom: 1.25rem;
    font-size: 1.35rem;
}

/* ============================================================ */
/* ===== 17. SOSYAL MEDYA (Sağ Alt) ===== */
/* ============================================================ */
.sosyal-medya {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sosyal-medya a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #800020;
    color: white;
    font-size: 1.4rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sosyal-medya a:hover {
    transform: scale(1.1);
    background: #C9A94E;
    color: #1a0000;
}

/* ============================================================ */
/* ===== 18. FOOTER ===== */
/* ============================================================ */
footer {
    background: #1a0000;
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    text-align: center;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.85;
}

footer strong {
    color: #C9A94E;
}

/* ============================================================ */
/* ===== 19. SEKMELER ===== */
/* ============================================================ */
.tab-content {
    display: none;
    animation: fadeIn 0.4s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detay-sayfa {
    display: none;
}

.detay-sayfa.active {
    display: block;
}

.geri-buton {
    background: #800020;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.geri-buton:hover {
    background: #6B0018;
}

/* ============================================================ */
/* ===== 20. MOBİL (max-width: 768px) ===== */
/* ============================================================ */
@media (max-width: 768px) {

    html {
        font-size: 15px;   /* 1rem = 15px */
    }

    .container {
        padding: 0.75rem;
    }

    /* --- HEADER --- */
    header {
        padding: 0.5rem 0;
    }

    .header-container {
        padding: 0 0.6rem;
        gap: 0.5rem;
    }

    /* Logo yatay kalır ama küçülür */
    .logo {
        gap: 0.6rem;
    }

    .logo img {
        height: 2.4rem;    /* ~36px */
    }

    .logo-text h1 {
        font-size: 1.2rem; /* ~18px */
    }

    .logo-text p {
        font-size: 0.65rem;
    }

    /* Arama + bildirim butonları */
    .header-container button[onclick*="aramaAc"],
    #bildirimBtn {
        width: 2.3rem;
        height: 2.3rem;
        font-size: 1rem;
    }

    /* --- NAV: yatay kaydırma --- */
    .header-container:last-child {
        padding: 0.25rem 0 !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
    }

    .header-container:last-child::-webkit-scrollbar {
        display: none;
    }

    nav {
        flex-wrap: nowrap;
        gap: 0.3rem;
        margin-top: 0;
        padding: 0 0.5rem;
        width: max-content;
        min-width: 100%;
    }

    nav a {
        flex-shrink: 0;
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        min-height: 2.2rem;
        white-space: nowrap;
    }

    /* --- GRID'LER tek sütun --- */
    .haber-grid,
    .hoca-grid,
    .olimpiyat-grid,
    .proje-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    /* --- TAKVİM alt alta --- */
    .takvim-grid {
        flex-direction: column;
        gap: 0.6rem;
    }

    .takvim-item {
        flex: 1 1 auto;
        padding: 0.9rem;
    }

    /* --- KARTLAR --- */
    .kart {
        padding: 1rem;
        margin: 0.6rem 0;
    }

    .kart h2 {
        font-size: 1.15rem;
        padding-bottom: 0.5rem;
        margin-bottom: 0.8rem;
    }

    /* --- BUTONLAR (min 44px dokunma) --- */
    .buton {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
        min-height: 2.75rem;  /* 44px */
    }

    /* --- FORMLAR (iOS zoom engeli) --- */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem;      /* 16px mobile — iOS zoom yok */
        padding: 0.7rem;
    }

    /* --- MODAL --- */
    .modal {
        padding: 0.5rem;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        padding: 1.25rem;
        border-radius: 0.75rem;
    }

    /* --- SOSYAL MEDYA küçülür --- */
    .sosyal-medya {
        bottom: 0.75rem;
        right: 0.75rem;
        gap: 0.5rem;
    }

    .sosyal-medya a {
        width: 2.4rem;
        height: 2.4rem;
        font-size: 1.1rem;
    }

    /* --- AI CHAT BUTONU --- */
    #aiChatBtn {
        width: 2.9rem !important;
        height: 2.9rem !important;
        font-size: 1.3rem !important;
        bottom: 0.75rem !important;
        left: 0.75rem !important;
    }

    /* --- FOOTER --- */
    footer {
        padding: 1rem;
        margin: 1rem 0;
    }
}

/* ============================================================ */
/* ===== 21. ÇOK KÜÇÜK (max-width: 380px) ===== */
/* ============================================================ */
@media (max-width: 380px) {

    html {
        font-size: 14px;
    }

    .logo-text p {
        display: none;     /* Yer kazan */
    }

    .logo img {
        height: 2rem;
    }

    nav a {
        font-size: 0.7rem;
        padding: 0.35rem 0.6rem;
    }

    .kart {
        padding: 0.85rem;
    }

    .kart h2 {
        font-size: 1.05rem;
    }
}

/* ============================================================ */
/* ===== 22. TABLET (769px - 1024px) ===== */
/* ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {

    .container {
        max-width: 95%;
    }

    /* Tablet'te grid'ler 2 sütun */
    .haber-grid,
    .proje-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hoca-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .olimpiyat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}