/*
Theme Name: Muhtarlık Tema
Author: Sanal
Description: Muhtarlık Rehberi eklentisi için hafif, hızlı ve SEO odaklı dizin teması. İl › İlçe › Muhtarlık hiyerarşisi, breadcrumb schema, mobilde tek dokunuşla arama, reklam alanları.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: muhtarlik-tema
*/

:root {
	--bg: #f4f6f7;
	--surface: #ffffff;
	--text: #17212b;
	--muted: #5b6673;
	--line: #e1e6ea;
	--primary: #0e5a4e;
	--primary-2: #0a463c;
	--primary-soft: #e5f1ee;
	--call: #11804a;
	--radius: 10px;
	--wrap: 1080px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
a { color: var(--primary); }
a:hover { color: var(--primary-2); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.45rem, 3.6vw, 1.95rem); margin: 0 0 10px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- Üst bölüm ---------- */
.mt-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.mt-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.mt-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.12rem; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.mt-brand svg { color: var(--primary); flex: none; }
.custom-logo-link img { max-height: 44px; width: auto; display: block; }
.mt-nav { margin-left: auto; }
.mt-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.mt-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.mt-nav a:hover, .mt-nav .current-menu-item > a { background: var(--primary-soft); color: var(--primary); }
.mt-hsearch input { width: 210px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: .92rem; }
.mt-hsearch input:focus { outline: 2px solid var(--primary); outline-offset: 1px; background: #fff; }
.mt-menu-btn { display: none; margin-left: auto; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; }

@media (max-width: 760px) {
	.mt-menu-btn { display: inline-flex; }
	.mt-hsearch { display: none; }
	.mt-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; margin: 0; }
	.mt-nav.is-open { display: block; }
	.mt-nav ul { flex-direction: column; }
}

/* ---------- Genel ---------- */
.mt-main { padding: 18px 0 44px; min-height: 60vh; }
.mt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.mt-lead { color: var(--muted); margin: 0 0 18px; max-width: 760px; }
.mt-muted { color: var(--muted); }
.mt-sec-title { font-size: 1.18rem; margin: 30px 0 12px; }
.mt-page-head { margin-bottom: 6px; }

/* Breadcrumb */
.mt-bc ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .86rem; color: var(--muted); }
.mt-bc li + li::before { content: "›"; margin-right: 4px; opacity: .7; }
.mt-bc a { color: var(--muted); text-decoration: none; }
.mt-bc a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- Ana sayfa ---------- */
.mt-hero { background: linear-gradient(135deg, var(--primary) 0%, #127566 100%); color: #fff; padding: 46px 0 50px; margin: -18px 0 26px; }
.mt-hero h1 { color: #fff; font-size: clamp(1.6rem, 4.4vw, 2.4rem); margin-bottom: 8px; }
.mt-hero p { margin: 0 0 22px; opacity: .92; max-width: 640px; }
.mt-search { display: flex; max-width: 640px; background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 8px 26px rgba(0, 0, 0, .16); }
.mt-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.05rem; padding: 10px 12px; color: var(--text); }
.mt-search input:focus { outline: none; }
.mt-search button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 8px; background: var(--primary); color: #fff; font: inherit; font-weight: 600; padding: 0 18px; cursor: pointer; }
.mt-search button:hover { background: var(--primary-2); }
.mt-search--page { box-shadow: none; border: 1px solid var(--line); margin: 6px 0 22px; }
.mt-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; font-size: .92rem; opacity: .9; }
.mt-stats strong { font-size: 1.05rem; }

/* Izgara listeler */
.mt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; }
.mt-grid a { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text); text-decoration: none; font-weight: 500; }
.mt-grid a:hover { border-color: var(--primary); color: var(--primary); }
.mt-count { flex: none; font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 20px; padding: 1px 8px; }
.mt-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mt-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.mt-list li:last-child { border-bottom: 0; }
.mt-list a { text-decoration: none; font-weight: 500; }
.mt-list .mt-tel-s { color: var(--muted); font-size: .92rem; white-space: nowrap; }
.mt-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 20px; padding: 0; }
.mt-chips a { display: inline-block; background: var(--primary-soft); color: var(--primary); border-radius: 20px; padding: 6px 14px; text-decoration: none; font-weight: 600; font-size: .92rem; }

/* ---------- İlçe tablosu ---------- */
.mt-tools { margin: 0 0 10px; }
.mt-filter { width: 100%; max-width: 360px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: inherit; background: var(--surface); }
.mt-filter:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.mt-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mt-table th, .mt-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mt-table tr:last-child td { border-bottom: 0; }
.mt-table th { background: #f8fafb; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mt-table td.ad a { font-weight: 600; text-decoration: none; }
.mt-table td.tel a { font-weight: 700; color: var(--call); text-decoration: none; white-space: nowrap; }
.mt-table tbody tr:hover { background: #fafcfc; }

@media (max-width: 640px) {
	.mt-table thead { display: none; }
	.mt-table, .mt-table tbody, .mt-table tr, .mt-table td { display: block; }
	.mt-table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
	.mt-table tr:last-child { border-bottom: 0; }
	.mt-table td { border: 0; padding: 1px 0; }
	.mt-table td.muhtar { color: var(--muted); font-size: .9rem; }
	.mt-table td.is-empty { display: none; }
}

/* ---------- Tekil muhtarlık ---------- */
.mt-single { max-width: 820px; }
.mt-entry h1 { margin-bottom: 16px; }
.mt-entry .mr-kutu { border-color: var(--line); background: #fbfcfc; }
.mt-entry .mr-tel { color: var(--call); text-decoration: none; }
.mt-entry .mr-aciklama { margin-top: 6px; }
.mt-entry .mr-baslik { font-size: 1.12rem; margin-top: 28px; }
.mt-entry .mr-liste { padding-left: 18px; }
.mt-entry .mr-form { border: 1px solid var(--line); background: #f8fafb; }
.mt-entry .mr-form button { background: var(--primary); color: #fff; border: 0; border-radius: 8px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.mt-entry .mr-form input, .mt-entry .mr-form textarea { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: inherit; }

.mt-callbar { display: none; }
@media (max-width: 760px) {
	.mt-callbar { display: flex; align-items: center; justify-content: center; gap: 8px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; background: var(--call); color: #fff; border-radius: 12px; padding: 14px; font-weight: 700; font-size: 1.05rem; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
	.mt-callbar:hover { color: #fff; }
	body.has-callbar { padding-bottom: 78px; }
	.mt-card { padding: 16px; }
}

/* ---------- Sayfalar ---------- */
.mt-page { max-width: 820px; }
.mt-page .entry-content > *:first-child { margin-top: 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.nav-links .page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; }
.nav-links .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Reklam */
.mt-ad { margin: 16px auto; text-align: center; overflow: hidden; }

/* ---------- Alt bölüm ---------- */
.mt-footer { background: #0f1e27; color: #b9c4cd; padding: 30px 0 34px; font-size: .9rem; }
.mt-footer a { color: #fff; }
.mt-fnav ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.mt-fnav a { text-decoration: none; }
.mt-fnav a:hover { text-decoration: underline; }
.mt-disclaimer { max-width: 760px; margin: 0 0 10px; }
.mt-copy { margin: 0; opacity: .75; }
