:root {
    --teal: #2ab7ca;
    --teal-dark: #1e88a8;
    --navy: #1f2d4e;
    --text: #2c3e50;
    --muted: #6b7a90;
    --bg: #f5fbfd;
    --line: #e1ecf2;
    --pink: #ff6b9d;
    --pink-dark: #e84f84;
    --yellow: #ffd23f;
    --green: #3fb57a;
    --green-dark: #2f9a64;
    --blue: #4d8af0;
    --orange: #ff9f43;
    --red: #e74c3c;
    --radius: 20px;
    --shadow: 0 12px 28px -16px rgba(31, 45, 78, 0.45);
    --font-head: "Poppins", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.cat-default { --c: #2ab7ca; --c2: #1e88a8; --cl: #def5f8; }
.cat-turkce { --c: #ff6b9d; --c2: #ff8f70; --cl: #ffe5ee; }
.cat-matematik { --c: #4d8af0; --c2: #6a5cf0; --cl: #e4edff; }
.cat-hayat-bilgisi { --c: #2fbf71; --c2: #1ea89a; --cl: #dcf7e9; }
.cat-sanat { --c: #ff9f43; --c2: #f5577a; --cl: #fff0de; }
.cat-surec-degerlendirme { --c: #0ea5e9; --c2: #14b8a6; --cl: #ddf3fb; }
.cat-tum-dersler { --c: #8b5cf6; --c2: #d946ef; --cl: #f1e8ff; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: inherit; }

a { color: var(--teal-dark); }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { left: 8px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; margin-top: 32px; }
.hl { color: var(--yellow); }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, var(--teal) 0%, #1e9aad 100%);
    box-shadow: 0 6px 20px -12px rgba(0, 0, 0, 0.45);
}

.header-inner { display: flex; align-items: center; gap: 16px; min-height: 72px; position: relative; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }

.brand-avatar {
    width: 46px; height: 46px; border-radius: 50%;
    border: 3px solid #fff; object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: #fff; white-space: nowrap; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav-link {
    color: #fff;
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px 12px;
    border-radius: 12px;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
}

.nav-link:hover { background: rgba(255, 255, 255, 0.18); }

.nav-link.is-active { background: var(--pink); box-shadow: 0 6px 14px -6px rgba(232, 79, 132, 0.9); }

.nav-button { background: none; border: 0; cursor: pointer; }

.search { display: flex; align-items: center; background: #fff; border-radius: 999px; padding: 3px 3px 3px 14px; margin-right: 6px; }

.search input { border: 0; outline: 0; font: inherit; font-size: 0.88rem; width: 150px; background: transparent; color: var(--text); }

.search button {
    width: 32px; height: 32px; border-radius: 50%; border: 0;
    background: var(--pink); cursor: pointer; font-size: 0.85rem;
}

.menu-toggle {
    display: none; margin-left: auto;
    background: rgba(255, 255, 255, 0.2); color: #fff;
    border: 0; border-radius: 12px; width: 46px; height: 42px;
    font-size: 1.4rem; cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: var(--font-head); font-weight: 600; font-size: 0.92rem;
    padding: 10px 18px; border-radius: 14px; border: 0;
    cursor: pointer; text-decoration: none; line-height: 1.2;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 14px 24px; font-size: 1rem; border-radius: 16px; }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; border-radius: 10px; }
.btn-block { width: 100%; }

.btn-pink { background: var(--pink); color: #fff; box-shadow: 0 10px 20px -10px rgba(232, 79, 132, 0.9); }
.btn-pink:hover { background: var(--pink-dark); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 10px 20px -10px rgba(47, 154, 100, 0.9); }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { background: rgba(255, 255, 255, 0.16); color: #fff; border: 2px solid rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.28); }
.btn-outline { background: #fff; color: var(--text); border: 2px solid var(--line); }
.btn-outline:hover { border-color: var(--teal); }
.btn-insta { background: linear-gradient(90deg, #8a3ab9, #e95950, #fccc63); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-soft { background: #ffecec; color: #c0392b; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 56px 0 120px;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.14) 0 70px, transparent 71px),
        radial-gradient(circle at 88% 85%, rgba(255, 255, 255, 0.1) 0 120px, transparent 121px),
        linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
}

.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, 0.2); border-radius: 999px;
    padding: 6px 16px; font-weight: 800; font-size: 0.95rem;
}

.hero h1 {
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    font-weight: 800;
    margin: 18px 0 14px;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.hero-lead { font-size: 1.15rem; max-width: 560px; margin: 0; opacity: 0.96; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }

.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 0; }

.hero-stats li {
    display: flex; flex-direction: column; min-width: 96px;
    background: rgba(255, 255, 255, 0.16); border-radius: 18px; padding: 10px 18px;
}

.hero-stats strong { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.2; }
.hero-stats span { font-size: 0.85rem; opacity: 0.9; }

.hero-photo { position: relative; justify-self: center; }

.photo-frame {
    position: relative;
    isolation: isolate;
    display: flex;
    justify-content: center;
    width: min(380px, 78vw);
    aspect-ratio: 4 / 5;
    border-radius: 36px;
    border: 8px solid #fff;
    overflow: hidden;
    background: #fff;
    transform: rotate(2.5deg);
    box-shadow: 0 30px 50px -25px rgba(0, 0, 0, 0.55);
}

.photo-frame::before {
    content: "";
    position: absolute;
    inset: -30px;
    z-index: -1;
    background: url("../img/ogretmen.jpg") center / cover;
    filter: blur(18px);
}

.photo-frame img {
    width: auto;
    height: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}

.sticker {
    position: absolute;
    display: grid; place-items: center;
    width: 64px; height: 64px;
    font-size: 2rem;
    background: #fff; border-radius: 50%;
    box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.45);
    animation: float 4s ease-in-out infinite;
}

.k1 { top: 6%; left: -28px; }
.k2 { bottom: 12%; left: -34px; animation-delay: 0.8s; }
.k3 { top: -18px; right: 14%; animation-delay: 1.6s; }
.k4 { bottom: -10px; right: -18px; animation-delay: 2.2s; }

.sky .star { position: absolute; opacity: 0.7; animation: twinkle 3s ease-in-out infinite; }
.s1 { top: 12%; left: 6%; font-size: 1.3rem; }
.s2 { top: 22%; left: 46%; font-size: 1rem; animation-delay: 0.6s; }
.s3 { top: 70%; left: 4%; font-size: 0.9rem; animation-delay: 1.2s; }
.s4 { top: 10%; right: 6%; font-size: 1.2rem; animation-delay: 1.8s; }
.s5 { top: 62%; left: 40%; font-size: 2rem; opacity: 0.35; }
.s6 { top: 8%; left: 28%; font-size: 2.4rem; opacity: 0.3; }

.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 70px; fill: var(--bg); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes twinkle { 0%, 100% { opacity: 0.25; transform: scale(0.9); } 50% { opacity: 0.85; transform: scale(1.1); } }

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section-tight { padding: 36px 0 56px; }

.section-title { text-align: center; margin-bottom: 34px; }

.section-title .pill {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 9px 28px 9px 9px; border-radius: 999px; color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    box-shadow: 0 14px 26px -14px rgba(31, 45, 78, 0.6);
}

.tone-pink .pill { background: linear-gradient(135deg, #ff6b9d, #ff8fab); }
.tone-green .pill { background: linear-gradient(135deg, #3fb57a, #2ecc71); }
.tone-yellow .pill { background: linear-gradient(135deg, #ffad0d, #ffcf40); }
.tone-blue .pill { background: linear-gradient(135deg, #4d8af0, #6aa5ff); }

.pill-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #fff; font-size: 1.5rem; }

.section-title h2 { margin: 0; font-size: 1.7rem; font-weight: 800; text-align: left; line-height: 1.05; }
.section-title small { display: block; font-size: 0.68rem; letter-spacing: 0.25em; opacity: 0.9; font-weight: 700; }
.section-title p { color: var(--muted); margin: 12px 0 0; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.category-grid .cat-surec-degerlendirme, .category-grid .cat-tum-dersler { grid-column: 1 / -1; }

.category-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
    min-height: 250px; padding: 26px;
    border-radius: 28px; color: #fff; text-decoration: none;
    background: linear-gradient(145deg, var(--c), var(--c2));
    box-shadow: 0 18px 30px -18px var(--c);
    transition: transform 0.2s;
}

.category-card::after {
    content: ""; position: absolute; right: -40px; top: -40px;
    width: 140px; height: 140px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.category-card:hover { transform: translateY(-6px) rotate(-1deg); }

.category-icon {
    display: grid; place-items: center; width: 66px; height: 66px;
    border-radius: 22px; background: #fff; font-size: 2.1rem;
    box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.35);
}

.category-card h3 { font-size: 1.55rem; font-weight: 800; margin: 18px 0 6px; }
.category-card p { margin: 0 0 18px; opacity: 0.95; font-weight: 600; }

.category-count {
    margin-top: auto; align-self: flex-start;
    background: rgba(255, 255, 255, 0.26); border-radius: 999px;
    padding: 6px 14px; font-weight: 800;
}

.section-featured {
    background:
        radial-gradient(rgba(255, 173, 13, 0.18) 2px, transparent 2.5px) 0 0 / 22px 22px,
        #fff8e4;
}

.section-latest { background: linear-gradient(180deg, var(--bg) 0%, #ddf3f7 100%); }

.section-about { padding-top: 32px; }

/* ---------- Activity cards ---------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }

.card {
    display: flex; flex-direction: column;
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover { transform: translateY(-5px); box-shadow: 0 22px 36px -18px rgba(31, 45, 78, 0.45); }

.card-cover { position: relative; display: block; text-decoration: none; aspect-ratio: 4 / 3; background: var(--cl); overflow: hidden; }

.cover-img { width: 100%; height: 100%; object-fit: contain; }

.cover-placeholder {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    width: 100%; height: 100%; padding: 16px; text-align: center; color: #fff;
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.28) 0 16%, transparent 17%),
        radial-gradient(circle at 88% 82%, rgba(255, 255, 255, 0.2) 0 24%, transparent 25%),
        linear-gradient(145deg, var(--c), var(--c2));
}

.cover-icon { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2)); }

.cover-title {
    font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.cover-pdf {
    position: absolute; right: 10px; bottom: 10px;
    background: #fff; color: var(--c); font-weight: 800; font-size: 0.7rem;
    padding: 2px 8px; border-radius: 6px;
}

.badge { position: absolute; top: 10px; border-radius: 999px; font-weight: 800; font-size: 0.72rem; padding: 4px 10px; }
.badge-new { right: 10px; background: #fff; color: var(--green-dark); }
.badge-grade { left: 10px; background: rgba(31, 45, 78, 0.72); color: #fff; }

.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 14px 16px 16px; }

.card-title { margin: 0; font-size: 1rem; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--c); }

.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; }
.tag { color: var(--c); background: var(--cl); border-radius: 999px; padding: 2px 10px; }
.downloads { color: var(--green-dark); }

.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-date { color: var(--muted); font-size: 0.78rem; }

.empty {
    text-align: center; padding: 48px 20px;
    background: #fff; border: 2px dashed #cfe5ec; border-radius: 24px;
    color: var(--muted); font-weight: 700;
}

.empty span { display: block; font-size: 3rem; }

/* ---------- Featured ---------- */

.featured-card {
    display: grid; grid-template-columns: 1fr 1.2fr;
    background: #fff; border-radius: 30px; overflow: hidden;
    box-shadow: 0 26px 46px -26px rgba(31, 45, 78, 0.5);
}

.featured-cover { display: block; min-height: 280px; background: var(--cl); text-decoration: none; }
.featured-cover .cover-icon { font-size: 4.2rem; }
.featured-cover .cover-title { font-size: 1.3rem; }

.featured-body { display: flex; flex-direction: column; gap: 12px; padding: 34px; }
.featured-body h3 { font-size: 1.7rem; font-weight: 800; margin: 0; }
.featured-body h3 a { color: var(--text); text-decoration: none; }
.featured-body p { margin: 0; color: var(--muted); }
.featured-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: #eef4f8; color: var(--text); text-decoration: none;
    border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 0.82rem;
}

.chip-cat, .chip[class*="cat-"] { background: var(--cl); color: var(--c); }
.chip-new { background: #e4f8ec; color: var(--green-dark); }
.chip-lg { padding: 10px 18px; font-size: 1rem; }

/* ---------- About ---------- */

.about-teaser {
    display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: center;
    max-width: 1140px; background: #fff; border-radius: 30px; padding: 34px; box-shadow: var(--shadow);
}

.about-avatar { width: 170px; height: 170px; border-radius: 50%; border: 7px solid var(--yellow); object-fit: cover; }
.about-teaser h2 { margin: 0 0 10px; font-size: 1.6rem; }
.about-teaser p { margin: 0 0 18px; color: var(--muted); }

.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.about-photo { display: flex; justify-content: center; padding-top: 10px; }
.about-text h2 { font-size: 2rem; margin-top: 0; }
.about-text h3 { margin-top: 28px; }

.contact-box { background: #fff; border-radius: 22px; padding: 6px 22px 12px; margin: 26px 0; box-shadow: var(--shadow); }

.prose { max-width: 780px; }
.prose h1 { font-size: 2rem; }

/* ---------- Page hero ---------- */

.page-hero {
    position: relative; overflow: hidden; color: #fff;
    padding: 30px 0 92px;
    background:
        radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.16) 0 90px, transparent 91px),
        linear-gradient(135deg, var(--c), var(--c2));
}

.page-hero-small { padding: 22px 0 70px; }

.breadcrumb { font-size: 0.9rem; font-weight: 700; opacity: 0.95; }
.breadcrumb a { color: #fff; opacity: 0.85; }

.page-hero-inner { display: flex; align-items: center; gap: 22px; margin-top: 18px; }

.page-hero-icon {
    display: grid; place-items: center; flex-shrink: 0;
    width: 88px; height: 88px; border-radius: 28px; background: #fff;
    font-size: 2.8rem; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.4);
}

.page-hero h1 { margin: 0 0 4px; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
.page-hero p { margin: 0 0 10px; font-weight: 600; opacity: 0.95; }
.page-hero-count { display: inline-block; background: rgba(255, 255, 255, 0.25); border-radius: 999px; padding: 4px 14px; font-weight: 800; }

.grade-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }

.grade-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; color: var(--text); text-decoration: none;
    border: 2px solid var(--line); border-radius: 999px;
    padding: 7px 16px; font-family: var(--font-head); font-weight: 600; font-size: 0.88rem;
}

.grade-chip span { background: #eef4f8; border-radius: 999px; padding: 0 8px; font-size: 0.78rem; }
.grade-chip:hover { border-color: var(--c, var(--teal)); }
.grade-chip.is-active { background: var(--c, var(--teal)); border-color: var(--c, var(--teal)); color: #fff; }
.grade-chip.is-active span { background: rgba(255, 255, 255, 0.28); }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 34px; }

.page-link {
    display: grid; place-items: center; min-width: 42px; height: 42px;
    border-radius: 12px; background: #fff; border: 2px solid var(--line);
    color: var(--text); text-decoration: none; font-weight: 800;
}

.page-link.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- Activity detail ---------- */

.activity { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: start; }

.activity-cover { aspect-ratio: 4 / 3; border-radius: 28px; overflow: hidden; box-shadow: 0 26px 46px -26px rgba(31, 45, 78, 0.55); background: var(--cl); }
.activity-cover .cover-icon { font-size: 5rem; }
.activity-cover .cover-title { font-size: 1.4rem; }

.activity-info h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 14px 0; }

.facts { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 20px 0; }
.facts li { background: #fff; border-radius: 14px; padding: 10px 14px; font-weight: 700; box-shadow: var(--shadow); }

.activity-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }

.preview { margin-top: 44px; }
.preview-title { font-size: 1.3rem; }
.preview-frame { width: 100%; height: 80vh; min-height: 520px; border: 0; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.preview-box { text-align: center; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy); color: #c9d4e5; padding: 56px 0 0; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-grid h3 { color: #fff; font-size: 1.05rem; margin-top: 6px; }
.footer-about p { max-width: 420px; }
.brand-footer .brand-name { font-size: 1.2rem; }

.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a { color: #c9d4e5; text-decoration: none; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
    margin-top: 44px; padding-top: 20px; padding-bottom: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.9rem;
}

/* ---------- Error ---------- */

.error-page { padding: 90px 0; }
.error-emoji { display: block; font-size: 5rem; }

/* ---------- Admin ---------- */

.admin-body { background: #f1f6f9; }
.admin-main { padding: 30px 0 70px; }
.admin-nav { margin-left: auto; flex-wrap: wrap; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

.panel { background: #fff; border-radius: 24px; padding: 26px; box-shadow: var(--shadow); margin-bottom: 26px; }
.panel h2 { margin-top: 0; font-size: 1.3rem; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.panel-head .grade-filter { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { background: #fff; border-radius: 18px; padding: 16px 20px; box-shadow: var(--shadow); }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.7rem; color: var(--teal-dark); }
.stat span { color: var(--muted); font-weight: 700; font-size: 0.88rem; }
.stat-turkce strong { color: #ff6b9d; }
.stat-matematik strong { color: #4d8af0; }
.stat-hayat-bilgisi strong { color: #2fbf71; }
.stat-sanat strong { color: #ff9f43; }

.form { display: grid; gap: 16px; }
.form-narrow { max-width: 440px; }
.single-only { display: grid; gap: 16px; }
.single-only[hidden], .multi-note[hidden] { display: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { display: grid; gap: 6px; align-content: start; }
.field > span { font-weight: 800; }
.field em { color: var(--pink); font-style: normal; }
.field small { color: var(--muted); font-weight: 600; }

.field input, .field select, .field textarea {
    font: inherit; color: var(--text);
    padding: 11px 14px; border: 2px solid var(--line); border-radius: 12px;
    background: #fbfdfe; width: 100%;
}

.field input[type="file"] { padding: 9px; }

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(42, 183, 202, 0.15);
}

.check { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--pink); }

.dropzone {
    position: relative;
    display: grid; justify-items: center; gap: 6px; text-align: center;
    padding: 30px 20px; border: 3px dashed #9bd8e2; border-radius: 22px;
    background: #f2fbfd; transition: background 0.2s, border-color 0.2s;
}

.dropzone.is-drag, .dropzone:hover { background: #e2f6fa; border-color: var(--teal); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone-icon { font-size: 2.6rem; }
.dropzone-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.dropzone-list li { background: #fff; border-radius: 10px; padding: 5px 12px; font-size: 0.9rem; font-weight: 700; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 10px; }
.table td { padding: 12px 10px; border-top: 1px solid #edf3f7; vertical-align: middle; }
.table-title { display: flex; align-items: center; gap: 12px; }
.table-title a { font-weight: 800; color: var(--text); }
.table-title small { display: block; }
.mini-cover { display: block; width: 68px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.mini-cover .cover-title, .mini-cover .cover-pdf { display: none; }
.mini-cover .cover-icon { font-size: 1.5rem; }
.actions { white-space: nowrap; text-align: right; }
.confirm { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.85rem; }
.confirm[hidden], .btn[hidden] { display: none; }

.alert { padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; font-weight: 700; }
.alert-success { background: #e4f8ec; color: #1e7d4b; }
.alert-error { background: #ffeaea; color: #c0392b; }

.login-card { max-width: 430px; margin: 40px auto; text-align: center; }
.login-card .form { text-align: left; margin: 18px 0; }
.login-avatar { width: 110px; height: 110px; border-radius: 50%; border: 5px solid var(--yellow); object-fit: cover; margin: 0 auto; }

.edit-cover { width: 220px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--cl); }
.edit-cover .cover-icon { font-size: 2rem; }

/* ---------- Responsive ---------- */

/* The menu does not fit next to the brand, so wide screens show it on a second row. */
@media (min-width: 1121px) {
    .header-public { flex-wrap: wrap; row-gap: 6px; padding-top: 12px; padding-bottom: 10px; }
    .header-public .main-nav { flex-basis: 100%; justify-content: center; margin-left: 0; }
    .header-public .search { position: absolute; top: 16px; right: 20px; margin: 0; }
}

@media (max-width: 1120px) {
    .menu-toggle { display: block; }
    .main-nav:not(.admin-nav) {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 4px;
        padding: 14px 20px 20px;
        background: var(--teal-dark);
        border-radius: 0 0 22px 22px;
        box-shadow: 0 16px 24px -14px rgba(0, 0, 0, 0.5);
    }
    .main-nav.is-open { display: flex; }
    .main-nav .nav-link { padding: 11px 14px; font-size: 1rem; }
    .search { margin: 0 0 8px; }
    .search input { width: 100%; flex: 1; }
}

@media (max-width: 900px) {
    .hero { padding-top: 36px; }
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-lead { margin: 0 auto; }
    .hero-actions, .hero-stats { justify-content: center; }
    .hero-photo { margin-top: 10px; }
    .photo-frame { width: min(300px, 70vw); }
    .featured-card, .activity, .about { grid-template-columns: 1fr; }
    .about-teaser { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 700px) {
    .section { padding: 46px 0; }
    .preview { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .page-hero-icon { width: 66px; height: 66px; font-size: 2rem; border-radius: 20px; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .card-foot { flex-direction: column; align-items: stretch; }
    .card-cover .cover-title, .card-cover .cover-pdf { display: none; }
    .card-cover .cover-icon { font-size: 3rem; margin-top: 14px; }
    .table th:nth-child(3), .table td:nth-child(3), .table th:nth-child(5), .table td:nth-child(5) { display: none; }
    .table thead { display: none; }
    .table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 14px 0; border-top: 1px solid #edf3f7; }
    .table td { display: block; padding: 0; border-top: 0; }
    .table td:first-child, .table td.actions { flex-basis: 100%; }
    .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 700; }
    .table td.actions { text-align: left; white-space: normal; }
    .sticker { width: 50px; height: 50px; font-size: 1.5rem; }
    .k1, .k2 { left: -14px; }
    .k4 { right: -8px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
