/* ============================================================
   PUBLIC.CSS — TEMİZLENMİŞ / KONSOLİDE SÜRÜM
   Public anasayfa, dilekçe, başvuru, sorgu ve CMS görünümü.
============================================================ */

/* ---------- Temel değişkenler ---------- */
:root {
    --navy: #0c1b33;
    --navy-light: #1a3a5c;
    --accent: #e63946;
    --accent-hover: #c5303c;
    --teal: #2a9d8f;
    --gold: #e9c46a;

    --bg: #ffffff;
    --bg-gray: #f5f7fa;
    --bg-dark: #0c1b33;

    --text: #1a202c;
    --text-mid: #4a5568;
    --text-light: #8896ab;
    --border: #e8ecf1;

    --radius: 12px;
    --radius-lg: 18px;
    --shadow: 0 2px 12px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
    --navy: #0b1220;
    --navy-light: #18243a;
    --accent: #ff4d5d;
    --accent-hover: #fb7185;
    --teal: #2dd4bf;
    --gold: #fbbf24;

    --bg: #071225;
    --bg-gray: #0b1120;
    --bg-dark: #050816;

    --text: #e5e7eb;
    --text-mid: #cbd5e1;
    --text-light: #94a3b8;
    --border: #263244;

    --shadow: 0 2px 14px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 38px rgba(0,0,0,.45);
    color-scheme: dark;
}

/* ---------- Reset / temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body {
    margin: 0;
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img, svg, video { max-width: 100%; height: auto; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.hdr-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-mark {
    width: 42px; height: 42px; flex: 0 0 42px;
    background: var(--navy); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
}
.logo strong { display: block; font-size: 14px; color: var(--navy); line-height: 1.25; }
.logo span { font-size: 11px; color: var(--text-light); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 14px; font-weight: 600; color: var(--text-mid); transition: color .2s, background .2s; white-space: nowrap; }
.nav a:hover { color: var(--navy); }
.nav-cta {
    background: var(--accent);
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 800 !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; }
.nav-login { font-size: 13px !important; color: var(--text-light) !important; }
.hamburger { display: none; background: none; border: 0; cursor: pointer; width: 32px; height: 24px; position: relative; }
.hamburger span {
    display: block; width: 100%; height: 2px; background: var(--navy);
    border-radius: 2px; position: absolute; left: 0; transition: .25s;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { top: 22px; }
.public-theme-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid var(--border);
    background: var(--bg-gray);
    color: var(--text-mid);
    border-radius: 999px;
    padding: 8px 13px;
    font: 800 13px/1 var(--font);
    cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
    background: var(--navy);
    color: #fff;
    padding: 88px 0 108px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(230,57,70,.15) 0%, transparent 70%);
}
.hero::after {
    content: '';
    position: absolute; bottom: -40%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(42,157,143,.1) 0%, transparent 70%);
}
.hero-content { position: relative; z-index: 1; max-width: 640px; }
.hero-badge {
    display: inline-block; margin-bottom: 24px;
    font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
    padding: 6px 16px; border-radius: 50px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.82);
}
.hero h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 900; line-height: 1.15; margin: 0 0 20px; letter-spacing: -.5px; }
.hero p { font-size: 17px; color: rgba(255,255,255,.75); line-height: 1.7; margin: 0 0 36px; }
.hero-btns, .cms-hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-wave { position: absolute; bottom: -2px; left: 0; right: 0; height: 54px; background: var(--bg); clip-path: ellipse(55% 100% at 50% 100%); }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 28px;
    border-radius: 10px;
    font: 800 15px/1.2 var(--font);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all .2s;
}
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(230,57,70,.28); }
.btn-ghost { background: transparent; color: rgba(255,255,255,.92); border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); }
.btn-full { width: 100%; }
.btn-public-ghost-dark { color: var(--navy); border-color: var(--border); background: transparent; }
.btn-public-more-button { min-width: 210px; text-align: center; font-weight: 900; }

/* Koyu bölümdeki alt butonlar */
.section-dark .btn-ghost,
.section-dark .btn-public-ghost-dark,
.public-section-tone-koyu .btn-ghost,
.public-section-tone-koyu .btn-public-ghost-dark,
.public-section-tone-lacivert .btn-ghost,
.public-section-tone-lacivert .btn-public-ghost-dark,
.public-section-tone-gradient .btn-ghost,
.public-section-tone-gradient .btn-public-ghost-dark {
    color: #fff !important;
    border-color: rgba(255,255,255,.78) !important;
    background: transparent !important;
}
.section-dark .btn-ghost:hover,
.section-dark .btn-public-ghost-dark:hover,
.public-section-tone-koyu .btn-ghost:hover,
.public-section-tone-koyu .btn-public-ghost-dark:hover,
.public-section-tone-lacivert .btn-ghost:hover,
.public-section-tone-lacivert .btn-public-ghost-dark:hover,
.public-section-tone-gradient .btn-ghost:hover,
.public-section-tone-gradient .btn-public-ghost-dark:hover {
    color: #0c1b33 !important;
    background: #fff !important;
    border-color: #fff !important;
}

/* ---------- Bölümler ---------- */
.section, .cms-section { padding: 56px 0; }
.section + .section { margin-top: 0; }
.hero + .section { padding-top: 64px; }
.section-gray { background: var(--bg-gray); }
.section-dark { background: var(--navy); color: #fff; }
.section-title { margin-bottom: 36px; }
.section-title span, .cms-kicker {
    display: block; margin-bottom: 8px;
    font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; color: var(--accent);
}
.section-dark .section-title span { color: var(--gold); }
.section-title h1, .section-title h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 34px);
    font-weight: 900;
    color: var(--navy);
    letter-spacing: -.3px;
}
.section-dark .section-title h2 { color: #fff; }
.section-title p { color: var(--text-mid); max-width: 720px; }
.section-title-with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-all-link { color: var(--accent); font-size: 14px; font-weight: 900; white-space: nowrap; }
.section-bottom-link { text-align: center; margin-top: 26px; }

/* ---------- Kartlar / Hizmetler ---------- */
.services,
.card-grid,
.cms-card-grid {
    display: grid;
    gap: 20px;
}
.services { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.svc,
.card,
.cms-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    color: inherit;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.svc:hover, .card:hover, .cms-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.svc-icon, .cms-card-icon { font-size: 32px; line-height: 1; margin-bottom: 16px; }
.svc h3, .card h3, .cms-card h3 { font-size: 17px; font-weight: 900; color: var(--navy); margin: 0 0 10px; line-height: 1.4; word-break: break-word; }
.svc p, .card p, .cms-card p { font-size: 14px; color: var(--text-mid); line-height: 1.65; margin: 0; }
.card { position: relative; }
.card-badge {
    display: inline-flex; align-items: center; gap: 4px;
    border-radius: 999px; padding: 5px 10px;
    font-size: 12px; font-weight: 900; margin-bottom: 12px;
    text-transform: uppercase; letter-spacing: .7px;
}
.badge-haber { background: #e8f4fd; color: #0369a1; }
.badge-duyuru { background: #fef3c7; color: #92400e; }
.badge-emsal_karar { background: #d1fae5; color: #065f46; }
.badge-kazanim { background: #ede9fe; color: #5b21b6; }
.badge-bilgilendirme { background: #f0f2f5; color: #4a5568; }
.badge-mevzuat { background: #fce7f3; color: #9d174d; }
.card p {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
    display: flex; align-items: center; gap: 16px; margin-top: 16px; padding-top: 14px;
    border-top: 1px solid var(--border); font-size: 12px; color: var(--text-light);
}
.card-arrow { position: absolute; bottom: 28px; right: 28px; font-size: 18px; color: var(--text-light); transition: .2s; }
.card:hover .card-arrow { color: var(--accent); transform: translateX(3px); }

/* ---------- Akıllı grid ---------- */
.smart-grid { display: grid; gap: 20px; }
.smart-grid-count-1 { grid-template-columns: 1fr; }
.smart-grid-count-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.smart-grid-count-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.smart-grid-count-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.smart-grid-count-5 { grid-template-columns: repeat(6,minmax(0,1fr)); }
.smart-grid-count-5 > .smart-grid-item { grid-column: span 2; }
.smart-grid-count-5 > .smart-grid-item:nth-last-child(-n+2) { grid-column: span 3; }
.smart-grid-count-6 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.smart-grid-count-7 { grid-template-columns: repeat(12,minmax(0,1fr)); }
.smart-grid-count-7 > .smart-grid-item { grid-column: span 3; }
.smart-grid-count-7 > .smart-grid-item:nth-last-child(-n+3) { grid-column: span 4; }
.smart-grid-count-8 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.smart-grid-count-9 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.smart-grid-count-10,
.smart-grid-count-11,
.smart-grid-count-12 { grid-template-columns: repeat(4,minmax(0,1fr)); }

/* ---------- Slider ---------- */
.public-card-slider {
    display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 4px 2px 18px; -webkit-overflow-scrolling: touch;
}
.public-card-slider .public-slider-card { flex: 0 0 min(360px, 86vw); scroll-snap-align: start; }
.public-card-slider::-webkit-scrollbar { height: 8px; }
.public-card-slider::-webkit-scrollbar-thumb { background: rgba(136,150,171,.45); border-radius: 999px; }
.public-card-slider::-webkit-scrollbar-track { background: rgba(136,150,171,.12); border-radius: 999px; }

/* ---------- Kart / bölüm tonları ---------- */
.public-section-tone-standart { background: var(--bg); }
.public-section-tone-gri { background: var(--bg-gray); }
.public-section-tone-koyu,
.public-section-tone-lacivert { background: var(--navy); color: #fff; }
.public-section-tone-gradient { background: linear-gradient(135deg, var(--navy), #19345f); color: #fff; }
.public-section-tone-vurgulu { background: linear-gradient(135deg, rgba(230,57,70,.08), rgba(42,157,143,.08)); }
.public-section-tone-koyu .section-title h2,
.public-section-tone-lacivert .section-title h2,
.public-section-tone-gradient .section-title h2 { color: #fff; }

.public-card-theme-acik .svc,
.public-card-theme-acik .card { background: linear-gradient(180deg,#fff,#f8fafc); }
.public-card-theme-haber .svc,
.public-card-theme-haber .card { background: linear-gradient(180deg,rgba(230,57,70,.055),var(--bg)); border-color: rgba(230,57,70,.15); }
.public-card-theme-lacivert .svc,
.public-card-theme-lacivert .card { background: #10233e; color: #fff; border-color: rgba(255,255,255,.12); }
.public-card-theme-koyu .svc,
.public-card-theme-koyu .card { background: #0a1220; color: #fff; border-color: #243246; }
.public-card-theme-vurgulu .svc,
.public-card-theme-vurgulu .card { background: linear-gradient(135deg,rgba(230,57,70,.08),rgba(233,196,106,.08)); border-color: rgba(230,57,70,.18); }
.public-card-theme-yesil .svc,
.public-card-theme-yesil .card { background: linear-gradient(180deg,rgba(42,157,143,.09),var(--bg)); border-color: rgba(42,157,143,.18); }
.public-card-theme-mor .svc,
.public-card-theme-mor .card { background: linear-gradient(180deg,rgba(139,92,246,.09),var(--bg)); border-color: rgba(139,92,246,.2); }
.public-card-theme-lacivert .svc h3,
.public-card-theme-lacivert .card h3,
.public-card-theme-koyu .svc h3,
.public-card-theme-koyu .card h3 { color: #fff; }
.public-card-theme-lacivert .svc p,
.public-card-theme-lacivert .card p,
.public-card-theme-koyu .svc p,
.public-card-theme-koyu .card p { color: rgba(255,255,255,.75); }

/* ---------- CMS split / özel ---------- */
.cms-hero-inner,
.cms-split,
.form-wrap {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(280px,420px);
    gap: 48px;
    align-items: start;
}
.cms-split { grid-template-columns: minmax(0,1.1fr) minmax(260px,.9fr); }
.cms-layout-sag_gorsel { grid-template-columns: minmax(260px,.9fr) minmax(0,1.1fr); }
.cms-hero-image img,
.cms-media img,
.cms-card-img {
    display: block; width: 100%; height: auto;
    border-radius: var(--radius-lg);
}
.cms-hero-image img, .cms-media img { box-shadow: var(--shadow-lg); }
.cms-hero-standart .cms-hero-image { display: none; }
.cms-rich { font-size: 15px; color: var(--text-mid); }
.cms-rich p { margin: 0 0 1rem; }
.cms-rich ul, .cms-rich ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.cms-stat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 18px; }
.cms-stat { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; text-align: center; box-shadow: var(--shadow); }
.cms-stat strong { display: block; font-size: 36px; color: var(--navy); line-height: 1; margin-bottom: 8px; }
.cms-stat span { color: var(--text-mid); font-size: 14px; }
.cms-center { text-align: center; margin-top: 28px; }
.cms-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cms-cta h2 { font-size: 30px; font-weight: 900; margin: 0 0 8px; }

/* ---------- Public form / CTA ---------- */
.form-wrap { grid-template-columns: 1fr 1.2fr; }
.form-info h2 { font-size: 28px; font-weight: 900; margin: 0 0 14px; }
.form-info p { font-size: 15px; color: rgba(255,255,255,.72); line-height: 1.7; margin: 0 0 32px; }
.form-features { display: flex; flex-direction: column; gap: 20px; }
.ff { display: flex; gap: 14px; align-items: flex-start; }
.ff-icon { font-size: 24px; flex-shrink: 0; }
.ff strong { display: block; font-size: 14px; margin-bottom: 2px; color: inherit; }
.ff p { font-size: 13px; color: rgba(255,255,255,.55); margin: 0; }

.form-card,
.public-form-card,
.sorgu-card,
.basvuru-sorgu-card,
.dilekce-form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: #0f172a;
}
.form-card h3,
.public-form-card h3 {
    font-size: 20px; font-weight: 900; margin: 0 0 14px; color: #0f172a;
}
.form-card > p { font-size: 14px; color: #4a5568; margin: 0 0 24px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fg { margin-bottom: 16px; min-width: 0; }
.fg label,
.form-card label,
.public-form-card label,
.sorgu-card label,
.basvuru-sorgu-card label,
.dilekce-form-card label,
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.fg input,
.fg select,
.fg textarea,
.form-card input,
.form-card select,
.form-card textarea,
.public-form-card input,
.public-form-card select,
.public-form-card textarea,
.sorgu-card input,
.sorgu-card select,
.sorgu-card textarea,
.basvuru-sorgu-card input,
.basvuru-sorgu-card select,
.basvuru-sorgu-card textarea,
.dilekce-form-card input,
.dilekce-form-card select,
.dilekce-form-card textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--font);
    background: #f8fafc;
    color: #0f172a;
    caret-color: #0f172a;
    transition: border .2s, box-shadow .2s, background .2s;
}
.fg input:focus,
.fg select:focus,
.fg textarea:focus,
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.public-form-card input:focus,
.public-form-card select:focus,
.public-form-card textarea:focus,
.sorgu-card input:focus,
.sorgu-card select:focus,
.sorgu-card textarea:focus,
.basvuru-sorgu-card input:focus,
.basvuru-sorgu-card select:focus,
.basvuru-sorgu-card textarea:focus,
.dilekce-form-card input:focus,
.dilekce-form-card select:focus,
.dilekce-form-card textarea:focus {
    background: #fff;
    color: #0f172a;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59,130,246,.18);
    outline: none;
}
.fg small,
.form-card small,
.public-form-card small,
.sorgu-card small,
.basvuru-sorgu-card small,
.dilekce-form-card small,
.form-text {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}
input::placeholder, textarea::placeholder { color: #64748b; opacity: 1; }
select option { background: #fff; color: #111827; }
input[type="date"] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 42px;
}
.form-card-secondary-link { margin-top: 16px; text-align: center; }
.form-card-secondary-link a { font-size: 13px; color: #64748b; }

/* Dilekçe önizleme kağıdı beyaz ve okunur kalsın */
.public-doc-preview,
.public-dilekce-preview,
.dilekce-preview,
.dilekce-onizleme,
.dilekce-paper,
.paper-preview,
.preview-paper,
.dilekce-kagit,
.onizleme-kagit,
#dilekceOnizleme,
#onizleme {
    background: #fff !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
}
.public-doc-preview *,
.public-dilekce-preview *,
.dilekce-preview *,
.dilekce-onizleme *,
.dilekce-paper *,
.paper-preview *,
.preview-paper *,
.dilekce-kagit *,
.onizleme-kagit *,
#dilekceOnizleme *,
#onizleme * {
    color: #111827 !important;
    opacity: 1 !important;
}
.public-doc-preview code,
.public-dilekce-preview code,
.dilekce-preview code,
.dilekce-onizleme code,
.dilekce-paper code,
.paper-preview code,
.preview-paper code,
.dilekce-kagit code,
.onizleme-kagit code,
#dilekceOnizleme code,
#onizleme code,
.degisken-bos {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px dashed #94a3b8 !important;
    border-radius: 4px;
    padding: 1px 4px;
}

/* ---------- Dilekçe şablonları / filtreler ---------- */
.category-tabs,
.dilekce-kategoriler,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
}
.category-tabs a,
.category-tabs button,
.dilekce-kategori,
.pill,
.filter-pill,
.filter-chips a,
.filter-chips button {
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-gray);
    color: var(--text-mid);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 800;
    max-width: 100%;
    white-space: normal;
}
.category-tabs .active,
.pill.active,
.filter-pill.active {
    background: var(--navy);
    color: #fff;
}
.search-form,
.filter-form,
.dilekce-filtre,
.dilekce-filter,
.dilekce-search {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: stretch;
    max-width: 100%;
}
.search-form input,
.filter-form input,
.dilekce-filtre input,
.dilekce-filter input,
.dilekce-search input {
    flex: 1 1 240px;
    min-width: 0;
}
.search-form select,
.filter-form select,
.dilekce-filtre select,
.dilekce-filter select,
.dilekce-search select {
    flex: 0 1 220px;
    min-width: 0;
}

/* ---------- Kategori sayfası ---------- */
.category-hero { padding: 46px 0; background: var(--navy); color: #fff; }
.category-hero h1 { font-size: 34px; font-weight: 900; margin: 8px 0 6px; }
.category-hero p { color: rgba(255,255,255,.72); max-width: 720px; }
.category-list-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.category-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.category-pagination a,
.category-pagination span { padding: 8px 13px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }
.category-pagination .active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Footer / WhatsApp ---------- */
.footer { background: var(--navy); color: #fff; padding: 56px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-logo { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.footer-sub, .footer-links a { font-size: 13px; color: rgba(255,255,255,.55); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,.32); margin-top: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links strong { font-size: 13px; font-weight: 800; margin-bottom: 4px; color: rgba(255,255,255,.75); }
.footer-links a:hover { color: #fff; }

.whatsapp-fab {
    position: fixed; right: 24px; bottom: 24px; z-index: 999;
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #25D366; color: #fff; font-size: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
}

/* ---------- Dark mode ---------- */
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] .header { background: rgba(7,18,37,.96); border-bottom-color: var(--border); }
html[data-theme="dark"] .logo strong,
html[data-theme="dark"] .section-title h1,
html[data-theme="dark"] .section-title h2,
html[data-theme="dark"] .svc h3,
html[data-theme="dark"] .card h3,
html[data-theme="dark"] .cms-card h3,
html[data-theme="dark"] .cms-stat strong,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4 { color: #f8fafc; }
html[data-theme="dark"] .logo span,
html[data-theme="dark"] .nav a,
html[data-theme="dark"] .nav-login,
html[data-theme="dark"] .svc p,
html[data-theme="dark"] .card p,
html[data-theme="dark"] .card-meta,
html[data-theme="dark"] .cms-rich,
html[data-theme="dark"] .cms-card p,
html[data-theme="dark"] .cms-stat span,
html[data-theme="dark"] p,
html[data-theme="dark"] small { color: var(--text-mid); }
html[data-theme="dark"] .hamburger span { background: var(--text); }
html[data-theme="dark"] .logo-mark { background: #1d4ed8; box-shadow: 0 6px 16px rgba(29,78,216,.28); }
html[data-theme="dark"] .public-theme-toggle { background: #121c2d; border-color: var(--border); color: var(--text); }
html[data-theme="dark"] .hero { background: radial-gradient(circle at 80% 10%, rgba(59,130,246,.17), transparent 34%), #071225; }
html[data-theme="dark"] .hero-wave { background: var(--bg); }
html[data-theme="dark"] .section,
html[data-theme="dark"] .cms-bg-beyaz,
html[data-theme="dark"] .public-section-tone-standart { background: var(--bg); }
html[data-theme="dark"] .section-gray,
html[data-theme="dark"] .cms-bg-gri,
html[data-theme="dark"] .public-section-tone-gri { background: var(--bg-gray); }
html[data-theme="dark"] .section-dark,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .cms-bg-koyu,
html[data-theme="dark"] .public-section-tone-koyu,
html[data-theme="dark"] .public-section-tone-lacivert,
html[data-theme="dark"] .category-hero { background: #071225; color: #f8fafc; }
html[data-theme="dark"] .cms-bg-gradient,
html[data-theme="dark"] .public-section-tone-gradient { background: radial-gradient(circle at 80% 10%, rgba(59,130,246,.18), transparent 34%), linear-gradient(135deg,#071225,#11233e 60%,#0f766e); }
html[data-theme="dark"] .svc,
html[data-theme="dark"] .card,
html[data-theme="dark"] .cms-card,
html[data-theme="dark"] .cms-stat {
    background: #111827;
    border-color: var(--border);
    color: var(--text);
    box-shadow: var(--shadow);
}
html[data-theme="dark"] .card-meta { border-top-color: var(--border); }
html[data-theme="dark"] .btn-ghost { color: #e2e8f0; border-color: rgba(255,255,255,.3); }
html[data-theme="dark"] .btn-public-ghost-dark { color: #e2e8f0; border-color: #334155; }
html[data-theme="dark"] .form-info h2,
html[data-theme="dark"] .form-info strong { color: #f8fafc; }
html[data-theme="dark"] .form-info p,
html[data-theme="dark"] .ff p { color: #cbd5e1; }
html[data-theme="dark"] .form-card-secondary-link a { color: #2563eb; }

/* Beyaz form kartları dark modda da beyaz kalsın */
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .public-form-card,
html[data-theme="dark"] .sorgu-card,
html[data-theme="dark"] .basvuru-sorgu-card,
html[data-theme="dark"] .dilekce-form-card {
    background: #fff;
    color: #0f172a;
    border-color: #e2e8f0;
}
html[data-theme="dark"] .form-card h3,
html[data-theme="dark"] .public-form-card h3,
html[data-theme="dark"] .form-card label,
html[data-theme="dark"] .public-form-card label,
html[data-theme="dark"] .sorgu-card label,
html[data-theme="dark"] .basvuru-sorgu-card label,
html[data-theme="dark"] .dilekce-form-card label,
html[data-theme="dark"] .form-label {
    color: #0f172a;
}
html[data-theme="dark"] .form-card small,
html[data-theme="dark"] .public-form-card small,
html[data-theme="dark"] .sorgu-card small,
html[data-theme="dark"] .basvuru-sorgu-card small,
html[data-theme="dark"] .dilekce-form-card small,
html[data-theme="dark"] .form-text {
    color: #64748b;
}
html[data-theme="dark"] .form-card input,
html[data-theme="dark"] .form-card select,
html[data-theme="dark"] .form-card textarea,
html[data-theme="dark"] .public-form-card input,
html[data-theme="dark"] .public-form-card select,
html[data-theme="dark"] .public-form-card textarea,
html[data-theme="dark"] .sorgu-card input,
html[data-theme="dark"] .sorgu-card select,
html[data-theme="dark"] .sorgu-card textarea,
html[data-theme="dark"] .basvuru-sorgu-card input,
html[data-theme="dark"] .basvuru-sorgu-card select,
html[data-theme="dark"] .basvuru-sorgu-card textarea,
html[data-theme="dark"] .dilekce-form-card input,
html[data-theme="dark"] .dilekce-form-card select,
html[data-theme="dark"] .dilekce-form-card textarea {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
    caret-color: #0f172a;
}
html[data-theme="dark"] .form-card input:focus,
html[data-theme="dark"] .form-card select:focus,
html[data-theme="dark"] .form-card textarea:focus,
html[data-theme="dark"] .public-form-card input:focus,
html[data-theme="dark"] .public-form-card select:focus,
html[data-theme="dark"] .public-form-card textarea:focus,
html[data-theme="dark"] .sorgu-card input:focus,
html[data-theme="dark"] .sorgu-card select:focus,
html[data-theme="dark"] .sorgu-card textarea:focus,
html[data-theme="dark"] .basvuru-sorgu-card input:focus,
html[data-theme="dark"] .basvuru-sorgu-card select:focus,
html[data-theme="dark"] .basvuru-sorgu-card textarea:focus,
html[data-theme="dark"] .dilekce-form-card input:focus,
html[data-theme="dark"] .dilekce-form-card select:focus,
html[data-theme="dark"] .dilekce-form-card textarea:focus {
    background: #fff;
    color: #0f172a;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59,130,246,.18);
}
html[data-theme="dark"] select option { background: #fff; color: #111827; }
html[data-theme="dark"] .captcha,
html[data-theme="dark"] .captcha-box,
html[data-theme="dark"] .guvenlik-kodu {
    background: #0f172a;
    color: #fff;
    border-color: #1e293b;
}
html[data-theme="dark"] .card-badge,
html[data-theme="dark"] .badge-bilgilendirme { background: #1f2937; color: #dbeafe; }
html[data-theme="dark"] .badge-haber { background: rgba(14,165,233,.16); color: #7dd3fc; }
html[data-theme="dark"] .badge-duyuru { background: rgba(251,191,36,.16); color: #fde68a; }
html[data-theme="dark"] .badge-emsal_karar { background: rgba(16,185,129,.16); color: #86efac; }
html[data-theme="dark"] .badge-kazanim { background: rgba(139,92,246,.18); color: #c4b5fd; }
html[data-theme="dark"] .badge-mevzuat { background: rgba(236,72,153,.16); color: #f9a8d4; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .smart-grid-count-5,
    .smart-grid-count-7,
    .smart-grid-count-8,
    .smart-grid-count-10,
    .smart-grid-count-11,
    .smart-grid-count-12 { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .smart-grid-count-5 > .smart-grid-item,
    .smart-grid-count-5 > .smart-grid-item:nth-last-child(-n+2),
    .smart-grid-count-7 > .smart-grid-item,
    .smart-grid-count-7 > .smart-grid-item:nth-last-child(-n+3) { grid-column: auto; }
    .category-list-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .container { padding-left: 18px; padding-right: 18px; }
    .hamburger { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--border);
        gap: 16px;
        box-shadow: var(--shadow-lg);
    }
    .nav.open { display: flex; }
    .public-theme-toggle { width: 100%; }
    .hero { padding: 56px 0 76px; }
    .section, .cms-section { padding: 38px 0; }
    .hero + .section { padding-top: 42px; }
    .section-title { margin-bottom: 24px; }
    .section-title-with-action { flex-direction: column; align-items: flex-start; }
    .services,
    .card-grid,
    .cms-card-grid,
    .smart-grid,
    .smart-grid-count-2,
    .smart-grid-count-3,
    .smart-grid-count-4,
    .smart-grid-count-5,
    .smart-grid-count-6,
    .smart-grid-count-7,
    .smart-grid-count-8,
    .smart-grid-count-9,
    .smart-grid-count-10,
    .smart-grid-count-11,
    .smart-grid-count-12 {
        grid-template-columns: 1fr;
    }
    .cms-hero-inner,
    .cms-split,
    .cms-layout-sag_gorsel,
    .form-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .cms-hero-image { display: none; }
    .frow { grid-template-columns: 1fr; }
    .form-card,
    .public-form-card,
    .sorgu-card,
    .basvuru-sorgu-card,
    .dilekce-form-card {
        padding: 22px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    .search-form,
    .filter-form,
    .dilekce-filtre,
    .dilekce-filter,
    .dilekce-search {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }
    .search-form input,
    .search-form select,
    .search-form button,
    .filter-form input,
    .filter-form select,
    .filter-form button,
    .dilekce-filtre input,
    .dilekce-filtre select,
    .dilekce-filtre button,
    .dilekce-filter input,
    .dilekce-filter select,
    .dilekce-filter button,
    .dilekce-search input,
    .dilekce-search select,
    .dilekce-search button {
        width: 100%;
        min-width: 0;
    }
    .category-tabs,
    .dilekce-kategoriler,
    .filter-chips { justify-content: center; }
    .card, .svc, .cms-card { width: 100%; max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .btn-public-more-button { width: 100%; max-width: 320px; }
    html[data-theme="dark"] .nav {
        background: #071225;
        border-bottom-color: var(--border);
    }
}

@media (max-width: 576px) {
    input[type="date"] {
        height: 48px;
        line-height: 48px;
        font-size: .92rem;
    }
}


/* ============================================================
   v13 PUBLIC NET DÜZELTMELER
   - Panel/public tema çakışması PHP tarafında ayrıldı.
   - Başvuru formu label renkleri koyu temada okunur.
   - CAPTCHA soru kutusu artık koyu temada kararmıyor.
   - Dilekçe şablonları mobil filtre satırı taşmıyor.
============================================================ */

/* Genel .fg label'lar sayfa zeminine göre renk alsın.
   Beyaz kartların içindeki label'lar aşağıdaki özel kuralla siyah kalır. */
.fg label {
    color: var(--text) !important;
}

.form-card .fg label,
.public-form-card .fg label,
.sorgu-card .fg label,
.basvuru-sorgu-card .fg label,
.dilekce-form-card .fg label,
.public-light-card .fg label {
    color: #0f172a !important;
}

/* Başvuru formu koyu zemin üstünde olduğu için label ve panel başlıkları açık olmalı. */
html[data-theme="dark"] .public-basvuru-form .fg label,
html[data-theme="dark"] .public-basvuru-form .form-label {
    color: #e5e7eb !important;
}

html[data-theme="dark"] .public-basvuru-panel h3 {
    color: #f8fafc !important;
}

html[data-theme="dark"] .public-basvuru-panel {
    background: #0f1b2d !important;
    border: 1px solid #263244 !important;
}

html[data-theme="dark"] .public-basvuru-form .fg small,
html[data-theme="dark"] .public-basvuru-form .form-text {
    color: #94a3b8 !important;
}

/* CAPTCHA soru kutusu: koyu temada bile açık kalsın, okunurluğu bozmasın. */
.public-captcha-question {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a !important;
    background: #f8fafc !important;
    border: 2px solid #cbd5e1 !important;
    padding: 10px 18px;
    border-radius: var(--radius);
    letter-spacing: 2px;
    white-space: nowrap;
    box-sizing: border-box;
}

html[data-theme="dark"] .public-captcha-question {
    color: #0f172a !important;
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

/* CAPTCHA cevap inputu küçük kalabilir ama mobilde taşmasın. */
.fg input[name="captcha"] {
    max-width: 140px;
}

@media (max-width: 576px) {
    .fg input[name="captcha"] {
        max-width: 100% !important;
        flex: 1 1 120px;
    }

    .public-captcha-question {
        min-width: 120px;
        flex: 0 0 auto;
    }
}

/* Başvuru sorgula beyaz kart yapısı */
.sorgu-card.public-light-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    color: #0f172a !important;
}

.sorgu-card.public-light-card label,
.sorgu-card.public-light-card .form-label,
.sorgu-card.public-light-card small,
.sorgu-card.public-light-card .form-text {
    color: #0f172a !important;
}

.sorgu-card.public-light-card input,
.sorgu-card.public-light-card select,
.sorgu-card.public-light-card textarea {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.sorgu-card.public-light-card input:focus,
.sorgu-card.public-light-card select:focus,
.sorgu-card.public-light-card textarea:focus {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #3b82f6 !important;
}

/* Dilekçe şablonları filtre satırı */
.public-filter-form,
.public-filter-row {
    max-width: 100%;
    box-sizing: border-box;
}

.public-filter-input,
.public-filter-select,
.public-filter-button {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .dilekce-list-page .container {
        width: 100%;
        max-width: 100%;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .public-filter-form {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .public-filter-row {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .public-filter-input {
        grid-column: 1 / -1;
        width: 100% !important;
        min-width: 0 !important;
    }

    .public-filter-select {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .public-filter-button {
        min-width: 64px;
        white-space: nowrap;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .public-category-chips {
        max-width: 100%;
        overflow: visible;
    }

    .public-category-chips a {
        max-width: 100%;
        white-space: normal !important;
    }
}

html[data-theme="dark"] .public-filter-select,
html[data-theme="dark"] .public-filter-input {
    background: #0f172a !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .public-filter-select option {
    background: #0f172a !important;
    color: #e5e7eb !important;
}

/* Inline stil kullanan public form başlıkları için güvenli override */
html[data-theme="dark"] .public-basvuru-page h3[style*="color:var(--navy)"],
html[data-theme="dark"] .public-basvuru-page strong[style*="color:var(--navy)"] {
    color: #f8fafc !important;
}

