/* =====================================================================
   Bilim Eğitim Platformu — Tasarım Sistemi
   Tema: "Laboratuvar defteri / blueprint" — çocuk dostu ama güven veren
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Renk paleti — Bilim X marka renkleri (logo: magenta/mor → pembe → turuncu → amber) */
    --ink:        #2a1430;   /* koyu erik - metin */
    --ink-soft:   #6a4a63;   /* ikincil metin */
    --teal:       #c5388d;   /* ana vurgu - marka magentası */
    --teal-dark:  #9e2d80;
    --teal-tint:  #fbe6f1;
    --amber:      #f7991d;   /* enerji vurgusu - marka turuncu/amber */
    --violet:     #8e2d8a;   /* kategori vurgusu - marka moru */
    --coral:      #f0682c;   /* marka turuncu */
    --surface:    #fdf6fa;   /* sıcak açık arka plan */
    --surface-2:  #ffffff;
    --line:       #f0dde9;
    --line-soft:  #f7ebf2;

    /* Marka degradesi (logodaki alev geçişi) */
    --brand-grad: linear-gradient(135deg, #8e2d8a 0%, #c5388d 45%, #f0682c 100%);

    --radius:     16px;
    --radius-sm:  10px;
    --shadow:     0 6px 24px rgba(20, 34, 53, .08);
    --shadow-lg:  0 18px 50px rgba(20, 34, 53, .14);

    --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
    --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
}

/* --------------------------- Reset --------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--surface-2);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }

.container { width: min(1140px, 92%); margin-inline: auto; }
.muted { color: var(--ink-soft); }
.text-center { text-align: center; }

/* --------------------------- Butonlar --------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-body); font-weight: 600; font-size: .98rem;
    padding: .72rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
    cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 6px 16px rgba(197,56,141,.32); }
.btn-primary:hover { background: var(--teal-dark); color:#fff; }
.btn-amber { background: var(--amber); color: var(--ink); box-shadow: 0 6px 16px rgba(246,166,35,.3); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-light { background:#fff; color: var(--ink); }
.btn-danger { background:#fff; border-color:#f3c6c0; color: var(--coral); }
.btn-danger:hover { background: var(--coral); color:#fff; }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* --------------------------- Üst menü --------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display);
         font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .logo-mark {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    background: #fff; color: #fff; font-size: 1.2rem; padding: 3px; overflow: hidden;
    box-shadow: 0 4px 12px rgba(142,45,138,.22);
}
.brand .logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand .brand-full { height: 54px; width: auto; display: block; }
.site-footer .brand .brand-full { height: 44px; }
.nav-links { display: flex; align-items: center; gap: .3rem; list-style: none; padding: 0; }
.nav-links a { color: var(--ink-soft); font-weight: 600; font-size: .95rem; padding: .5rem .8rem; border-radius: 8px; }
.nav-links a:hover { color: var(--ink); background: var(--surface); text-decoration: none; }
.nav-links a.active { color: var(--teal-dark); }
.nav-cta { display: flex; align-items: center; gap: .6rem; } .mobile-only { display: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* --------------------------- Hero (blueprint) --------------------------- */
.hero {
    position: relative; overflow: hidden;
    background:
        linear-gradient(180deg, rgba(243,247,250,0) 60%, var(--surface) 100%),
        radial-gradient(120% 80% at 80% -10%, rgba(142,45,138,.10), transparent 60%),
        radial-gradient(90% 70% at 0% 0%, rgba(240,104,44,.10), transparent 55%),
        var(--surface-2);
}
/* milimetrik kağıt / blueprint ızgara */
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image:
        linear-gradient(rgba(197,56,141,.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(197,56,141,.07) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center;
              padding: 4.5rem 0 5rem; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .82rem;
    text-transform: uppercase; letter-spacing: .08em; color: var(--teal-dark);
    background: var(--teal-tint); padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.2rem;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); color: var(--ink); }
.hero h1 .accent { color: var(--teal); }
.hero p.lead { font-size: 1.12rem; color: var(--ink-soft); margin: 1.2rem 0 1.8rem; max-width: 33ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.4rem; }
.hero-stats .stat .num { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; color: var(--ink); }
.hero-stats .stat .lbl { font-size: .85rem; color: var(--ink-soft); }

/* hero görsel: deney kartı / molekül */
.hero-visual { position: relative; }
.beaker-card {
    background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 1.5rem;
    box-shadow: var(--shadow-lg); transform: rotate(-2deg);
}
.beaker-card .flask { font-size: 3.2rem; }
.molecule {
    position: absolute; border-radius: 999px; background: var(--amber);
    box-shadow: 0 6px 14px rgba(246,166,35,.4); animation: float 6s ease-in-out infinite;
}
.molecule.m1 { width: 22px; height: 22px; top: -10px; right: 18%; background: var(--violet); }
.molecule.m2 { width: 14px; height: 14px; bottom: 12%; left: -8px; }
.molecule.m3 { width: 30px; height: 30px; bottom: -14px; right: 8%; background: var(--teal); animation-delay: -3s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* --------------------------- Bölümler --------------------------- */
.section { padding: 4.5rem 0; }
.section.alt { background: var(--surface); }
.section-head { max-width: 56ch; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .eyebrow { color: var(--violet); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-top: .5rem; }
.section-head p { color: var(--ink-soft); margin-top: .8rem; font-size: 1.05rem; }

/* özellik kartları */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.3rem; }
.feature {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--teal-tint); }
.feature .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
               font-size: 1.5rem; margin-bottom: 1rem; background: var(--teal-tint); }
.feature h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.feature p { color: var(--ink-soft); font-size: .96rem; }

/* --------------------------- Deney kartları --------------------------- */
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.exp-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.exp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.exp-thumb { aspect-ratio: 16/9; background: var(--surface); position: relative; display: grid; place-items: center;
             font-size: 2.6rem; color: var(--teal); overflow: hidden; }
.exp-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* Deney kapak fotoğrafı: kırpma yok — tam boy sığdır, boş kalan yanları
   aynı görselin flu kopyası doldursun (bilim insanı portreleriyle aynı teknik) */
.exp-thumb img.bg {
    position: absolute; inset: 0; object-fit: cover;
    filter: blur(16px) brightness(1.06) saturate(1.08); transform: scale(1.2);
}
.exp-thumb img.fg {
    position: absolute; inset: 0; z-index: 1; object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .14));
}
/* Hover'da videodan sahne önizlemesi (main.js data-scenes döngüsü) */
.exp-thumb .scene-overlay {
    position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: opacity .25s ease;
    pointer-events: none;
}
.exp-thumb .scene-overlay.on { opacity: 1; }
.exp-tag {
    /* z-index: kapak görselinin (.fg = 1) ve sahne önizlemesinin (2) üstünde
       kalmalı; yoksa geniş fotoğraflarda rozet görselin altında kayboluyor */
    position: absolute; top: .7rem; left: .7rem; z-index: 3;
    font-size: .72rem; font-weight: 700;
    padding: .25rem .65rem; border-radius: 999px; color: #fff; text-transform: uppercase; letter-spacing: .03em;
}
.tag-fizik    { background: var(--teal); }
.tag-kimya    { background: var(--violet); }
.tag-biyoloji { background: #2ea66a; }
.tag-genel    { background: var(--ink-soft); }
.tag-matematik{ background: var(--amber); color: var(--ink); }
.tag-grade    { background: var(--violet); }
.exp-body { padding: .75rem .95rem .85rem; display: flex; flex-direction: column; flex: 1; }
.exp-body h3 { font-size: 1.08rem; color: var(--ink); margin-bottom: .25rem; }
.exp-body p { color: var(--ink-soft); font-size: .9rem; flex: 1; }
.exp-meta { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; font-size: .8rem; color: var(--ink-soft); }

/* ders filtre çubuğu */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filter-bar a {
    padding: .5rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--line);
    font-weight: 600; font-size: .9rem; color: var(--ink-soft); background: #fff;
}
.filter-bar a:hover { border-color: var(--teal); color: var(--teal-dark); text-decoration: none; }
.filter-bar a.active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* --------------------------- CTA şeridi --------------------------- */
.cta-band {
    background: linear-gradient(135deg, var(--ink), #1d3350); color: #fff;
    border-radius: 24px; padding: 3rem; text-align: center; position: relative; overflow: hidden;
}
.cta-band::after { content:""; position:absolute; inset:0;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 26px 26px; opacity:.6; }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.cta-band p { color: rgba(255,255,255,.78); margin: .8rem auto 1.6rem; max-width: 50ch; }

/* --------------------------- Footer --------------------------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem;
               border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer .brand { color: #fff; margin-bottom: .8rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; font-family: var(--font-body); font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.site-footer a { color: rgba(255,255,255,.72); font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom { padding-top: 1.5rem; font-size: .85rem; text-align: center; color: rgba(255,255,255,.5); }

/* --------------------------- Flash / uyarılar --------------------------- */
.flash-wrap { position: fixed; top: 1rem; right: 1rem; z-index: 100; display: grid; gap: .6rem; max-width: 360px; }
.flash {
    padding: .85rem 1.1rem; border-radius: 12px; font-size: .92rem; font-weight: 500;
    box-shadow: var(--shadow); display: flex; gap: .6rem; align-items: flex-start;
    animation: slidein .3s ease; background:#fff; border-left: 4px solid;
}
.flash.success { border-color: #2ea66a; color: #176b43; }
.flash.error   { border-color: var(--coral); color: #b73526; }
@keyframes slidein { from { transform: translateX(120%); } to { transform: translateX(0); } }

/* --------------------------- İçerik sayfaları --------------------------- */
.page-hero { background: var(--surface); padding: 3.2rem 0; border-bottom: 1px solid var(--line-soft); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-hero p { color: var(--ink-soft); margin-top: .7rem; font-size: 1.08rem; max-width: 60ch; }
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin-bottom: .9rem; }
.breadcrumb a { color: var(--ink-soft); }

.prose { max-width: 70ch; }
.prose h2 { font-size: 1.6rem; margin: 2rem 0 .8rem; }
.prose h3 { font-size: 1.25rem; margin: 1.6rem 0 .6rem; }
.prose p { margin-bottom: 1rem; color: var(--ink-soft); }
.prose ul { margin: 0 0 1rem 1.2rem; color: var(--ink-soft); }
.prose li { margin-bottom: .4rem; }

/* iki sütun */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }

/* --------------------------- Form --------------------------- */
.form-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display:block; font-weight:600; font-size:.9rem; margin-bottom:.4rem; color: var(--ink); }
.form-control, select.form-control, textarea.form-control {
    width: 100%; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: 10px;
    font-family: var(--font-body); font-size: .96rem; color: var(--ink); background:#fff; transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: .82rem; color: var(--ink-soft); margin-top: .35rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.checkbox-row { display: flex; align-items: center; gap: .5rem; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--teal); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem .9rem; }
.inline-add { border-top: 1px solid var(--line, #e6e3dc); padding-top: 1rem; }

/* İlerleme takibi */
.exp-done-badge {
    position: absolute; top: .55rem; left: .55rem; z-index: 3;
    background: #16a34a; color: #fff;
    font-size: .72rem; font-weight: 700;
    padding: .25rem .55rem; border-radius: 999px;
    display: inline-flex; align-items: center; gap: .25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.progress-track {
    background: #eef0f3; border-radius: 999px; height: 12px; overflow: hidden;
}
.progress-fill {
    background: linear-gradient(90deg, #d81b7f, #f5a623);
    height: 100%; border-radius: 999px; transition: width .4s ease;
    min-width: 4px;
}
.progress-label { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .4rem; }

/* Admin bağlamsal arama (üst bar) */
.admin-search {
    display: flex; align-items: center; gap: .3rem;
    flex: 1; max-width: 420px; margin: 0 1rem;
    background: #fff; border: 1px solid var(--line, #e2e5ea);
    border-radius: 999px; padding: .3rem .7rem;
}
.admin-search .ic { background: none; border: 0; cursor: pointer; font-size: .95rem; padding: 0; }
.admin-search input {
    flex: 1; border: 0; outline: none; background: transparent;
    font: inherit; font-size: .9rem; min-width: 0;
}
.admin-search .clear { color: #9ca3af; text-decoration: none; font-size: .85rem; padding: 0 .15rem; }
.admin-search .clear:hover { color: #dc2626; }
@media (max-width: 720px) { .admin-search { max-width: none; margin: 0 .5rem; } }

/* Dil değiştirici (TR | EN) */
.lang-switch { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 700; margin-right: .4rem; }
.lang-switch a { color: var(--ink-soft, #6b7280); text-decoration: none; }
.lang-switch a.on { color: var(--magenta, #d81b7f); }
.lang-switch .sep { color: #d1d5db; }

/* Yıldız seçici (öğretmen değerlendirmesi) — sağdan sola sıralanır, hover ile dolar */
.star-pick { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.star-pick input { display: none; }
.star-pick label { font-size: 1.7rem; color: #d1d5db; cursor: pointer; transition: color .15s; }
.star-pick input:checked ~ label,
.star-pick label:hover,
.star-pick label:hover ~ label { color: #f5a623; }

/* contact form layout */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; }
.contact-info .info-item { display:flex; gap:.9rem; margin-bottom:1.3rem; }
.contact-info .info-item .ic { width:44px; height:44px; border-radius:12px; background:var(--teal-tint);
    display:grid; place-items:center; font-size:1.2rem; flex-shrink:0; }

/* --------------------------- Responsive --------------------------- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; padding: 3rem 0; }
    .hero-visual { order: -1; max-width: 360px; }
    .two-col, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-links, .nav-cta .desktop-only { display: none; } .nav.open .nav-links .mobile-only { display: block; }
    .nav-toggle { display: block; }
    .nav.open .nav-links {
        display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
        background: #fff; padding: 1rem; gap: .2rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    }
    .nav.open .nav-links a { width: 100%; }
}
@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 1.2rem; }
    .cta-band { padding: 2rem 1.4rem; }
}

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

/* erişilebilirlik: klavye odağı */
a:focus-visible, button:focus-visible, .btn:focus-visible, .form-control:focus-visible {
    outline: 3px solid var(--teal); outline-offset: 2px;
}
