/*
Theme Name: Blocksy Child Masal
Template: blocksy
Description: Masal.web.tr icin Blocksy child temasi - renkli, cocuksu tasarim
Version: 1.2.1
Text Domain: blocksy-child-masal
*/

:root {
	--m-pink: #ff6fa8;
	--m-purple: #8b5cf6;
	--m-blue: #38bdf8;
	--m-yellow: #ffd23f;
	--m-green: #4ade80;
	--m-orange: #ff9f43;
	--m-ink: #3b2a5a;
	--m-cream: #fff7e8;
	--m-head: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
	--m-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Arka plan ---------- */
body {
	font-family: var(--m-body) !important;
	color: var(--m-ink);
	background-color: var(--m-cream) !important;
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cpath d='M30 12l4 9 10 1-7.5 6.5 2.5 9.5-9-5-9 5 2.5-9.5L16 22l10-1z' fill='%23ffd23f' fill-opacity='.55'/%3E%3Ccircle cx='130' cy='40' r='6' fill='%23ff6fa8' fill-opacity='.3'/%3E%3Ccircle cx='75' cy='130' r='5' fill='%2338bdf8' fill-opacity='.35'/%3E%3Cpath d='M135 110l3 6 7 1-5 4.5 1.5 6.5-6.5-3.5-6.5 3.5 1.5-6.5-5-4.5 7-1z' fill='%238b5cf6' fill-opacity='.3'/%3E%3Ccircle cx='22' cy='150' r='4' fill='%234ade80' fill-opacity='.45'/%3E%3Ccircle cx='95' cy='70' r='3' fill='%23ff9f43' fill-opacity='.45'/%3E%3C/svg%3E"),
		radial-gradient(circle at 8% 18%, rgba(255, 111, 168, .16) 0 140px, transparent 141px),
		radial-gradient(circle at 92% 12%, rgba(56, 189, 248, .18) 0 180px, transparent 181px),
		radial-gradient(circle at 88% 75%, rgba(255, 210, 63, .22) 0 160px, transparent 161px),
		radial-gradient(circle at 10% 88%, rgba(74, 222, 128, .16) 0 200px, transparent 201px) !important;
}

#main-container,
.site-main,
.hero-section {
	background: transparent !important;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.site-title {
	font-family: var(--m-head) !important;
	color: var(--m-ink);
	letter-spacing: .2px;
}

a { transition: color .2s ease; }

/* ---------- Header ---------- */
#header [data-row="top"],
#header [data-id="button"] {
	display: none !important;
}

#header [data-row="middle"] {
	position: relative;
	background: linear-gradient(100deg, #8b5cf6 0%, #ff6fa8 55%, #ff9f43 100%) !important;
	border-radius: 0 0 36px 36px;
	box-shadow: 0 8px 0 rgba(59, 42, 90, .10), 0 14px 30px rgba(139, 92, 246, .25);
	overflow: hidden;
	--theme-icon-color: #fff;
	--theme-icon-hover-color: var(--m-yellow);
}

#header [data-row="middle"]::before {
	content: "✦  ★  ✧  ★  ✦  ✧  ★  ✦";
	position: absolute;
	left: 0; right: 0; top: 6px;
	text-align: center;
	color: rgba(255, 255, 255, .35);
	font-size: 14px;
	letter-spacing: 60px;
	pointer-events: none;
	animation: masal-twinkle 3s ease-in-out infinite;
}

@keyframes masal-twinkle {
	0%, 100% { opacity: .4; }
	50% { opacity: 1; }
}

#header .site-title a,
#header .site-title {
	color: #fff !important;
	font-size: 30px !important;
	text-shadow: 0 3px 0 rgba(59, 42, 90, .2);
}

/* Logo varken site basligini tekrar gosterme */
#header .site-branding:has(.site-logo-container) .site-title-container,
#header .site-branding:has(.site-logo-container) .site-title {
	display: none !important;
}

#header .site-logo-container img,
#header .site-title {
	transition: transform .3s ease;
}
#header .site-branding:hover img,
#header .site-branding:hover .site-title {
	transform: rotate(-4deg) scale(1.06);
}

#header .menu > li > .ct-menu-link {
	color: #fff !important;
	font-family: var(--m-head) !important;
	font-weight: 600 !important;
	font-size: 17px !important;
	height: auto !important;
	padding: 8px 16px !important;
	margin: 0 3px;
	border-radius: 999px;
	transition: background .2s ease, transform .2s ease;
}

#header .menu > li > .ct-menu-link:hover,
#header .menu > li.current-menu-item > .ct-menu-link {
	background: rgba(255, 255, 255, .25);
	transform: translateY(-2px);
}

#header .menu > li.current-menu-item > .ct-menu-link {
	background: #fff;
	color: var(--m-purple) !important;
}

#header svg { fill: #fff; }

/* Mobil menu paneli */
#offcanvas .ct-panel-inner {
	background: linear-gradient(160deg, #8b5cf6, #ff6fa8) !important;
}
#offcanvas .ct-menu-link {
	color: #fff !important;
	font-family: var(--m-head) !important;
	font-size: 20px !important;
}

/* ---------- Sayfa baslik alani ---------- */
.hero-section .page-title {
	background: linear-gradient(90deg, var(--m-purple), var(--m-pink), var(--m-orange));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	font-size: clamp(30px, 5vw, 48px) !important;
}

/* ---------- Masal kartlari ---------- */
.entries .entry-card {
	background: #fff !important;
	border-radius: 26px !important;
	overflow: hidden;
	border: 0;
	border-top: 8px solid var(--m-pink);
	box-shadow: 0 8px 0 rgba(139, 92, 246, .12), 0 14px 30px rgba(59, 42, 90, .08) !important;
	transition: transform .25s ease, box-shadow .25s ease;
}

.entries .entry-card:nth-child(4n+2) { border-top-color: var(--m-blue); }
.entries .entry-card:nth-child(4n+3) { border-top-color: var(--m-yellow); }
.entries .entry-card:nth-child(4n+4) { border-top-color: var(--m-green); }

.entries .entry-card:hover {
	transform: translateY(-8px) rotate(-.6deg);
	box-shadow: 0 14px 0 rgba(255, 111, 168, .22), 0 22px 40px rgba(59, 42, 90, .14) !important;
}

.entries .entry-card .ct-media-container {
	border-radius: 0 !important;
	overflow: hidden;
}
.entries .entry-card .ct-media-container img {
	transition: transform .4s ease;
}
.entries .entry-card:hover .ct-media-container img {
	transform: scale(1.07);
}

.entries .entry-card .entry-title a {
	color: var(--m-ink) !important;
	font-weight: 600;
}
.entries .entry-card .entry-title a:hover {
	color: var(--m-pink) !important;
}

/* Devamini oku butonu */
.entries .entry-card .masal-read-more {
	align-self: flex-start;
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 22px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--m-pink), var(--m-orange));
	color: #fff !important;
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 16px;
	text-decoration: none;
	box-shadow: 0 5px 0 rgba(59, 42, 90, .15);
	transition: transform .2s ease, box-shadow .2s ease;
}
.entries .entry-card:nth-child(4n+2) .masal-read-more { background: linear-gradient(90deg, #38bdf8, #8b5cf6); }
.entries .entry-card:nth-child(4n+3) .masal-read-more { background: linear-gradient(90deg, #ff9f43, #ffd23f); color: #3b2a5a !important; }
.entries .entry-card:nth-child(4n+4) .masal-read-more { background: linear-gradient(90deg, #4ade80, #38bdf8); }
.entries .entry-card .masal-read-more:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 0 rgba(59, 42, 90, .15);
}
.entries .entry-card .masal-read-more span {
	transition: transform .2s ease;
}
.entries .entry-card .masal-read-more:hover span {
	transform: translateX(4px);
}

.entry-meta .meta-categories a,
.entry-meta [data-type="pill"] a {
	display: inline-block;
	background: var(--m-yellow) !important;
	color: var(--m-ink) !important;
	border-radius: 999px !important;
	padding: 3px 12px !important;
	font-weight: 800;
	font-size: 12px;
}

.entry-button,
.ct-button,
.wp-element-button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
	background: linear-gradient(90deg, var(--m-pink), var(--m-orange)) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-family: var(--m-head) !important;
	font-weight: 600 !important;
	box-shadow: 0 5px 0 rgba(59, 42, 90, .15);
	transition: transform .2s ease;
}
.entry-button:hover,
.ct-button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-2px);
}

/* Sayfalama */
.ct-pagination a,
.ct-pagination span.page-numbers {
	background: #fff;
	border-radius: 50% !important;
	font-family: var(--m-head);
	font-weight: 600;
	box-shadow: 0 4px 0 rgba(139, 92, 246, .15);
}
.ct-pagination .current {
	background: var(--m-purple) !important;
	color: #fff !important;
}

/* ---------- Tekil masal sayfasi ---------- */
.single-post .site-main article.post {
	background: #fff;
	border-radius: 30px;
	padding: clamp(20px, 4vw, 50px);
	border-top: 10px solid var(--m-purple);
	box-shadow: 0 10px 0 rgba(139, 92, 246, .12), 0 20px 40px rgba(59, 42, 90, .08);
}

.single-post .entry-content {
	font-size: 19px;
	line-height: 1.85;
}

.single-post .entry-content h2,
.single-post .entry-content h3 {
	color: var(--m-purple);
}

.single-post .entry-content img {
	border-radius: 22px;
}

/* Kenar cubugu */
.ct-sidebar .ct-widget {
	background: #fff;
	border-radius: 22px;
	padding: 22px;
	box-shadow: 0 6px 0 rgba(139, 92, 246, .1);
}
.ct-sidebar .widget-title {
	font-family: var(--m-head) !important;
	color: var(--m-pink) !important;
}

/* ---------- Footer ---------- */
#footer.ct-footer {
	display: none !important;
}

.masal-footer {
	position: relative;
	margin-top: 80px;
	color: #f3ecff;
	font-family: var(--m-body);
	background-color: var(--m-ink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cpath d='M25 10l3 6 7 1-5 4.5 1.5 6.5-6.5-3.5-6.5 3.5 1.5-6.5-5-4.5 7-1z' fill='%23ffd23f' fill-opacity='.35'/%3E%3Ccircle cx='100' cy='45' r='2.5' fill='%23fff' fill-opacity='.4'/%3E%3Ccircle cx='60' cy='110' r='2' fill='%23fff' fill-opacity='.35'/%3E%3C/svg%3E");
}

.masal-footer-wave {
	position: absolute;
	left: 0; right: 0;
	top: -59px;
	height: 60px;
	line-height: 0;
}
.masal-footer-wave svg {
	width: 100%;
	height: 100%;
	fill: var(--m-ink);
}

.masal-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 24px 30px;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 40px;
}

.masal-footer .mf-title {
	font-family: var(--m-head);
	color: var(--m-yellow);
	font-size: 20px;
	margin: 0 0 14px;
}

.masal-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.masal-footer li { margin: 0 0 8px; }

.masal-footer a {
	color: #f3ecff;
	text-decoration: none;
}
.masal-footer a:hover {
	color: var(--m-pink);
}

.masal-footer .mf-logo {
	display: inline-block;
	font-family: var(--m-head);
	font-size: 30px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 10px;
	animation: masal-float 3.5s ease-in-out infinite;
}

@keyframes masal-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

.masal-footer-bottom {
	text-align: center;
	padding: 18px 24px;
	font-size: 14px;
	background: rgba(0, 0, 0, .18);
	color: #d9ccf5;
}

@media (max-width: 800px) {
	.masal-footer-inner {
		grid-template-columns: 1fr;
		gap: 26px;
		text-align: center;
	}
	#header [data-row="middle"] {
		border-radius: 0 0 24px 24px;
	}
}

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