/* ==========================================================================
   LAYOUT - Konteyner, sol navigasyon, ust serit, footer
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Konteynerler
   -------------------------------------------------------------------------- */
.est-container {
	width: 100%;
	max-width: var(--est-container);
	margin-inline: auto;
	padding-inline: var(--est-gutter);
}

.est-container--wide { max-width: var(--est-container-wide); }
.est-container--text { max-width: var(--est-container-text); }

.est-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	padding-left: var(--est-sidenav-w);
}

.est-content {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
}

body.est-has-topbar .est-content { padding-top: var(--est-topbar-h); }

/* est-hub-page tam ekran kurali kaldirildi */

.est-main {
	flex: 1 0 auto;
	padding-block: var(--est-space-6);
}

.est-main--flush { padding-block: 0; }

/* --------------------------------------------------------------------------
   2. Kose isaretleri (cerceve)
   -------------------------------------------------------------------------- */
.est-frame { position: relative; }

.est-frame::before {
	content: "";
	position: absolute;
	inset: -7px;
	pointer-events: none;
	z-index: 4;
	--tick: var(--est-line);
	background:
		linear-gradient(var(--tick), var(--tick)) left  top    / 13px 1px no-repeat,
		linear-gradient(var(--tick), var(--tick)) left  top    / 1px 13px no-repeat,
		linear-gradient(var(--tick), var(--tick)) right top    / 13px 1px no-repeat,
		linear-gradient(var(--tick), var(--tick)) right top    / 1px 13px no-repeat,
		linear-gradient(var(--tick), var(--tick)) left  bottom / 13px 1px no-repeat,
		linear-gradient(var(--tick), var(--tick)) left  bottom / 1px 13px no-repeat,
		linear-gradient(var(--tick), var(--tick)) right bottom / 13px 1px no-repeat,
		linear-gradient(var(--tick), var(--tick)) right bottom / 1px 13px no-repeat;
}

.est-frame--dark::before { --tick: var(--est-line-dark); }
.est-frame--gold::before { --tick: var(--est-gold-soft); }
/* --------------------------------------------------------------------------
   3. Sol sabit navigasyon (granit zemin + daedrik harf seritleri)
   -------------------------------------------------------------------------- */
.est-sidenav {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: var(--est-sidenav-w);
	z-index: 120;
	color: var(--est-ink-inverse);
	background-color: #2C2926;
	background-blend-mode: overlay, screen, normal;
	background-size: 200px 200px, cover, cover;
	border-right: 1px solid #15130F;
	box-shadow: 3px 0 22px rgba(0, 0, 0, 0.4);
	overflow: hidden;
}

.est-sidenav__runes {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 30px;
	background-color: rgba(0, 0, 0, 0.22);
	opacity: 0.55;
	pointer-events: none;
	user-select: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	padding-block: 10px;
	overflow: hidden;
	font-family: "Daedra", serif;
	font-size: min(17px, 1.75vh);
	color: rgba(0, 0, 0, 0.22);
}

/* Sidenav uzerine gelince Daedrik harfler parlar */
.est-sidenav__runes {
	transition: opacity var(--est-fade), color var(--est-fade), text-shadow var(--est-fade);
}

.est-sidenav:hover .est-sidenav__runes,
.est-sidenav:focus-within .est-sidenav__runes {
	opacity: 0.95;
	color: var(--est-ink-faint);
	text-shadow: 0 0 7px rgba(226, 195, 130, 0.55), 0 0 16px rgba(200, 164, 92, 0.3);
}

@media (prefers-reduced-motion: reduce) {
	.est-sidenav__runes { transition: none;	}
}

.est-sidenav__runes i {
	display: block;
	font-style: normal;
	line-height: 1.15;
}

/* Kelime aralari */
.est-sidenav__runes-gap {
	display: block;
	height: 0.5em;
}

.est-sidenav__runes--left {
	left: 0;
	border-right: 1px solid rgba(216, 185, 120, 0.14);
}

.est-sidenav__runes--right {
	right: 0;
	border-left: 1px solid rgba(216, 185, 120, 0.14);
}

.est-sidenav__inner {
	position: relative;
	z-index: 1;
	height: 100%;
	display: flex;
	flex-direction: column;
	padding: 1.6em 42px 0;
	overflow-y: auto;
	scrollbar-width: thin;
}
/* --- Logo alani --- */
.est-sidenav__brand {
	flex: 0 0 auto;
	text-align: center;
	padding-bottom: 1.6em;
	border-bottom: 1px solid rgba(216, 185, 120, 0.16);
}

.est-sidenav__brand a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.est-sidenav__brand a:hover { text-decoration: none; }

.est-sidenav__logo {
	display: block;
	margin: 0 auto;
	max-height: 86px;
	width: auto;
}

.est-sidenav__mark svg {
	display: block;
	width: 54px;
	height: 54px;
	margin: 0 auto 0.55em;
	color: var(--est-gold);
	opacity: 0.95;
}

.est-sidenav__title {
	display: block;
	font-family: var(--est-font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #EFE8DC;
}

.est-sidenav__tagline {
	display: block;
	margin-top: 0.5em;
	font-family: var(--est-font-mono);
	font-size: 0.5625rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--est-gold-soft);
}

.est-sidenav__brand a:hover .est-sidenav__mark svg { color: #E6C88A; }

/* --- Menu butonlari (parsomen) --- */
.est-sidenav__nav { padding-block: 2em 1em; }

.est-sidenav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

.est-sidenav__item { margin: 0; }

/* --- Ogeler arasi cizgi deseni --- */
.est-sidenav__sep {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin: 0;
	padding: 0.2em 0.7em;
}

.est-sidenav__sep::before,
.est-sidenav__sep::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, rgba(216, 185, 120, 0.45) 55%, rgba(216, 185, 120, 0.5) 100%);
}

.est-sidenav__sep::after {
	background: linear-gradient(270deg, transparent 0%, rgba(216, 185, 120, 0.45) 55%, rgba(216, 185, 120, 0.5) 100%);
}

.est-sidenav__sep-rune {
	flex: 0 0 auto;
	font-family: "Daedra", serif;
	font-style: normal;
	font-size: 9px;
	letter-spacing: 0.16em;
	line-height: 1;
	color: rgba(216, 185, 120, 0.55);
	user-select: none;
}

/* --- Menu baglantilari --- */
.est-sidenav__link {
	position: relative;
	display: block;
	text-align: center;
	padding: 0.75em 0.9em;
	background: transparent;
	color: var(--est-ink-inverse);
	font-family: var(--est-font-heading);
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color var(--est-fade), background var(--est-fade), text-shadow var(--est-fade);
}

/* Desen cercevesi yalnizca aktif ve hover durumunda; opacity ile yumusak gecis */
.est-sidenav__link::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0;
	border: 1px solid transparent;
	border-image-source: url("../img/kare-desen.png");
	border-image-slice: 20;
	border-image-width: 20;
	border-image-repeat: repeat;
	transition: opacity var(--est-fade);
}

.est-sidenav__link:hover,
.est-sidenav__link:focus-visible,
.est-sidenav__link.is-active {
	color: #FBF4E7;
	background: radial-gradient(120% 150% at 50% 0%, rgba(255, 246, 225, 0.16) 0%, rgba(255, 246, 225, 0.05) 45%, transparent 72%);
	text-decoration: none;
}

.est-sidenav__link:hover::before,
.est-sidenav__link:focus-visible::before,
.est-sidenav__link.is-active::before {
	opacity: 1;
}

/* --- Sosyal medya ve arama --- */
.est-sidenav__foot {
	margin-top: auto;
	padding-block: 1.4em;
	border-top: 1px solid rgba(216, 185, 120, 0.16);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.3em;
}

.est-sidenav__social {
	display: contents;
}

.est-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid transparent;
	background: transparent;
	color: #B4A894;
}

.est-social:hover,
.est-social:focus-visible {
	color: var(--est-gold);
	border-color: rgba(216, 185, 120, 0.35);
	text-decoration: none;
}

.est-social svg { width: 19px; height: 19px; }

/* --- Mobil menu dugmesi --- */
.est-nav-toggle {
	display: none;
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 130;
	width: 42px;
	height: 42px;
	align-items: center;
	justify-content: center;
	background: var(--est-bg-black);
	border: 1px solid var(--est-line-dark);
	color: var(--est-ink-inverse);
}

.est-nav-toggle svg { width: 20px; height: 20px; }

.est-sidenav-backdrop {
	position: fixed;
	inset: 0;
	z-index: 115;
	background: rgba(20, 18, 15, 0.55);
	opacity: 0;
	pointer-events: none;
}

.est-sidenav-backdrop.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* --------------------------------------------------------------------------
   4. Ust serit - yalnizca tekil yazilarda (meta kutusu)
   -------------------------------------------------------------------------- */
.est-topbar {
	position: fixed;
	top: 0;
	left: var(--est-sidenav-w);
	right: 0;
	z-index: 110;
	min-height: var(--est-topbar-h);
	display: flex;
	align-items: center;
	background: var(--est-bg-black);
	color: var(--est-ink-inverse);
	border-bottom: 1px solid var(--est-line-dark);
}

.est-topbar__inner {
	display: flex;
	align-items: center;
	gap: 2em;
	width: 100%;
	padding: 0.85em 2.2em;
}

.est-topbar__title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	line-height: 1.3;
	color: #F0E9DD;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.est-topbar__meta {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 1.6em;
	font-family: var(--est-font-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--est-ink-inverse-muted);
}

.est-topbar__item {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	white-space: nowrap;
}

.est-topbar__item svg {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	color: var(--est-gold);
}

.est-topbar__item a { color: inherit; }
.est-topbar__item a:hover { color: var(--est-gold); text-decoration: none; }
/* --------------------------------------------------------------------------
   5. Arama katmani
   -------------------------------------------------------------------------- */
.est-search-panel {
	position: fixed;
	top: 0;
	left: var(--est-sidenav-w);
	right: 0;
	z-index: 125;
	display: grid;
	grid-template-rows: 0fr;
	background: var(--est-bg-dark-deep);
	transition: grid-template-rows var(--est-fade);
}

.est-search-panel.is-open { grid-template-rows: 1fr; }
.est-search-panel__inner { overflow: hidden; }
.est-search-panel .est-search-form { display: flex; gap: 0.6em; padding: 1.1em 2.2em; }

.est-search-panel input[type="search"] {
	flex: 1 1 auto;
	background: transparent;
	border: 1px solid var(--est-line-dark);
	border-radius: 0;
	color: var(--est-ink-inverse);
	font-family: var(--est-font-mono);
	font-size: 0.8125rem;
	padding: 0.7em 1em;
}

.est-search-panel input[type="search"]:focus { border-color: var(--est-gold-soft); }
.est-search-panel .est-search-form__icon { display: none; }

/* --------------------------------------------------------------------------
   6. Sayfa basligi blogu
   -------------------------------------------------------------------------- */
.est-page-header {
	border-bottom: 1px solid var(--est-line);
	padding-block: var(--est-space-6);
	text-align: center;
}

.est-page-header__eyebrow {
	display: block;
	margin-bottom: var(--est-space-2);
	font-family: var(--est-font-mono);
	font-size: var(--est-text-xs);
	letter-spacing: var(--est-tracking-wide);
	text-transform: uppercase;
	color: var(--est-accent);
}

.est-page-header__title { margin-bottom: var(--est-space-2); }

.est-page-header__desc {
	max-width: var(--est-container-text);
	margin-inline: auto;
	color: var(--est-ink-muted);
	margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   7. Arsiv meta seridi
   -------------------------------------------------------------------------- */
.est-metabar { border-bottom: 1px solid var(--est-line); }

.est-metabar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--est-space-3);
	padding-block: 1.75em 1.25em;
	font-family: var(--est-font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.est-metabar__left { color: var(--est-accent); }
.est-metabar__left a { color: inherit; }
.est-metabar__sep { margin-inline: 0.5em; color: var(--est-line); }
.est-metabar__right { color: var(--est-ink-muted); }

/* --------------------------------------------------------------------------
   8. Icerik + kenar cubugu izgarasi
   -------------------------------------------------------------------------- */
.est-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--est-space-6);
}

.est-layout--sidebar { grid-template-columns: minmax(0, 1fr) 18em; }

@media (max-width: 1024px) {
	.est-layout--sidebar { grid-template-columns: 1fr; }
}
/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.est-footer {
	flex-shrink: 0;
	background: var(--est-bg-black);
	color: var(--est-ink-inverse-muted);
	padding-block: var(--est-space-6) var(--est-space-4);
	font-size: var(--est-text-sm);
}

/* Footer'in font-size'i 0.875rem oldugu icin em tabanli konteyner olculeri kuculuyordu;
   icerik sutunuyla ayni hizaya gelmesi icin rem tabanli deger veriliyor. */
.est-footer .est-container {
	max-width: calc(75rem + 2 * 1.5rem);
	padding-inline: 1.5rem;
}

.est-footer .est-container--wide { max-width: calc(87.5rem + 2 * 1.5rem); }

.est-footer a { color: var(--est-ink-inverse); }
.est-footer a:hover { color: var(--est-gold); text-decoration: none; }

.est-footer__grid {
	display: grid;
	/* Sol sutun esnek, sag sutun icerigi kadar ve saga dayali */
	grid-template-columns: minmax(0, 1fr) auto;
	gap: var(--est-space-5) var(--est-space-6);
	padding-bottom: var(--est-space-5);
	border-bottom: 1px solid var(--est-line-dark);
}

.est-footer__title {
	color: var(--est-ink-inverse);
	font-family: var(--est-font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	margin-bottom: var(--est-space-3);
	text-transform: uppercase;
	letter-spacing: 0.16em;
}

.est-footer ul { list-style: none; margin: 0; padding: 0; }
.est-footer li { margin-bottom: 0.4em; }

.est-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--est-space-3);
	padding-top: var(--est-space-4);
	font-family: var(--est-font-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	color: var(--est-ink-inverse-muted);
}

.est-footer__bottom p { margin: 0; }

@media (max-width: 700px) {
	.est-footer__grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   10. Duyarli davranis
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
	:root { --est-sidenav-w: 232px; }
	.est-sidenav__inner { padding-inline: 38px; }
	.est-sidenav__link { font-size: 0.9375rem; }
}

@media (max-width: 900px) {

	.est-site { padding-left: 0; }

	.est-nav-toggle { display: inline-flex; }

	.est-sidenav {
		width: min(84vw, 290px);
		transform: translateX(-100%);
		transition: transform var(--est-fade);
	}

	.est-sidenav.is-open { transform: translateX(0); }

	.est-topbar,
	.est-search-panel { left: 0; }

	.est-topbar__inner {
		padding: 0.8em 1.2em 0.8em 64px;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.4em;
	}

	.est-topbar__title { white-space: normal; font-size: 0.9375rem; }
	.est-topbar__meta { gap: 1em; flex-wrap: wrap; font-size: 0.625rem; }



	.est-metabar__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5em;
		font-size: 0.6875rem;
	}
}
/* --------------------------------------------------------------------------
   11. WordPress yonetici cubugu ile birlikte
   -------------------------------------------------------------------------- */
body.admin-bar .est-sidenav,
body.admin-bar .est-topbar,
body.admin-bar .est-search-panel { top: 32px; }

body.admin-bar .est-nav-toggle { top: 42px; }

@media (max-width: 782px) {

	body.admin-bar .est-sidenav,
	body.admin-bar .est-topbar,
	body.admin-bar .est-search-panel { top: 46px; }

	body.admin-bar .est-nav-toggle { top: 56px; }
}

@media screen and (max-width: 600px) {

	body.admin-bar .est-sidenav,
	body.admin-bar .est-topbar,
	body.admin-bar .est-search-panel { top: 0; }

	body.admin-bar .est-nav-toggle { top: 10px; }
}

/* --- Sol menu arama kutusu --- */
.est-sidenav__foot {
	flex-direction: column;
	align-items: stretch;
	gap: 1em;
	padding-inline: 0.2em;
}

.est-sidenav__social {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35em;
}

.est-navsearch {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.55em;
	padding: 0.62em 0.9em;
	border: 1px solid rgba(216, 185, 120, 0.28);
	background: rgba(0, 0, 0, 0.16);
	transition: border-color var(--est-fade), background var(--est-fade), box-shadow var(--est-fade);
}

.est-navsearch:hover { border-color: rgba(216, 185, 120, 0.45); }

.est-navsearch:focus-within {
	border-color: rgba(216, 185, 120, 0.7);
	background: rgba(0, 0, 0, 0.22);
	box-shadow: 0 0 12px rgba(200, 164, 92, 0.18);
}

.est-navsearch__icon {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	color: #B4A894;
	transition: color var(--est-fade);
}

.est-navsearch:focus-within .est-navsearch__icon { color: var(--est-gold-soft); }

.est-navsearch input[type="search"].est-navsearch__field {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--est-ink-inverse);
	font-family: var(--est-font-heading);
	font-size: 0.9375rem;
	letter-spacing: 0.02em;
	line-height: 1.4;
}

.est-navsearch input[type="search"].est-navsearch__field:focus {
	outline: 0;
	border: 0;
	box-shadow: none;
}

.est-navsearch input[type="search"].est-navsearch__field::placeholder {
	color: #B4A894;
	opacity: 1;
}

.est-navsearch input[type="search"].est-navsearch__field::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* --- Logo alti: gumus kelime isareti --- */
.est-sidenav__wordmark {
	display: block;
	margin-top: 0.7em;
	font-family: var(--est-font-heading);
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.18;
	text-transform: uppercase;
	color: #C6CBD1;
}

.est-sidenav__word {
	display: block;
	background: linear-gradient(180deg, #FAFAF8 0%, #D3D8DD 42%, #9AA1A8 72%, #C3C8CE 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.est-sidenav__brand a:hover .est-sidenav__word {
	background: linear-gradient(180deg, #FFFFFF 0%, #E4E8EC 42%, #AEB5BC 72%, #D5DAE0 100%);
	-webkit-background-clip: text;
	background-clip: text;
}
