/* ==========================================================================
   COMPONENTS — Kart, buton, sayfalama, form, yazı içeriği
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Butonlar
   -------------------------------------------------------------------------- */
.est-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.75em 1.75em;
	background: var(--est-accent);
	color: #fff;
	border: 1px solid var(--est-accent);
	border-radius: var(--est-radius);
	font-family: var(--est-font-heading);
	font-size: var(--est-text-sm);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background var(--est-transition), color var(--est-transition), border-color var(--est-transition);
}

.est-btn:hover {
	background: var(--est-accent-dark);
	border-color: var(--est-accent-dark);
	color: #fff;
	text-decoration: none;
}

.est-btn--ghost {
	background: transparent;
	color: var(--est-ink);
	border-color: var(--est-line);
}

.est-btn--ghost:hover {
	background: var(--est-ink);
	border-color: var(--est-ink);
	color: var(--est-bg);
}

.est-btn--inverse {
	background: transparent;
	color: var(--est-ink-inverse);
	border-color: var(--est-ink-inverse-muted);
}

.est-btn--inverse:hover {
	background: var(--est-ink-inverse);
	border-color: var(--est-ink-inverse);
	color: var(--est-ink);
}

/* --------------------------------------------------------------------------
   2. Bölüm başlıkları
   -------------------------------------------------------------------------- */
.est-section { padding-block: var(--est-space-6); }

.est-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--est-space-3);
	margin-bottom: var(--est-space-5);
	padding-bottom: var(--est-space-3);
	border-bottom: 1px solid var(--est-line);
}

.est-section-head__title {
	margin: 0;
	font-size: var(--est-h3);
	text-transform: uppercase;
	letter-spacing: var(--est-tracking-wide);
}

.est-section-head__link {
	flex-shrink: 0;
	font-family: var(--est-font-heading);
	font-size: var(--est-text-sm);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Süslü ayraç */
.est-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75em;
	margin-block: var(--est-space-5);
	color: var(--est-line);
}

.est-divider::before,
.est-divider::after {
	content: "";
	height: 1px;
	flex: 1;
	background: currentColor;
}

.est-divider__mark {
	font-size: var(--est-text-sm);
	color: var(--est-accent);
	letter-spacing: 0.3em;
}

/* --------------------------------------------------------------------------
   3. Yazı kartı
   -------------------------------------------------------------------------- */
.est-grid {
	display: grid;
	gap: var(--est-space-4);
	grid-template-columns: repeat(auto-fill, minmax(17em, 1fr));
}

.est-grid--2 { grid-template-columns: repeat(auto-fill, minmax(24em, 1fr)); }
.est-grid--4 { grid-template-columns: repeat(auto-fill, minmax(14em, 1fr)); }

@media (max-width: 600px) {
	.est-grid,
	.est-grid--2,
	.est-grid--4 { grid-template-columns: 1fr; }
}

.est-card {
	display: flex;
	flex-direction: column;
	background: var(--est-bg-raised);
	border: 1px solid var(--est-line-soft);
	border-radius: var(--est-radius);
	overflow: hidden;
	transition: transform var(--est-transition), box-shadow var(--est-transition), border-color var(--est-transition);
}

.est-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--est-shadow);
	border-color: var(--est-line);
}

.est-card__media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--est-bg-sunken);
	overflow: hidden;
}

.est-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms cubic-bezier(0.2, 0, 0.2, 1);
}

.est-card:hover .est-card__media img { transform: scale(1.04); }

.est-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: var(--est-space-4);
}

.est-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	margin-bottom: var(--est-space-2);
	font-size: var(--est-text-xs);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--est-ink-faint);
	font-family: var(--est-font-heading);
}

.est-card__cat { color: var(--est-accent); }

.est-card__title {
	margin: 0 0 var(--est-space-2);
	font-size: var(--est-h4);
	line-height: var(--est-leading-snug);
}

.est-card__title a { color: var(--est-ink); }
.est-card__title a:hover { color: var(--est-accent); text-decoration: none; }

.est-card__excerpt {
	margin: 0;
	font-size: var(--est-text-sm);
	color: var(--est-ink-muted);
	line-height: 1.65;
}

.est-card__footer {
	margin-top: auto;
	padding-top: var(--est-space-3);
}

/* Yatay liste kartı (kitap listeleri için) */
.est-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--est-line-soft);
}

.est-list__item {
	margin: 0;
	border-bottom: 1px solid var(--est-line-soft);
}

.est-list__link {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--est-space-3);
	padding: 0.85em 0.25em;
	color: var(--est-ink);
	transition: background var(--est-transition), padding-left var(--est-transition);
}

.est-list__link:hover {
	background: var(--est-bg-raised);
	color: var(--est-accent);
	padding-left: 0.75em;
	text-decoration: none;
}

.est-list__title { font-family: var(--est-font-heading); font-size: var(--est-text-base); }

.est-list__meta {
	flex-shrink: 0;
	font-size: var(--est-text-xs);
	color: var(--est-ink-faint);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   4. Tekil yazı
   -------------------------------------------------------------------------- */
.est-entry__header {
	margin-bottom: var(--est-space-5);
	text-align: center;
}

.est-entry__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.75em;
	font-family: var(--est-font-heading);
	font-size: var(--est-text-xs);
	letter-spacing: var(--est-tracking-wide);
	text-transform: uppercase;
	color: var(--est-ink-faint);
}

.est-entry__meta a { color: var(--est-accent); }

.est-entry__thumb {
	margin-bottom: var(--est-space-5);
	border: 1px solid var(--est-line);
}

.est-entry__content {
	font-size: var(--est-text-lg);
}

.est-entry__content > * { margin-bottom: var(--est-space-4); }

.est-entry__content h2 { margin-top: var(--est-space-6); }
.est-entry__content h3 { margin-top: var(--est-space-5); }

.est-entry__content img { border: 1px solid var(--est-line); }

.est-entry__footer {
	margin-top: var(--est-space-6);
	padding-top: var(--est-space-4);
	border-top: 1px solid var(--est-line);
	font-size: var(--est-text-sm);
}

.est-tags a {
	display: inline-block;
	margin: 0 0.3em 0.4em 0;
	padding: 0.25em 0.75em;
	background: var(--est-bg-sunken);
	border: 1px solid var(--est-line-soft);
	border-radius: var(--est-radius);
	font-size: var(--est-text-xs);
	color: var(--est-ink-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.est-tags a:hover {
	background: var(--est-accent);
	border-color: var(--est-accent);
	color: #fff;
	text-decoration: none;
}

/* Yazı arası gezinme */
.est-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--est-space-4);
	margin-top: var(--est-space-6);
}

@media (max-width: 600px) { .est-post-nav { grid-template-columns: 1fr; } }

.est-post-nav__link {
	display: block;
	padding: var(--est-space-3);
	border: 1px solid var(--est-line-soft);
	background: var(--est-bg-raised);
	color: var(--est-ink);
}

.est-post-nav__link:hover { border-color: var(--est-accent); text-decoration: none; }
.est-post-nav__link--next { text-align: right; }

.est-post-nav__label {
	display: block;
	font-size: var(--est-text-xs);
	text-transform: uppercase;
	letter-spacing: var(--est-tracking-wide);
	color: var(--est-ink-faint);
	margin-bottom: 0.25em;
}

.est-post-nav__title { font-family: var(--est-font-heading); font-size: var(--est-text-base); }

/* --------------------------------------------------------------------------
   5. Sayfalama
   -------------------------------------------------------------------------- */
.est-pagination {
	margin-top: var(--est-space-6);
	text-align: center;
}

.est-pagination ul,
.est-pagination .nav-links {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.4em;
	justify-content: center;
	list-style: none;
	padding: 0;
	margin: 0;
}

.est-pagination li {
	margin: 0;
	list-style: none;
}

.est-pagination li::marker { content: ""; }

.est-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 0.6em;
	border: 1px solid var(--est-line);
	background: transparent;
	color: var(--est-ink);
	font-family: var(--est-font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	border-radius: 0;
	transition: background var(--est-transition), color var(--est-transition), border-color var(--est-transition);
}

.est-pagination li { margin: 0; }

.est-pagination .page-numbers:hover {
	background: var(--est-bg-black);
	border-color: var(--est-bg-black);
	color: var(--est-ink-inverse);
	text-decoration: none;
}

.est-pagination .page-numbers.current {
	background: var(--est-accent);
	border-color: var(--est-accent);
	color: #fff;
}

.est-pagination .page-numbers.dots {
	background: transparent;
	border-color: transparent;
}

/* --------------------------------------------------------------------------
   6. Formlar ve arama
   -------------------------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea,
select {
	width: 100%;
	padding: 0.7em 1em;
	background: var(--est-bg-raised);
	border: 1px solid var(--est-line);
	border-radius: var(--est-radius);
	color: var(--est-ink);
	font-size: var(--est-text-base);
	transition: border-color var(--est-transition);
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--est-accent);
	outline: none;
}

.est-search-form {
	display: flex;
	gap: 0.5em;
}

.est-search-form input[type="search"] { flex: 1; }

.est-search-panel .est-search-form input[type="search"] {
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--est-line-dark);
	color: var(--est-ink-inverse);
	font-family: var(--est-font-heading);
	font-size: var(--est-h4);
	padding-inline: 0;
	border-radius: 0;
}

.est-search-panel .est-search-form input[type="search"]::placeholder {
	color: var(--est-ink-inverse-muted);
}

/* --------------------------------------------------------------------------
   7. Kenar çubuğu / widget
   -------------------------------------------------------------------------- */
.est-sidebar .widget {
	margin-bottom: var(--est-space-5);
	padding-bottom: var(--est-space-4);
	border-bottom: 1px solid var(--est-line-soft);
}

.est-sidebar .widget:last-child { border-bottom: 0; }

.est-sidebar .widget-title {
	font-size: var(--est-h6);
	text-transform: uppercase;
	letter-spacing: var(--est-tracking-wide);
	margin-bottom: var(--est-space-3);
}

.est-sidebar ul {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--est-text-sm);
}

.est-sidebar li { margin-bottom: 0.5em; }
.est-sidebar a { color: var(--est-ink); }
.est-sidebar a:hover { color: var(--est-accent); }

/* --------------------------------------------------------------------------
   8. Yardımcı sınıflar
   -------------------------------------------------------------------------- */
.est-text-center { text-align: center; }
.est-mb-0 { margin-bottom: 0; }
.est-mt-5 { margin-top: var(--est-space-5); }
.est-muted { color: var(--est-ink-muted); }

.est-eyebrow {
	display: block;
	font-family: var(--est-font-heading);
	font-size: var(--est-text-xs);
	letter-spacing: var(--est-tracking-wide);
	text-transform: uppercase;
	color: var(--est-accent);
}

.est-no-results {
	padding: var(--est-space-6) 0;
	text-align: center;
	color: var(--est-ink-muted);
}

/* WordPress hizalama sınıfları */
.alignleft { float: left; margin: 0 var(--est-space-4) var(--est-space-3) 0; }
.alignright { float: right; margin: 0 0 var(--est-space-3) var(--est-space-4); }
.aligncenter { margin-inline: auto; }
.alignwide { width: min(100%, var(--est-container)); margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.sticky, .gallery-caption, .bypostauthor { display: block; }

/* ==========================================================================
   META SATIRI — kategori · yazar · tarih (tüm şablonlarda)
   ========================================================================== */
.est-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5em;
	font-family: var(--est-font-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--est-ink-faint);
}

.est-meta__cat { color: var(--est-gold-soft); }
.est-meta a { color: inherit; }
.est-meta a:hover { color: var(--est-accent); text-decoration: none; }

.est-meta--light { color: rgba(237, 225, 209, 0.62); }
.est-meta--light .est-meta__cat { color: var(--est-gold); }

/* ==========================================================================
   ARŞİV SAYFALARI
   ========================================================================== */

/* --- Başlık --- */
.est-ahead {
	padding-block: var(--est-space-6) var(--est-space-5);
	border-bottom: 1px solid var(--est-ink);
	margin-bottom: var(--est-space-5);
}

.est-ahead__row {
	display: flex;
	align-items: baseline;
	gap: 1.5em;
	flex-wrap: wrap;
}

.est-ahead__eyebrow {
	font-family: var(--est-font-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--est-accent);
}

.est-ahead__title {
	margin: 0;
	font-family: var(--est-font-heading);
	font-size: var(--est-h1);
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.1;
}

.est-ahead__desc {
	max-width: var(--est-container-text);
	margin-top: var(--est-space-3);
	color: var(--est-ink-muted);
}

.est-ahead__desc p:last-child { margin-bottom: 0; }

/* --- Alt kategori şeridi --- */
.est-subcats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-bottom: var(--est-space-5);
}

.est-subcats__item {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.55em 1.1em;
	border: 1px solid var(--est-line);
	font-family: var(--est-font-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--est-ink);
	transition: background var(--est-transition), border-color var(--est-transition), color var(--est-transition);
}

.est-subcats__item:hover {
	background: var(--est-bg-black);
	border-color: var(--est-bg-black);
	color: var(--est-ink-inverse);
	text-decoration: none;
}

.est-subcats__count { color: var(--est-gold-soft); }
.est-subcats__item:hover .est-subcats__count { color: var(--est-gold); }

/* --- Izgara --- */
.est-agrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 3.5em 2.25em;
}

.est-acard { display: flex; flex-direction: column; }

.est-acard__thumb {
	display: block;
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--est-bg-sunken);
	margin-bottom: 1.5em;
	overflow: hidden;
}

.est-acard__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms cubic-bezier(0.2, 0, 0.2, 1);
}

.est-acard:hover .est-acard__thumb img { transform: scale(1.05); }

.est-acard__title {
	margin: 0 0 0.6rem;
	font-family: var(--est-font-heading);
	font-size: 1.375rem;
	font-weight: 500;
	line-height: 1.25;
}

.est-acard__title a { color: var(--est-ink); }
.est-acard__title a:hover { color: var(--est-accent); text-decoration: none; }

.est-acard__excerpt {
	margin: 1rem 0 0;
	color: var(--est-ink-muted);
	line-height: 1.7;
}

/* --- Çerçeve sarıcısı --- */
.est-acard > .est-frame { display: block; }

@media (max-width: 1024px) {
	.est-agrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3em 2em; }
}

@media (max-width: 640px) {
	.est-agrid { grid-template-columns: 1fr; gap: 2.5em; }
	.est-ahead { padding-block: var(--est-space-5) var(--est-space-4); }
}

/* ==========================================================================
   DESEN ÇERÇEVESİ
   Köşeleri süslemeli ince çerçeve. Layout'ta 1px yer kaplar,
   boyanan alan 20px olur (border-image-width çarpanı sayesinde).
   ========================================================================== */
.est-desen {
	border: 1px solid transparent;
	border-image-source: url("../img/kare-desen.png");
	border-image-slice: 20;
	border-image-width: 20;
	border-image-repeat: repeat;
}

/* ==========================================================================
   TEKİL YAZI
   ========================================================================== */
.est-single {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 20em;
	gap: 3.5em;
	align-items: start;
}

.est-single__side {
	position: sticky;
	top: calc(var(--est-topbar-h) + 1.5em);
}

/* --- Başlık --- */
.est-single .est-entry__header {
	text-align: left;
	margin-bottom: var(--est-space-4);
}

.est-single .est-entry__title {
	margin: 0;
	font-size: var(--est-h1);
	line-height: 1.12;
	letter-spacing: 0.02em;
}

/* --- Meta kutusu --- */
.est-postmeta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75em 2em;
	padding: 1.15em 1.5em;
	margin-bottom: var(--est-space-5);
	font-family: var(--est-font-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--est-ink-muted);
}

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

.est-postmeta__item svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: var(--est-gold-soft);
}

.est-postmeta a { color: var(--est-ink-muted); }
.est-postmeta a:hover { color: var(--est-accent); text-decoration: none; }

/* --- Öne çıkan görsel --- */
.est-single .est-entry__thumb {
	margin: 0 0 var(--est-space-5);
	border: 0;
}

.est-single .est-entry__thumb img { width: 100%; }

/* --- YouTube gömmesi (öne çıkan görselin yerine) --- */
.est-single .est-entry__media { margin-bottom: var(--est-space-5); }

.est-video {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--est-bg-black);
	overflow: hidden;
}

/* base.css'teki "iframe { height: auto }" kuralını geçersiz kılar */
.est-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* --- İçerik --- */
.est-single .est-entry__content {
	font-size: 1.0625rem;
	line-height: 1.85;
}

.est-single .est-entry__content p { margin-bottom: 1.5em; }

.est-single .est-entry__content h2,
.est-single .est-entry__content h3,
.est-single .est-entry__content h4 { letter-spacing: 0.02em; }

.est-single .est-entry__content a { text-decoration: underline; }

/* ==========================================================================
   KENAR ÇUBUĞU KUTULARI
   ========================================================================== */
.est-aside {
	display: flex;
	flex-direction: column;
	gap: var(--est-space-4);
	max-height: calc(100vh - var(--est-header-height) - 3em);
	overflow-y: auto;
	scrollbar-width: thin;
}

/* Kutular sıkışmasın — özellikle Discord iframe'i */
.est-aside > * { flex-shrink: 0; }

/* Kenar çubuğu ekrana sığmazsa kendi içinde kayar; kaydırma çubuğu silik olsun */
.est-aside { scrollbar-color: var(--est-line) transparent; }
.est-aside::-webkit-scrollbar { width: 5px; }
.est-aside::-webkit-scrollbar-track { background: transparent; }
.est-aside::-webkit-scrollbar-thumb { background: var(--est-line); border-radius: 3px; }

.est-widget { padding: 1.5em; }

.est-widget__title {
	margin: 0 0 0.75em;
	padding-bottom: 0.5em;
	border-bottom: 1px solid var(--est-line-soft);
	font-family: var(--est-font-heading);
	font-size: var(--est-h3);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--est-ink);
}

.est-widget__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.est-widget__list li {
	margin: 0;
	border-bottom: 1px solid var(--est-line-soft);
}

.est-widget__list li:last-child { border-bottom: 0; }

.est-widget__list a {
	display: block;
	padding: 0.8em 0;
	color: var(--est-ink);
	transition: color var(--est-transition), padding-left var(--est-transition);
}

.est-widget__list a:hover {
	color: var(--est-accent);
	padding-left: 0.5em;
	text-decoration: none;
}

.est-widget__name {
	display: block;
	font-family: var(--est-font-heading);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.4;
	margin-bottom: 0.25em;
}

.est-widget__date {
	display: block;
	font-family: var(--est-font-mono);
	font-size: 0.625rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--est-ink-faint);
}

/* Discord widget'ı — kendi kutusu var, çerçeve içine alınmaz.
   base.css'teki "iframe { height: auto }" kuralı yüzünden yükseklik açıkça verilir. */
.est-discord iframe {
	display: block;
	width: 100%;
	height: 500px;
	border: 0;
}

/* ==========================================================================
   DUYARLILIK
   ========================================================================== */
@media (max-width: 1100px) {
	.est-single { grid-template-columns: minmax(0, 1fr) 19em; gap: 3em; }
}

@media (max-width: 900px) {
	.est-single { grid-template-columns: 1fr; gap: 3.5em; }
	.est-single__side { position: static; }
	.est-aside { max-height: none; overflow: visible; }
}

@media (max-width: 600px) {
	.est-postmeta { gap: 0.6em 1.25em; padding: 1em 1.15em; }
}
