/*
Theme Name: Isteni Narratíva
Theme URI:
Description: Egyedi WordPress sablon Az isteni narratíva könyvhöz. Fejezet-alapú olvasói élmény sticky tartalomjegyzékkel.
Author: Szücs János
Author URI:
Version: 2.0.0
Text Domain: isteninarrativa
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ─────────────────────────────────────────────
   CSS VÁLTOZÓK
───────────────────────────────────────────── */
:root {
	--teal:      #8BC6CA;
	--teal-dark: #5aacb2;
	--blue:      #416285;
	--blue-dark: #2d4a66;
	--cream:     #FDF9F6;
	--text:      #1a2e35;
	--muted:     #6b8a90;
	--border:    #dde8e9;
	--sidebar-w: 280px;
	--content-max: 720px;
	--wrap-max:  1024px;
}

/* ─────────────────────────────────────────────
   RESET & ALAP
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
	font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	background: var(--cream);
	color: var(--text);
	font-size: 17px;
	line-height: 1.8;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal-dark); }

/* ─────────────────────────────────────────────
   HERO FEJLÉC
───────────────────────────────────────────── */
.site-hero {
	background: linear-gradient(120deg, #416285 0%, #6aafb5 55%, #8BC6CA 100%);
	color: #fff;
	min-height: 480px;
	position: relative;
	overflow: hidden;
}

.site-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 80% 50%, rgba(255,255,255,.08) 0%, transparent 60%);
	pointer-events: none;
}

.site-hero__inner {
	max-width: var(--wrap-max);
	margin: 0 auto;
	padding: 72px 0px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 48px;
	position: relative;
	z-index: 1;
}

.site-hero__text { max-width: 560px; }

.site-hero__eyebrow {
	font-family: 'Inter', sans-serif;
	font-size: .8rem;
	font-weight: 500;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: rgba(255,255,255,.7);
	margin-bottom: 16px;
}

.site-hero__title {
	font-family: 'Poppins', sans-serif;
	font-size: clamp(2.8rem, 5vw, 4rem);
	font-weight: 700;
	line-height: 1.06;
	margin-bottom: 24px;
	color: #fff;
	letter-spacing: -.02em;
}

.site-hero__title a { color: #fff; }
.site-hero__title a:hover { color: rgba(255,255,255,.85); }

.site-hero__subtitle {
	font-size: 1.05rem;
	line-height: 1.7;
	color: rgba(255,255,255,.82);
	max-width: 440px;
	margin-bottom: 36px;
	font-style: italic;
}

.site-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: rgba(255,255,255,.18);
	color: #fff;
	border: 1.5px solid rgba(255,255,255,.5);
	padding: 13px 28px;
	border-radius: 4px;
	font-family: 'Inter', sans-serif;
	font-size: .9rem;
	font-weight: 600;
	letter-spacing: .04em;
	transition: all .2s;
}

.site-hero__cta:hover {
	background: rgba(255,255,255,.3);
	color: #fff;
	border-color: rgba(255,255,255,.8);
}

.site-hero__cover { flex-shrink: 0; }

.site-hero__cover img {
	width: 360px;
	border-radius: 4px;
	transform: perspective(900px) rotateY(-6deg);
	transition: transform .3s ease;
	/*box-shadow: -8px 20px 52px rgba(0,0,0,.38);*/
}

.site-hero__cover img:hover {
	transform: perspective(900px) rotateY(-2deg) translateY(-5px);
}

/* ─────────────────────────────────────────────
   NAVIGÁCIÓ
───────────────────────────────────────────── */
.site-nav { background: var(--blue-dark); }

.site-nav__inner {
	max-width: var(--wrap-max);
	margin: 0 auto;
	padding: 0px;
	display: flex;
}

.site-nav a {
	display: inline-block;
	font-family: 'Inter', sans-serif;
	color: rgba(255,255,255,.58);
	font-size: .78rem;
	font-weight: 500;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 15px 20px;
	border-bottom: 2px solid transparent;
	transition: color .2s, border-color .2s;
}

.site-nav a:hover,
.site-nav a.current-menu-item,
.site-nav a.active {
	color: var(--teal);
	border-bottom-color: var(--teal);
}

/* ─────────────────────────────────────────────
   KÖNYV LAYOUT (sidebar + tartalom)
───────────────────────────────────────────── */
.book-layout {
	display: flex;
	align-items: flex-start;
	min-height: calc(100vh - 300px);
	max-width: var(--wrap-max);
	margin: 0 auto;
}

.book-sidebar {
	width: var(--sidebar-w);
	flex-shrink: 0;
	padding: 36px 28px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	background: #e4eff0;
	border-right: 1px solid var(--border);
}

.book-sidebar::-webkit-scrollbar { width: 4px; }
.book-sidebar::-webkit-scrollbar-track { background: transparent; }
.book-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.toc-label {
	display: inline-block;
	background: var(--blue);
	color: var(--teal);
	font-family: 'Inter', sans-serif;
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 5px 14px;
	border-radius: 3px;
	margin-bottom: 24px;
}

.toc-list { list-style: none; }
.toc-list li { border-bottom: 1px solid var(--border); }
.toc-list li:last-child { border-bottom: none; }

.toc-list a {
	display: block;
	padding: 12px 0;
	font-size: .9rem;
	font-weight: 600;
	color: var(--blue);
	line-height: 1.45;
	transition: color .2s, padding-left .15s;
	font-family: 'Inter', sans-serif;
}

.toc-list a:hover { color: var(--teal-dark); }

.toc-list .current-chapter > a,
.toc-list a.current-chapter {
	color: var(--teal-dark);
	padding-left: 10px;
	border-left: 3px solid var(--teal);
	margin-left: -3px;
}

.book-content {
	flex: 1;
	padding: 52px 72px 80px 64px;
	max-width: calc(var(--content-max) + 136px);
}

/* ─────────────────────────────────────────────
   FEJEZET
───────────────────────────────────────────── */
.chapter-header { margin-bottom: 40px; }

.chapter-number {
	font-family: 'Inter', sans-serif;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--teal-dark);
	margin-bottom: 8px;
}

.chapter-title {
	font-family: 'Poppins', sans-serif;
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	font-weight: 700;
	color: var(--text);
	line-height: 1.2;
	margin-bottom: 10px;
}

.chapter-title-bar {
	width: 48px;
	height: 3px;
	background: var(--teal);
	border-radius: 2px;
}

.chapter-body { max-width: var(--content-max); }

.chapter-body p { margin-bottom: 1.4em; text-align: justify; hyphens: auto; }

.chapter-body p:first-of-type::first-letter {
	font-family: 'Poppins', sans-serif;
	font-size: 3.5em;
	font-weight: 700;
	color: var(--blue);
	float: left;
	line-height: .8;
	margin: 4px 8px 0 0;
}

.chapter-body h2,
.chapter-body h3,
.chapter-body h4 {
	font-family: 'Poppins', sans-serif;
	color: var(--text);
	margin: 2em 0 .75em;
	line-height: 1.3;
}

.chapter-body h2 { font-size: 1.5rem; }
.chapter-body h3 { font-size: 1.25rem; }

.chapter-body blockquote {
	border-left: 3px solid var(--teal);
	margin: 2em 0;
	padding: .5em 0 .5em 24px;
	color: var(--muted);
	font-style: italic;
}

.chapter-body ul,
.chapter-body ol { margin: 1em 0 1.4em 1.5em; }
.chapter-body li { margin-bottom: .4em; }

/* ─────────────────────────────────────────────
   FEJEZET NAV
───────────────────────────────────────────── */
.chapter-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 64px;
	padding-top: 28px;
	border-top: 1px solid var(--border);
	max-width: var(--content-max);
}

.chapter-nav__btn {
	display: inline-block;
	border: 1.5px solid var(--blue);
	color: var(--blue);
	font-family: 'Inter', sans-serif;
	font-size: .88rem;
	font-weight: 600;
	padding: 10px 22px;
	border-radius: 3px;
	transition: background .2s, color .2s;
}

.chapter-nav__btn:hover { background: var(--blue); color: #fff; }

.chapter-nav__btn--disabled,
.chapter-nav__btn[aria-disabled="true"] { opacity: .25; pointer-events: none; }

/* ─────────────────────────────────────────────
   FŐOLDAL / EGYSZERŰ OLDALAK
───────────────────────────────────────────── */
.page-wrap {
	max-width: var(--wrap-max);
	margin: 0 auto;
	padding: 0px;
}

.section { padding: 80px 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }

.section-tag {
	font-family: 'Inter', sans-serif;
	font-size: .74rem; font-weight: 600;
	letter-spacing: .16em; text-transform: uppercase;
	color: var(--teal-dark); margin-bottom: 10px;
}

.section-title {
	font-family: 'Poppins', sans-serif;
	font-size: clamp(1.7rem, 3vw, 2.2rem);
	font-weight: 700;
	color: var(--text);
	line-height: 1.2; margin-bottom: 12px;
}

.section-bar {
	width: 48px; height: 3px;
	background: var(--teal); border-radius: 2px;
	margin-bottom: 40px;
}

/* Bio */
.bio-layout { display: flex; gap: 52px; align-items: flex-start; }

.bio-photo {
	flex-shrink: 0; width: 185px; height: 225px;
	border-radius: 5px; overflow: hidden;
	background: #c8dfe0;
	box-shadow: 0 8px 24px rgba(65,98,133,.15);
}

.bio-photo img { width: 100%; height: 100%; object-fit: cover; }

.bio-photo-placeholder {
	width: 100%; height: 100%;
	display: flex; flex-direction: column;
	align-items: center; justify-content: center; gap: 10px;
}

.bio-photo-placeholder .avatar-icon {
	width: 60px; height: 60px; border-radius: 50%; background: #a8cdd0;
}

.bio-photo-placeholder span {
	font-size: .78rem; color: #7aacb0; font-family: 'Inter', sans-serif;
}

.bio-text { flex: 1; }

.bio-name {
	font-family: 'Poppins', sans-serif;
	font-size: 1.3rem; font-weight: 700;
	color: var(--text); margin-bottom: 4px;
}

.bio-role {
	font-family: 'Inter', sans-serif;
	font-size: .78rem; font-weight: 600;
	letter-spacing: .1em; text-transform: uppercase;
	color: var(--teal-dark); margin-bottom: 20px;
}

.bio-text p { margin-bottom: 1.2em; line-height: 1.82; color: #2a4048; }

.bio-link {
	display: inline-flex; align-items: center; gap: 6px;
	margin-top: 10px;
	font-family: 'Inter', sans-serif;
	font-size: .84rem; font-weight: 600;
	color: var(--blue);
	border-bottom: 1.5px solid var(--teal); padding-bottom: 2px;
}

.bio-link:hover { color: var(--teal-dark); }

/* Ajánló */
.quote-block {
	border-left: 4px solid var(--teal);
	padding: 28px 40px;
	background: #eef6f7;
	border-radius: 0 6px 6px 0;
	max-width: 780px;
}

.quote-mark {
	font-family: 'Poppins', sans-serif;
	font-size: 5rem; line-height: .5;
	color: var(--teal); opacity: .65;
	margin-bottom: 20px; display: block;
}

.quote-text {
	font-family: 'Poppins', sans-serif;
	font-size: 1.1rem; line-height: 1.85;
	font-style: italic; color: var(--text); margin-bottom: 24px;
}

.quote-author {
	font-family: 'Inter', sans-serif;
	font-size: .88rem; font-weight: 600;
	color: var(--blue); letter-spacing: .04em;
}

.quote-author span {
	display: block; font-weight: 400;
	color: var(--muted); font-size: .8rem; margin-top: 3px;
}

/* CTA */
.cta-block {
	background: linear-gradient(120deg, #416285 0%, #5aacb2 100%);
	border-radius: 8px; padding: 52px 60px;
	display: flex; align-items: center;
	justify-content: space-between; gap: 48px;
	position: relative; overflow: hidden;
}

.cta-block::before {
	content: ''; position: absolute; inset: 0;
	background: radial-gradient(ellipse at 90% 50%, rgba(255,255,255,.08) 0%, transparent 55%);
	pointer-events: none;
}

.cta-text { position: relative; z-index: 1; }

.cta-title {
	font-family: 'Poppins', sans-serif;
	font-size: 1.8rem; font-weight: 700;
	color: #fff; margin-bottom: 8px; line-height: 1.15;
}

.cta-sub { font-size: .95rem; color: rgba(255,255,255,.7); font-style: italic; }

.cta-buttons {
	display: flex; flex-direction: column;
	gap: 12px; flex-shrink: 0;
	position: relative; z-index: 1;
}

.cta-btn {
	display: inline-flex; align-items: center;
	justify-content: center; gap: 10px;
	padding: 13px 30px; border-radius: 4px;
	font-family: 'Inter', sans-serif;
	font-size: .88rem; font-weight: 600;
	transition: all .2s; white-space: nowrap;
	text-decoration: none; letter-spacing: .03em;
}

.cta-btn-pdf {
	border: 1.5px solid rgba(255,255,255,.45);
	color: #fff; background: transparent;
}

.cta-btn-pdf:hover {
	background: rgba(255,255,255,.14); color: #fff;
	border-color: rgba(255,255,255,.75);
}

.cta-btn-epub { background: #fff; color: var(--blue); border: 1.5px solid #fff; }
.cta-btn-epub:hover { background: var(--cream); color: var(--blue); }

.cta-online {
	margin-top: 28px; text-align: center;
	font-family: 'Inter', sans-serif;
	font-size: .84rem; color: var(--muted);
}

.cta-online a {
	color: var(--teal-dark); font-weight: 600;
	border-bottom: 1px solid var(--teal); padding-bottom: 1px;
}

.cta-online a:hover { color: var(--blue); }

.cta-content{
	color: #fff;
	font-family: 'Inter', sans-serif;
	font-size: 1rem; padding: 22px 12px 22px 0;
}

.cta-content a{color: var(--border); text-decoration: underline;}

/* Gutenberg tartalom (page.php) */
.page-body p { margin-bottom: 1.4em; line-height: 1.85; }
.page-body h2, .page-body h3 {
	font-family: 'Poppins', sans-serif;
	color: var(--text); margin: 2em 0 .75em;
}

/* ─────────────────────────────────────────────
   LÁBLÉC
───────────────────────────────────────────── */
.site-footer {
	background: var(--blue-dark);
	color: rgba(255,255,255,.38);
	font-family: 'Inter', sans-serif;
	font-size: .76rem; padding: 22px 48px;
	text-align: center; letter-spacing: .06em;
}

/* ─────────────────────────────────────────────
   GUTENBERG SZERKESZTŐ
───────────────────────────────────────────── */
.wp-block-image { margin: 2em 0; }

/* ─────────────────────────────────────────────
   RESZPONZÍV
───────────────────────────────────────────── */
@media (max-width: 900px) {
	.site-hero { min-height: auto; }
	.site-hero__inner { padding: 52px 32px 48px; gap: 36px; }
	.site-hero__cover img { width: 200px; }
	.site-nav__inner { padding: 0 32px; }
	.page-wrap { padding: 0 32px; }
	.cta-block { padding: 40px 36px; gap: 32px; }
	.site-footer { padding: 20px 32px; }
}

@media (max-width: 680px) {
	.site-hero__inner { flex-direction: column; padding: 40px 20px 44px; }
	.site-hero__cover { display: none; }
	.site-hero__title { font-size: 2.6rem; }
	.site-nav__inner { padding: 0 12px; flex-wrap: wrap; }
	.site-nav a { padding: 12px 14px; font-size: .76rem; }
	.page-wrap { padding: 32px 20px; }
	/*.section { padding: 56px 0; }*/
	.bio-layout { flex-direction: column; gap: 28px; }
	.bio-photo { width: 150px; height: 185px; }
	.cta-block { flex-direction: column; text-align: center; padding: 36px 24px; gap: 28px; }
	.cta-buttons { flex-direction: row; justify-content: center; }
	.quote-block { padding: 22px 24px; }
	.site-footer { padding: 18px 20px; }
	.book-layout { flex-direction: column; }
	.book-sidebar {
		position: static; height: auto; width: 100%;
		border-right: none; border-bottom: 1px solid var(--border);
		padding: 24px 20px;
	}
	.book-content { padding: 32px 20px 60px; }
	.chapter-nav { flex-direction: column; gap: 12px; }
	.chapter-nav__btn { width: 100%; text-align: center; }
}
