/*
Theme Name: HAB – Her Hafta Bir Hikâye
Theme URI: https://haboyraz.com
Author: Hacı Ahmet Boyraz
Description: Hacı Ahmet Boyraz'ın öykü sitesi için edebî, okunaklı ve SEO odaklı block teması. Seriler, okuma süresi, bölüm gezinmesi ve kitap tanıtımı içerir.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hab
Tags: blog, one-column, block-patterns, full-site-editing, style-variations, translation-ready
*/

/* ---------- Genel ---------- */
html { -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
:where(a):focus-visible,
:where(button, input):focus-visible { outline: 2px solid var(--wp--preset--color--vurgu); outline-offset: 3px; }
.screen-reader-text:focus { clip: auto !important; }

/* Hikâye metni: uzun okuma için ölçülü satır */
.hab-hikaye .wp-block-post-content > p { hyphens: manual; }
.hab-hikaye .wp-block-post-content > p.has-drop-cap:not(:focus)::first-letter {
	font-family: var(--wp--preset--font-family--fraunces);
	color: var(--wp--preset--color--vurgu);
	font-weight: 600;
	font-size: 4.4em;
	line-height: .82;
	margin: .06em .12em 0 0;
}

/* Üst etiket (tür · süre) */
.hab-ust-etiket { text-transform: uppercase; letter-spacing: .1em; }
.hab-ust-etiket a { text-decoration: none; }

/* Tür hapları */
.hab-haplar.wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: .6rem; }
.hab-haplar.wp-block-tag-cloud a {
	font-family: var(--wp--preset--font-family--inter);
	font-size: .95rem !important;
	font-weight: 500;
	text-decoration: none;
	border: 1px solid var(--wp--preset--color--cizgi);
	background: var(--wp--preset--color--yuzey);
	color: var(--wp--preset--color--murekkep);
	padding: .7rem 1rem;
	border-radius: 999px;
	margin: 0 !important;
}
.hab-haplar.wp-block-tag-cloud a:hover { border-color: var(--wp--preset--color--vurgu); }
.hab-haplar .tag-link-count { color: var(--wp--preset--color--soluk); }

/* Hikâye kartları */
.hab-kart { border-top: 2px solid var(--wp--preset--color--murekkep); padding-top: 1rem; }
.hab-kart .wp-block-post-title a { text-decoration: none; }
.hab-kart .wp-block-post-title a:hover { text-decoration: underline; }

/* Bölüm listesi */
.hab-bolumler .wp-block-post { border-bottom: 1px solid var(--wp--preset--color--cizgi); }
.hab-bolumler .wp-block-post-title a { text-decoration: none; }

/* Bölüm gezinmesi kutuları */
.hab-bolum-gezinme .wp-block-post-navigation-link {
	flex: 1 1 260px;
	border: 1px solid var(--wp--preset--color--cizgi);
	border-radius: 8px;
	padding: 1rem 1.1rem;
}
.hab-bolum-gezinme .wp-block-post-navigation-link a { text-decoration: none; font-weight: 600; }
.hab-bolum-gezinme .post-navigation-link-next { text-align: right; }
.hab-bolum-gezinme .wp-block-post-navigation-link:empty { display: none; }

/* Paylaş */
.hab-paylas { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-family: var(--wp--preset--font-family--inter); font-size: .9rem; }
.hab-paylas a, .hab-paylas button {
	border: 1px solid var(--wp--preset--color--cizgi);
	background: transparent;
	color: inherit;
	font: inherit;
	padding: .6rem .9rem;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
}

/* Kitap kapağı gölgesi */
.hab-kapak img { box-shadow: 0 16px 38px rgba(0,0,0,.45); border-radius: 4px; }

/* Koyu bant içindeki bağlantılar */
.has-gece-background-color a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--gece-vurgu); }

/* Telefonda menü */
@media (max-width: 600px) {
	.hab-ust-bar { gap: .75rem !important; }
}

/* Kenarlıklar: genişlik verilen tüm grup kenarlıkları düz çizgi olsun */
.wp-block-group[style*="border-top-width"] { border-top-style: solid; }
.wp-block-group[style*="border-bottom-width"] { border-bottom-style: solid; }
.wp-block-group[style*="border-width"], .wp-block-column[style*="border-width"], .wp-block-columns[style*="border-width"] { border-style: solid; }

/* Seri etiketi */
.hab-seri-etiketi { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-decoration: none; color: inherit; }
.hab-seri-etiketi:hover { text-decoration: underline; }
.hab-okuma-suresi, .hab-bolum-no { white-space: nowrap; }

/* Bölüm gezinmesi: etiket üstte küçük, başlık altta */
.wp-block-post-navigation-link .post-navigation-link__label {
	display: block;
	font-weight: 400;
	font-size: .85rem;
	color: var(--wp--preset--color--soluk);
	margin-bottom: .25rem;
}

/* Yazar kutusu */
.wp-block-post-author__byline { font-family: var(--wp--preset--font-family--inter); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--vurgu); }
.wp-block-post-author__name { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.5rem; font-weight: 600; margin: .2rem 0 .4rem; }
.wp-block-post-author__name a { text-decoration: none; color: inherit; }
.wp-block-post-author__bio { font-size: 1rem; line-height: 1.6; color: var(--wp--preset--color--soluk); }

/* Ekran okuyucu için gizli metin (ana sayfa H1) */
.screen-reader-text:not(:focus) { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }

/* Bilmece kutusu (kitap sayfası) */
.hab-bilmece { margin: 1.5rem 0 0; font-family: var(--wp--preset--font-family--inter); }
.hab-bilmece label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .5rem; }
.hab-bilmece-satir { display: flex; flex-wrap: wrap; gap: .6rem; }
.hab-bilmece input { flex: 1 1 14rem; min-width: 0; font: inherit; font-size: 1rem; padding: .75rem .9rem; border: 1px solid var(--wp--preset--color--cizgi); border-radius: 6px; background: var(--wp--preset--color--yuzey); color: inherit; }
.hab-bilmece button { font: inherit; font-weight: 600; padding: .75rem 1.2rem; border: 0; border-radius: 6px; background: var(--wp--preset--color--murekkep); color: var(--wp--preset--color--yuzey); cursor: pointer; }
.hab-bilmece button:disabled, .hab-bilmece input:disabled { opacity: .6; cursor: default; }
.hab-bilmece-sonuc { min-height: 1.5em; margin: .7rem 0 0; font-size: .95rem; }
.hab-bilmece--dogru .hab-bilmece-sonuc { color: #1f7a3d; }
.hab-bilmece-form { display: none; margin-top: 1.5rem; padding: 1.5rem; border: 1px solid var(--wp--preset--color--cizgi); border-radius: 12px; background: var(--wp--preset--color--yuzey); }
.hab-bilmece-form.hab-bilmece-form--acik { display: block; }
