/*
 * ÇandName CSS modülü: Üst alan
 * Duyuru, üst şerit, site başlığı ve ana menü.
 * Bu dosya diğer CSS dosyalarından bağımsızdır; hata yalnızca bu alanı etkiler.
 * Yükleme sırası: inc/assets.php
 */

/* ------------------------------------------------------------------
   3. Top: notice, utility bar, header
------------------------------------------------------------------ */
.notice { background: var(--mint); color: var(--green); text-align: center; padding: 12px 24px; font-size: calc(14px * var(--fs, 1)); }

.utility { background: var(--surface); border-bottom: 1px solid var(--line); color: var(--body); font-size: calc(13px * var(--fs, 1)); padding-inline: var(--gutter); }
.utility-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 40px; }
.utility .menu { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.lang-switch, .social-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.lang-switch .is-current { font-weight: 600; color: var(--green); }
.social-links { gap: 8px 18px; }
.utility-tools { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; }
/* Header icon buttons (random, bookmarks, dark mode): round, at least as tall as the search box (--tool-size), same gap. */
.site-header { --tool-size: 46px; --tool-gap: 10px; }
.random-btn, .bm-toggle, .theme-toggle, .push-toggle {
	position: relative; box-sizing: border-box; flex: none; width: var(--tool-size, 32px); height: var(--tool-size, 32px); min-width: var(--tool-size, 32px); min-height: var(--tool-size, 32px);
	padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--body); cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.random-btn:hover, .random-btn:focus-visible, .bm-toggle:hover, .bm-toggle:focus-visible, .push-toggle:hover, .push-toggle:focus-visible, .push-toggle.is-on { color: var(--green); border-color: var(--green); }
.random-btn svg { width: 18px; height: 18px; stroke-width: 2; }
.random-btn i, .bm-toggle i, .theme-toggle i, .push-toggle i { font-size: calc(18px * var(--fs, 1)) !important; line-height: 1; }
.bm-count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--green); color: #fff; font-size: calc(11px * var(--fs, 1)); font-weight: 700; line-height: 18px; text-align: center; box-sizing: border-box; }
.bm-count[hidden] { display: none; }

.site-header { background: var(--surface); padding: 24px var(--gutter); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.brand { display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: calc(42px * var(--fs, 1)); line-height: 1; letter-spacing: -0.02em; }
.wordmark span { color: var(--green); }
.tagline { font-size: calc(12px * var(--fs, 1)); color: var(--muted); }
.custom-logo-link { display: block; }
.custom-logo { max-height: 64px; width: auto; }

form.search {
	display: flex; align-items: center; flex: 1 1 320px; max-width: 640px; height: var(--tool-size, 46px);
	border: 1px solid var(--line); border-radius: 24px; background: var(--surface); overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); transition: box-shadow .15s, border-color .15s;
}
form.search:hover { box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2); }
form.search:focus-within { outline: 0; border-color: var(--green); box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2); }
form.search input[type="search"] { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0 8px 0 20px; font: inherit; font-size: calc(16px * var(--fs, 1)); background: transparent; -webkit-appearance: none; appearance: none; }
form.search input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
form.search button { width: 52px; height: 100%; border: 0; background: transparent; color: var(--green); cursor: pointer; display: flex; align-items: center; justify-content: center; }
form.search button:hover { color: var(--ink); }
.header-search-group { display: flex; align-items: center; gap: var(--tool-gap, 10px); flex: 1 1 320px; max-width: 700px; }
.header-search-group form.search { flex: 1 1 auto; }
.header-tools { display: inline-flex; align-items: center; gap: var(--tool-gap, 10px); flex: none; }
/* Phones/tablets: the search box is hidden, the two buttons stay beside the logo on one line. */
@media (max-width: 959px) {
	/* The bookmark icon moves to the bottom bar (template-parts/mobile-nav.php) when that bar is on. */
	body.has-mobile-nav .bm-toggle { display: none; }
	.site-header { --tool-size: 42px; --tool-gap: 8px; padding-block: 10px; }
	.header-inner { flex-wrap: nowrap; gap: 12px; }
	/* Compact header: smaller logo (picture or text), no tagline, less padding. */
	.custom-logo { max-height: 38px; }
	.wordmark { font-size: calc(30px * var(--fs, 1)); }
	.tagline { display: none; }
	.brand { min-width: 0; }
	.header-search-group { flex: none; max-width: none; margin-inline-start: auto; }
}
/* Phones/tablets: the bottom bar's "Ara" button opens the search page, so the header box is not needed. */
@media (max-width: 959px) {
	.site-header .search { display: none; }
}

/* ------------------------------------------------------------------
   4. Primary navigation
------------------------------------------------------------------ */
.nav-bar { background: var(--green); color: #fff; padding-inline: var(--gutter); position: relative; }
.nav-bar a { color: #fff; }
.nav-bar a:hover { color: var(--gold); }
.nav-row {
	display: flex; flex-wrap: nowrap; align-items: center; gap: 22px; min-height: 50px;
	font-size: calc(14px * var(--fs, 1)); overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.nav-row::-webkit-scrollbar { display: none; }
.nav-bar .btn { color: var(--ink); }
.nav-home { padding-inline: 14px; }
.nav-home .menu-icon { margin: 0; width: auto; font-size: calc(17px * var(--fs, 1)); }
.nav-bar .btn:hover { color: var(--ink); }
.nav-menu { display: flex; align-items: center; gap: 22px; }
.nav-menu > li > a { display: block; padding: 14px 0; }
.nav-menu .menu-item-has-children > a::after { content: " \25BE"; font-size: calc(11px * var(--fs, 1)); }
.nav-menu .current-menu-item > a, .nav-menu .current-cat > a { color: var(--gold); }
.nav-cta { margin-left: auto; }

.sections-panel {
	position: absolute; left: var(--gutter); top: 100%; z-index: 40;
	width: min(360px, calc(100% - 48px)); max-height: 70vh; overflow-y: auto;
	background: var(--surface); color: var(--ink); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	border-radius: 0 0 4px 4px; padding: 12px 0;
}
.sections-panel[hidden] { display: none; }
.sections-panel ul { list-style: none; margin: 0; padding: 0; }
.sections-panel a { display: block; padding: 10px 24px; color: var(--ink); }
.sections-panel a:hover { color: var(--green); background: var(--mint); }
.sections-panel .children a, .sections-panel .sub-menu a { padding-left: 44px; font-size: calc(13px * var(--fs, 1)); color: var(--body); }
.sections-panel .sub-menu .sub-menu a { padding-left: 64px; }
.sections-panel .current-menu-item > a, .sections-panel .current-cat > a { color: var(--green); }
.sections-panel .menu-icon { color: var(--green); }

@media (min-width: 960px) {
	/* One line only: items that do not fit are hidden from the end by theme.js (initNavFit). */
	.nav-row { overflow: visible; flex-wrap: nowrap; white-space: nowrap; }
	.nav-home, .nav-cta { flex: none; }
	.nav-menu { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; }
	.nav-menu > li { flex: none; }
	.nav-menu > li.is-fit-hidden { display: none; }
	.nav-menu .menu-item-has-children { position: relative; }
	.nav-menu .sub-menu {
		display: none; position: absolute; top: 100%; left: -14px; min-width: 220px; z-index: 30;
		background: var(--surface); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); padding: 8px 0; border-radius: 0 0 4px 4px;
	}
	.nav-menu li:hover > .sub-menu, .nav-menu li:focus-within > .sub-menu { display: block; }
	.nav-menu .sub-menu a { color: var(--ink); padding: 10px 18px; white-space: nowrap; }
	.nav-menu .sub-menu a:hover { color: var(--green); background: var(--mint); }
}
@media (max-width: 959px) {
	.nav-menu .sub-menu { display: none; }
	.nav-menu .menu-item-has-children > a::after { content: none; }
}

/* Install-as-app button (hidden until the browser allows it) and the iPhone hint */
.pwa-install { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.pwa-install[hidden] { display: none; }
.pwa-install:hover { color: var(--green); }
/* Notification bell (header icon): outline bell = off, solid green bell = on (tap to switch off). */
.push-toggle[hidden] { display: none; }
.push-toggle .push-on-ico { display: none; }
.push-toggle.is-on .push-on-ico { display: inline-block; }
.push-toggle.is-on .push-off-ico { display: none; }
.pwa-install--drawer { width: 100%; justify-content: center; margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 600; }
.pwa-hint { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.5); }
.pwa-hint[hidden] { display: none; }
.pwa-hint-box { width: min(420px, 100%); padding: 20px; border-radius: 12px; background: var(--surface); color: var(--ink); text-align: center; }
.pwa-hint-box p { margin: 0 0 16px; }
@media print { .pwa-install, .pwa-hint { display: none; } }
