/*
Theme Name: GeneratePress Masal
Theme URI: https://generatepress.com
Description: GeneratePress için masal sitelerine özel alt tema (child theme). Sıcak masal renkleri, okuması rahat yazı tipleri, okuma süresi, okuma çubuğu, yazı boyutu ayarı ve gece modu içerir.
Author: Masal Sitesi
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: generatepress-masal
*/

/* ==========================================================
   1. RENK VE DEĞİŞKENLER
   ========================================================== */
:root {
	--contrast: #3b2f4a;
	--contrast-2: #5b4b72;
	--contrast-3: #8e7fa3;
	--base: #fffaf0;
	--base-2: #fdf3e1;
	--base-3: #ffffff;
	--accent: #7b4fb8;
	--masal-gold: #e0a93b;
	--masal-rose: #e98aa5;
	--masal-radius: 18px;
	--masal-shadow: 0 8px 24px rgba(91, 75, 114, .12);
	--masal-font-head: "Baloo 2", "Nunito", system-ui, sans-serif;
	--masal-font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ==========================================================
   2. GENEL GÖRÜNÜM
   ========================================================== */
body {
	font-family: var(--masal-font-body);
	background-color: var(--base);
	color: var(--contrast);
	line-height: 1.8;
	background-image:
		radial-gradient(circle at 12% 8%, rgba(224, 169, 59, .10) 0 2px, transparent 3px),
		radial-gradient(circle at 78% 22%, rgba(233, 138, 165, .12) 0 2px, transparent 3px),
		radial-gradient(circle at 40% 70%, rgba(123, 79, 184, .08) 0 2px, transparent 3px);
	background-size: 220px 220px;
}

h1, h2, h3, h4, h5, h6,
.main-title, .entry-title {
	font-family: var(--masal-font-head);
	font-weight: 700;
	letter-spacing: .2px;
	color: var(--accent);
}

a { color: var(--accent); }
a:hover, a:focus { color: var(--masal-rose); }

/* Site başlığı */
.site-header { background: linear-gradient(135deg, #fff4dc 0%, #f6e8ff 100%); }
.main-title { font-size: 2rem; }
.main-title a, .main-title a:hover { color: var(--accent); }
.site-description { color: var(--contrast-2); font-style: italic; }

/* Menü */
.main-navigation, .main-navigation ul ul { background: var(--accent); }
.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items { color: #fff; font-weight: 600; }
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a {
	background: rgba(255, 255, 255, .18);
	color: #fff;
}

/* ==========================================================
   3. MASAL KARTLARI (arşiv / ana sayfa)
   ========================================================== */
.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.one-container .container {
	background: var(--base-3);
	border-radius: var(--masal-radius);
	box-shadow: var(--masal-shadow);
}

.blog .post, .archive .post, .search .post {
	transition: transform .2s ease, box-shadow .2s ease;
}
.blog .inside-article:hover,
.archive .inside-article:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 30px rgba(91, 75, 114, .18);
}

.post-image img, .featured-image img {
	border-radius: calc(var(--masal-radius) - 4px);
}

.entry-title a { color: var(--accent); }
.entry-title a:hover { color: var(--masal-rose); }

.read-more, a.read-more {
	display: inline-block;
	margin-top: .4rem;
	padding: .35em 1em;
	border-radius: 999px;
	background: var(--masal-gold);
	color: #3b2f4a;
	font-weight: 700;
	text-decoration: none;
}
.read-more:hover { background: var(--masal-rose); color: #fff; }

/* Kategori / etiket rozetleri */
.cat-links a, .tags-links a {
	display: inline-block;
	margin: 0 .25em .25em 0;
	padding: .1em .7em;
	border-radius: 999px;
	background: #f1e6ff;
	color: var(--accent);
	font-size: .85em;
	text-decoration: none;
}
.cat-links a:hover, .tags-links a:hover { background: var(--accent); color: #fff; }

/* ==========================================================
   4. TEKİL MASAL SAYFASI (okuma deneyimi)
   ========================================================== */
.single .entry-content {
	font-size: var(--masal-reading-size, 1.2rem);
	line-height: 1.95;
	max-width: 42em;
	margin-inline: auto;
}
.single .entry-content p { margin-bottom: 1.4em; }

/* İlk paragrafın ilk harfi: masal kitabı süsü */
.single .entry-content > p:first-of-type::first-letter {
	font-family: var(--masal-font-head);
	font-size: 3.4em;
	line-height: .8;
	float: left;
	padding: .08em .12em 0 0;
	color: var(--masal-gold);
	font-weight: 800;
}

.single .entry-title { text-align: center; }
.single .entry-title::after {
	content: "✦ ✧ ✦";
	display: block;
	margin-top: .3em;
	font-size: .55em;
	letter-spacing: .4em;
	color: var(--masal-gold);
}

.masal-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .5em 1.2em;
	justify-content: center;
	margin: 0 0 1.5rem;
	font-size: .95rem;
	color: var(--contrast-2);
}
.masal-meta span::before { margin-right: .35em; }
.masal-meta .masal-reading-time::before { content: "⏱"; }
.masal-meta .masal-date::before { content: "📅"; }

blockquote {
	border-left: 4px solid var(--masal-gold);
	background: var(--base-2);
	padding: .8em 1.2em;
	border-radius: 0 var(--masal-radius) var(--masal-radius) 0;
	font-style: italic;
}

hr, .wp-block-separator {
	border: 0;
	height: 1.5em;
	background: none;
	text-align: center;
	overflow: visible;
}
hr::before, .wp-block-separator::before {
	content: "✦ ✦ ✦";
	color: var(--masal-gold);
	letter-spacing: .6em;
}

/* Önceki / sonraki masal */
.post-navigation .nav-previous a, .post-navigation .nav-next a {
	font-weight: 700;
}

/* ==========================================================
   5. OKUMA ÇUBUĞU VE ARAÇ ÇUBUĞU
   ========================================================== */
#masal-progress {
	position: fixed;
	top: 0; left: 0;
	height: 5px;
	width: 0;
	z-index: 99999;
	background: linear-gradient(90deg, var(--masal-gold), var(--masal-rose), var(--accent));
	transition: width .1s linear;
}

#masal-tools {
	position: fixed;
	right: 14px;
	bottom: 14px;
	z-index: 9999;
	display: flex;
	gap: 6px;
	padding: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	box-shadow: var(--masal-shadow);
}
#masal-tools button {
	appearance: none;
	border: 0;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font: 700 1rem var(--masal-font-body);
	cursor: pointer;
}
#masal-tools button:hover { background: var(--masal-rose); }
#masal-tools button:focus-visible { outline: 3px solid var(--masal-gold); outline-offset: 2px; }

/* ==========================================================
   6. GECE MODU (yatmadan önce okuma)
   ========================================================== */
body.masal-night {
	--contrast: #ece4f7;
	--contrast-2: #cbbfe0;
	--contrast-3: #a597c0;
	--base: #1c1730;
	--base-2: #2a2342;
	--base-3: #241e3b;
	--accent: #c8a8ff;
	--masal-shadow: 0 8px 24px rgba(0, 0, 0, .4);
	background-color: #1c1730;
	color: #ece4f7;
}
body.masal-night .site-header,
body.masal-night .inside-article,
body.masal-night .comments-area,
body.masal-night .page-header,
body.masal-night .widget,
body.masal-night .site-footer,
body.masal-night .site-info,
body.masal-night .container,
body.masal-night .sidebar .widget {
	background: #241e3b !important;
	color: #ece4f7;
}
body.masal-night .site-header { background: linear-gradient(135deg, #2a2342, #1c1730) !important; }
body.masal-night .entry-content, body.masal-night p { color: #ece4f7; }
body.masal-night a { color: #c8a8ff; }
body.masal-night .main-title a, body.masal-night .entry-title a { color: #ffd98a; }
body.masal-night h1, body.masal-night h2, body.masal-night h3,
body.masal-night h4, body.masal-night .entry-title { color: #ffd98a; }
body.masal-night .cat-links a, body.masal-night .tags-links a { background: #3a3160; color: #e6d6ff; }
body.masal-night #masal-tools { background: rgba(36, 30, 59, .95); }
body.masal-night input, body.masal-night textarea {
	background: #1c1730; color: #ece4f7; border-color: #4a3f73;
}

/* ==========================================================
   7. MOBİL
   ========================================================== */
@media (max-width: 768px) {
	.single .entry-content { font-size: var(--masal-reading-size, 1.1rem); }
	.main-title { font-size: 1.6rem; }
	#masal-tools { right: 8px; bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

@media print {
	#masal-progress, #masal-tools { display: none !important; }
}
