/*
Theme Name: Masallar Oku
Theme URI: https://masallaroku.com.tr
Author: Masallar Oku
Author URI: https://masallaroku.com.tr
Description: MasallarOku.com.tr için profesyonel masal portalı teması. Uyku masalları, Keloğlan masalları, prenses masalları, çocuk hikayeleri ve eğitici masallar için Disney benzeri, çocuk dostu, yuvarlak kartlı, mobil öncelikli tasarım. SEO, Google Discover, sonsuz kaydırma ve güçlü dahili linkleme odaklıdır. WordPress 6.5+ ve PHP 8.0+ uyumlu.
Version: 1.0.0
Requires at least: 5.5
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: masallaroku
Tags: education, entertainment, featured-images, threaded-comments, translation-ready, custom-colors, custom-menu, custom-logo, flexible-header, full-width-template, rtl-language-support, theme-options, block-styles, wide-blocks
*/

/* ============================================================
   MASALLAR OKU - Reset & Root Variables
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Kid-friendly Disney-like palette (warm, no blue/indigo) */
    --ma-coral: #ff6b8b;
    --ma-coral-dark: #e8526f;
    --ma-peach: #ffb088;
    --ma-gold: #ffc93c;
    --ma-gold-dark: #f5b017;
    --ma-mint: #5fd4a8;
    --ma-mint-dark: #38b489;
    --ma-grape: #9d4edd;
    --ma-grape-dark: #7b2cbf;
    --ma-sky: #8ecae6;
    --ma-cream: #fff8f0;
    --ma-cream-2: #fff1e6;
    --ma-ink: #2d2454;
    --ma-ink-soft: #5b5577;
    --ma-line: #f0e6da;
    --ma-bg: #fffaf3;
    --ma-card: #ffffff;
    --ma-shadow: 0 10px 30px rgba(157, 78, 221, 0.10);
    --ma-shadow-hover: 0 18px 45px rgba(157, 78, 221, 0.18);
    --ma-radius: 22px;
    --ma-radius-lg: 32px;
    --ma-radius-sm: 14px;
    --ma-gap: 24px;
    --ma-container: 1240px;
    --ma-ff-head: 'Baloo 2', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ma-ff-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--ma-ff-body);
    background: var(--ma-bg);
    color: var(--ma-ink);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sticky footer: main grows, footer sits at bottom */
.main-content {
    flex: 1 0 auto;
    width: 100%;
}

a {
    color: var(--ma-grape-dark);
    text-decoration: none;
    transition: color .2s ease;
}

a:hover {
    color: var(--ma-coral-dark);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ma-ff-head);
    color: var(--ma-ink);
    line-height: 1.2;
    font-weight: 800;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.ma-container {
    width: 100%;
    max-width: var(--ma-container);
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.ma-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    background: var(--ma-grape);
    color: #fff;
    padding: 12px 20px;
    border-radius: 0 0 12px 0;
    font-weight: 700;
}

.ma-skip-link:focus {
    left: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #fff 0%, var(--ma-cream) 100%);
    border-bottom: 3px solid var(--ma-cream-2);
    box-shadow: 0 4px 20px rgba(157, 78, 221, 0.06);
}

.header-top {
    background: linear-gradient(90deg, var(--ma-grape) 0%, var(--ma-coral) 100%);
    color: #fff;
    padding: 7px 0;
    font-size: 13px;
    text-align: center;
    font-weight: 600;
}

.header-top a { color: #fff; text-decoration: underline; }

.header-main {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ma-gold) 0%, var(--ma-coral) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--ma-ff-head);
    font-weight: 800;
    font-size: 24px;
    box-shadow: 0 6px 16px rgba(255, 107, 139, 0.35);
    flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.1; }

.logo-text .site-name {
    font-family: var(--ma-ff-head);
    font-weight: 800;
    font-size: 22px;
    color: var(--ma-ink);
}

.logo-text .site-tagline {
    font-size: 11px;
    color: var(--ma-ink-soft);
    font-weight: 600;
}

.header-search {
    flex: 1;
    max-width: 460px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 12px 48px 12px 20px;
    border: 2px solid var(--ma-line);
    border-radius: 999px;
    background: #fff;
    font-family: var(--ma-ff-body);
    font-size: 14px;
    color: var(--ma-ink);
    transition: border-color .2s, box-shadow .2s;
}

.header-search input:focus {
    outline: none;
    border-color: var(--ma-mint);
    box-shadow: 0 0 0 4px rgba(95, 212, 168, 0.15);
}

.header-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ma-mint) 0%, var(--ma-mint-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.header-search button svg { width: 18px; height: 18px; }

.header-cta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-cta .ma-btn {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 999px;
}

/* Category Navigation */
.category-nav {
    background: #fff;
    border-top: 1px solid var(--ma-line);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar { display: none; }

.category-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
    padding: 8px 0;
    white-space: nowrap;
}

.category-nav li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    color: var(--ma-ink-soft);
    transition: all .2s ease;
}

.category-nav li a:hover,
.category-nav li.current-menu-item > a,
.category-nav li a.active {
    background: linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-grape) 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(157, 78, 221, 0.25);
}

.category-nav .ma-cat-emoji { font-size: 16px; }

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--ma-cream-2);
    color: var(--ma-ink);
    align-items: center;
    justify-content: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.ma-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    font-family: var(--ma-ff-head);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    cursor: pointer;
    border: none;
}

.ma-btn-primary {
    background: linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-grape) 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 107, 139, 0.35);
}

.ma-btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(255, 107, 139, 0.45);
}

.ma-btn-soft {
    background: var(--ma-cream-2);
    color: var(--ma-ink);
}

.ma-btn-soft:hover { background: var(--ma-peach); color: var(--ma-ink); }

.ma-btn-ghost {
    background: transparent;
    color: var(--ma-grape-dark);
    border: 2px solid var(--ma-line);
}

.ma-btn-ghost:hover { border-color: var(--ma-grape); color: var(--ma-grape-dark); }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.ma-section { padding: 36px 0; }

.ma-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ma-section-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    font-weight: 800;
    color: var(--ma-ink);
    position: relative;
}

.ma-section-title .ma-title-emoji {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ma-gold) 0%, var(--ma-coral) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 14px rgba(255, 201, 60, 0.35);
}

.ma-section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 60px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ma-coral) 0%, var(--ma-gold) 100%);
}

.ma-section-head .ma-section-link {
    font-family: var(--ma-ff-head);
    font-weight: 700;
    color: var(--ma-grape-dark);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ma-section-head .ma-section-link:hover { color: var(--ma-coral-dark); }

/* ============================================================
   HERO SECTION (Homepage)
   ============================================================ */
.hero-section {
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 201, 60, 0.18) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(157, 78, 221, 0.15) 0%, transparent 45%),
        linear-gradient(135deg, var(--ma-cream) 0%, var(--ma-cream-2) 100%);
    padding: 56px 0 48px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.hero-section::before,
.hero-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.5;
}

.hero-section::before {
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(95, 212, 168, 0.25), transparent 70%);
    top: -60px; left: -60px;
}

.hero-section::after {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(255, 176, 136, 0.25), transparent 70%);
    bottom: -80px; right: -80px;
}

.hero-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--ma-grape-dark);
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: var(--ma-shadow);
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(38px, 7vw, 64px);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-grape) 60%, var(--ma-grape-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: clamp(15px, 2.4vw, 19px);
    color: var(--ma-ink-soft);
    max-width: 640px;
    margin: 0 auto 28px;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat .num {
    font-family: var(--ma-ff-head);
    font-size: 28px;
    font-weight: 800;
    color: var(--ma-grape-dark);
    display: block;
}

.hero-stat .label {
    font-size: 13px;
    color: var(--ma-ink-soft);
    font-weight: 600;
}

/* ============================================================
   CATEGORY CARDS (Big rounded boxes)
   ============================================================ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 26px 18px 22px;
    border-radius: var(--ma-radius);
    background: var(--ma-card);
    box-shadow: var(--ma-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
    overflow: hidden;
    text-decoration: none;
    color: var(--ma-ink);
}

.cat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--cat-grad, linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-peach) 100%));
    opacity: 0.08;
    transition: opacity .2s ease;
}

.cat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ma-shadow-hover);
    color: var(--ma-ink);
}

.cat-card:hover::before { opacity: 0.16; }

.cat-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    background: var(--cat-grad, linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-peach) 100%));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin-bottom: 14px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.10);
    position: relative;
    z-index: 1;
}

.cat-card-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--ma-ink);
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.cat-card-count {
    font-size: 12px;
    color: var(--ma-ink-soft);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ============================================================
   MASAL CARDS (used in grids)
   ============================================================ */
.masal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.masal-card {
    background: var(--ma-card);
    border-radius: var(--ma-radius);
    overflow: hidden;
    box-shadow: var(--ma-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--ma-ink);
}

.masal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ma-shadow-hover);
    color: var(--ma-ink);
}

.masal-card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ma-cream-2) 0%, var(--ma-peach) 100%);
}

.masal-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.masal-card:hover .masal-card-thumb img { transform: scale(1.06); }

.masal-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,255,255,0.95);
    color: var(--ma-ink);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.10);
}

.masal-card-reading {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(45, 36, 84, 0.85);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.masal-card-body { padding: 16px 16px 18px; flex: 1; display: flex; flex-direction: column; }

.masal-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--ma-ink);
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.masal-card-excerpt {
    font-size: 13px;
    color: var(--ma-ink-soft);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.masal-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ma-ink-soft);
    font-weight: 600;
    flex-wrap: wrap;
}

.masal-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ma-line); }

/* Numbered list card for "most read" */
.masal-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.masal-list-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: var(--ma-radius-sm);
    background: var(--ma-card);
    box-shadow: var(--ma-shadow);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: var(--ma-ink);
}

.masal-list-item:hover {
    transform: translateX(4px);
    box-shadow: var(--ma-shadow-hover);
    color: var(--ma-ink);
}

.masal-list-num {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ma-gold) 0%, var(--ma-coral) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ma-ff-head);
    font-weight: 800;
    font-size: 18px;
}

.masal-list-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--ma-cream-2);
}

.masal-list-thumb img { width: 100%; height: 100%; object-fit: cover; }

.masal-list-body { min-width: 0; flex: 1; }

.masal-list-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ma-ink);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.masal-list-meta { font-size: 12px; color: var(--ma-ink-soft); font-weight: 600; }

/* ============================================================
   AGE GROUP CARDS
   ============================================================ */
.age-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.age-card {
    position: relative;
    padding: 24px 14px;
    border-radius: var(--ma-radius);
    text-align: center;
    background: var(--ma-card);
    box-shadow: var(--ma-shadow);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: var(--ma-ink);
    overflow: hidden;
}

.age-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--age-grad, linear-gradient(135deg, var(--ma-mint) 0%, var(--ma-sky) 100%));
    opacity: 0.10;
    transition: opacity .2s;
}

.age-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: var(--ma-shadow-hover); color: var(--ma-ink); }
.age-card:hover::before { opacity: 0.18; }

.age-card-num {
    font-family: var(--ma-ff-head);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    background: var(--age-grad, linear-gradient(135deg, var(--ma-mint) 0%, var(--ma-sky) 100%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.age-card-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--ma-ink);
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.age-card-sub {
    font-size: 11px;
    color: var(--ma-ink-soft);
    margin-top: 2px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ============================================================
   CHARACTER CARDS
   ============================================================ */
.char-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 14px;
}

.char-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 8px 14px;
    border-radius: var(--ma-radius);
    background: var(--ma-card);
    box-shadow: var(--ma-shadow);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: var(--ma-ink);
}

.char-card:hover { transform: translateY(-5px); box-shadow: var(--ma-shadow-hover); color: var(--ma-ink); }

.char-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--char-grad, linear-gradient(135deg, var(--ma-gold) 0%, var(--ma-coral) 100%));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.char-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ma-ink);
}

.char-count {
    font-size: 11px;
    color: var(--ma-ink-soft);
    font-weight: 600;
}

/* ============================================================
   FEATURED / HERO MASAL (large)
   ============================================================ */
.featured-masal {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0;
    border-radius: var(--ma-radius-lg);
    overflow: hidden;
    box-shadow: var(--ma-shadow);
    background: var(--ma-card);
    text-decoration: none;
    color: var(--ma-ink);
    margin-bottom: 24px;
}

.featured-masal:hover { color: var(--ma-ink); box-shadow: var(--ma-shadow-hover); }

.featured-masal-img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ma-cream-2) 0%, var(--ma-peach) 100%);
}

.featured-masal-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.featured-masal:hover .featured-masal-img img { transform: scale(1.04); }

.featured-masal-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }

.featured-masal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--ma-gold) 0%, var(--ma-coral) 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    width: fit-content;
    margin-bottom: 14px;
}

.featured-masal-title {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 12px;
    color: var(--ma-ink);
}

.featured-masal-excerpt {
    color: var(--ma-ink-soft);
    font-size: 15px;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-masal-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ma-ink-soft); font-weight: 600; margin-bottom: 20px; }

/* ============================================================
   SINGLE MASAL PAGE
   ============================================================ */
.breadcrumb {
    padding: 16px 0;
    font-size: 13px;
    color: var(--ma-ink-soft);
    font-weight: 600;
}

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.breadcrumb li { display: flex; align-items: center; gap: 6px; }

.breadcrumb li::after { content: "›"; color: var(--ma-line); }

.breadcrumb li:last-child::after { display: none; }

.breadcrumb a { color: var(--ma-ink-soft); }
.breadcrumb a:hover { color: var(--ma-grape-dark); }
.breadcrumb li.current { color: var(--ma-ink); }

.masal-single { padding: 8px 0 40px; }

.masal-single-inner {
    max-width: 820px;
    margin: 0 auto;
}

.masal-single .masal-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-grape) 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 16px;
}

.masal-single h1.masal-title {
    font-size: clamp(28px, 4.5vw, 42px);
    line-height: 1.12;
    margin-bottom: 18px;
    color: var(--ma-ink);
}

.masal-single .masal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--ma-line);
    border-bottom: 1px solid var(--ma-line);
    margin-bottom: 24px;
    color: var(--ma-ink-soft);
    font-size: 13px;
    font-weight: 600;
}

.masal-meta-item { display: inline-flex; align-items: center; gap: 6px; }

.masal-meta-item svg { width: 16px; height: 16px; color: var(--ma-grape); }

.masal-hero-img {
    border-radius: var(--ma-radius-lg);
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--ma-shadow);
    aspect-ratio: 16 / 9;
    background: var(--ma-cream-2);
}

.masal-hero-img img { width: 100%; height: 100%; object-fit: cover; }

.masal-hero-caption {
    text-align: center;
    font-size: 12px;
    color: var(--ma-ink-soft);
    margin-top: 8px;
    font-style: italic;
}

/* Table of contents */
.masal-toc {
    background: linear-gradient(135deg, var(--ma-cream) 0%, var(--ma-cream-2) 100%);
    border-radius: var(--ma-radius);
    padding: 22px 26px;
    margin-bottom: 32px;
    border-left: 5px solid var(--ma-gold);
}

.masal-toc-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--ma-ink);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.masal-toc ul { list-style: none; }

.masal-toc li { margin-bottom: 6px; }

.masal-toc a {
    color: var(--ma-grape-dark);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.masal-toc a:hover { color: var(--ma-coral-dark); }

/* Article body */
.masal-body {
    font-size: 18px;
    line-height: 1.85;
    color: var(--ma-ink);
}

.masal-body p { margin-bottom: 18px; }

.masal-body h2 {
    font-size: 24px;
    margin: 32px 0 14px;
    color: var(--ma-grape-dark);
    scroll-margin-top: 100px;
}

.masal-body h3 {
    font-size: 20px;
    margin: 24px 0 10px;
    color: var(--ma-ink);
    scroll-margin-top: 100px;
}

.masal-body img {
    border-radius: var(--ma-radius-sm);
    margin: 18px auto;
    box-shadow: var(--ma-shadow);
}

.masal-body blockquote {
    background: linear-gradient(135deg, var(--ma-cream) 0%, var(--ma-cream-2) 100%);
    border-left: 5px solid var(--ma-coral);
    padding: 18px 22px;
    border-radius: var(--ma-radius-sm);
    margin: 22px 0;
    font-style: italic;
    color: var(--ma-ink-soft);
}

.masal-body ul, .masal-body ol { margin: 14px 0 18px 22px; }
.masal-body li { margin-bottom: 6px; }

.masal-body a { text-decoration: underline; text-decoration-color: var(--ma-gold); text-underline-offset: 3px; }

/* Lesson / Ders box */
.masal-lesson {
    background: linear-gradient(135deg, #fff8e7 0%, #ffe9d6 100%);
    border: 2px solid var(--ma-gold);
    border-radius: var(--ma-radius);
    padding: 26px 28px;
    margin: 36px 0;
    position: relative;
}

.masal-lesson::before {
    content: "💡";
    position: absolute;
    top: -18px;
    left: 22px;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--ma-shadow);
}

.masal-lesson-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ma-ink);
    margin-bottom: 8px;
}

.masal-lesson-text { font-size: 15px; color: var(--ma-ink-soft); line-height: 1.7; }

/* Tags / taxo chips */
.masal-taxo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0;
    padding-top: 20px;
    border-top: 1px solid var(--ma-line);
}

.taxo-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--ma-cream-2);
    color: var(--ma-ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
}

.taxo-chip:hover { background: var(--ma-peach); color: var(--ma-ink); }

.taxo-chip .chip-emoji { font-size: 14px; }

/* Prev / Next navigation */
.masal-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 36px 0;
}

.masal-nav a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border-radius: var(--ma-radius);
    background: var(--ma-card);
    box-shadow: var(--ma-shadow);
    text-decoration: none;
    color: var(--ma-ink);
    transition: transform .2s, box-shadow .2s;
    min-width: 0;
}

.masal-nav a:hover { transform: translateY(-3px); box-shadow: var(--ma-shadow-hover); color: var(--ma-ink); }

.masal-nav a.masal-nav-next { text-align: right; }

.masal-nav-dir {
    font-size: 12px;
    font-weight: 800;
    color: var(--ma-grape-dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.masal-nav-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ma-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.masal-nav-disabled {
    background: transparent;
    box-shadow: none;
    border: 2px dashed var(--ma-line);
}

/* Share buttons */
.masal-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.masal-share-label { font-size: 13px; font-weight: 700; color: var(--ma-ink-soft); margin-right: 4px; }

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: transform .15s, opacity .2s;
}

.share-btn:hover { color: #fff; transform: translateY(-2px); opacity: .92; }

.share-btn svg { width: 15px; height: 15px; }

.share-wa { background: #25d366; }
.share-fb { background: #1877f2; }
.share-x { background: #000; }
.share-tg { background: #229ed9; }
.share-copy { background: var(--ma-grape); }

/* Related section on single */
.masal-related { margin: 40px 0; }

.masal-related-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--ma-ink);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.masal-related-title .emoji {
    width: 38px; height: 38px; border-radius: 12px;
    background: linear-gradient(135deg, var(--ma-mint) 0%, var(--ma-sky) 100%);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px;
}

.masal-related .masal-grid { grid-template-columns: repeat(3, 1fr); }

/* ============================================================
   ARCHIVE / CATEGORY PAGE
   ============================================================ */
.archive-header {
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 201, 60, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(157, 78, 221, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, var(--ma-cream) 0%, var(--ma-cream-2) 100%);
    padding: 40px 0 32px;
    text-align: center;
}

.archive-header .archive-emoji {
    width: 84px; height: 84px; border-radius: 26px;
    background: var(--cat-grad, linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-peach) 100%));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 40px; margin-bottom: 16px;
    box-shadow: var(--ma-shadow);
}

.archive-header h1 {
    font-size: clamp(28px, 5vw, 42px);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-grape) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.archive-header .archive-desc {
    max-width: 680px;
    margin: 0 auto 16px;
    color: var(--ma-ink-soft);
    font-size: 15px;
}

.archive-stats {
    display: inline-flex;
    gap: 24px;
    background: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    box-shadow: var(--ma-shadow);
    font-size: 13px;
    font-weight: 700;
    color: var(--ma-ink-soft);
    flex-wrap: wrap;
    justify-content: center;
}

.archive-stats .num { color: var(--ma-grape-dark); font-family: var(--ma-ff-head); font-size: 16px; }

/* Sub-categories / related categories chips */
.related-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    justify-content: center;
}

.related-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--ma-shadow);
    font-size: 13px;
    font-weight: 700;
    color: var(--ma-ink);
    text-decoration: none;
    transition: transform .2s;
}

.related-cat:hover { transform: translateY(-2px); color: var(--ma-ink); background: var(--ma-cream-2); }

/* Pagination */
.ma-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 36px 0 12px;
    flex-wrap: wrap;
}

.ma-pagination a, .ma-pagination span {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: #fff;
    color: var(--ma-ink);
    box-shadow: var(--ma-shadow);
    text-decoration: none;
    transition: all .2s;
}

.ma-pagination a:hover { background: var(--ma-cream-2); color: var(--ma-grape-dark); transform: translateY(-2px); }

.ma-pagination .current {
    background: linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-grape) 100%);
    color: #fff;
}

.ma-pagination .dots { background: transparent; box-shadow: none; }

/* ============================================================
   INFINITE SCROLL
   ============================================================ */
.ma-infinite-feed { width: 100%; }

.ma-next-divider {
    text-align: center;
    margin: 40px 0 20px;
    position: relative;
}

.ma-next-divider::before {
    content: "";
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--ma-line) 20%, var(--ma-line) 80%, transparent 100%);
    z-index: 0;
}

.ma-next-divider span {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--ma-gold) 0%, var(--ma-coral) 100%);
    color: #fff;
    padding: 8px 22px;
    border-radius: 999px;
    font-family: var(--ma-ff-head);
    font-weight: 800;
    font-size: 13px;
    box-shadow: var(--ma-shadow);
    letter-spacing: 0.5px;
}

.ma-infinite-status {
    text-align: center;
    padding: 20px;
    color: var(--ma-ink-soft);
    font-weight: 600;
}

/* ============================================================
   CTA strip (homepage mid-section)
   ============================================================ */
.ma-cta-strip {
    background: linear-gradient(135deg, var(--ma-grape) 0%, var(--ma-coral) 100%);
    border-radius: var(--ma-radius-lg);
    padding: 32px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin: 20px 0;
    box-shadow: var(--ma-shadow);
    position: relative;
    overflow: hidden;
}

.ma-cta-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 10%, rgba(255, 201, 60, 0.35), transparent 50%);
}

.ma-cta-strip > * { position: relative; z-index: 1; }

.ma-cta-strip h3 { color: #fff; font-size: 22px; margin-bottom: 6px; }
.ma-cta-strip p { opacity: 0.95; font-size: 14px; }

.ma-cta-strip .ma-btn { background: #fff; color: var(--ma-grape-dark); }
.ma-cta-strip .ma-btn:hover { background: var(--ma-gold); color: var(--ma-ink); }

/* ============================================================
   FOOTER (SEO area)
   ============================================================ */
.site-footer {
    background: linear-gradient(135deg, #2d2454 0%, #3d2c6e 100%);
    color: #e8e3f5;
    padding: 48px 0 0;
    margin-top: 60px;
    flex-shrink: 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.footer-brand .logo-badge {
    width: 46px; height: 46px; font-size: 22px;
    background: linear-gradient(135deg, var(--ma-gold) 0%, var(--ma-coral) 100%);
}

.footer-brand .footer-site-name {
    font-family: var(--ma-ff-head);
    font-weight: 800;
    font-size: 20px;
    color: #fff;
}

.footer-brand p { font-size: 13px; color: #c9c1e4; line-height: 1.7; margin-bottom: 14px; }

.footer-social { display: flex; gap: 8px; flex-wrap: wrap; }

.footer-social a {
    width: 38px; height: 38px; border-radius: 12px;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    transition: background .2s, transform .2s;
}

.footer-social a:hover { background: var(--ma-coral); transform: translateY(-2px); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 14px;
    font-family: var(--ma-ff-head);
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
    color: #c9c1e4;
    font-size: 13px;
    text-decoration: none;
    transition: color .2s, padding-left .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-col a:hover { color: var(--ma-gold); padding-left: 4px; }

.footer-col a .emoji { font-size: 14px; }

.footer-seo {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.footer-seo h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 12px;
    font-family: var(--ma-ff-head);
}

.footer-seo .seo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.footer-seo .seo-links a {
    color: #c9c1e4;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    text-decoration: none;
    transition: all .2s;
}

.footer-seo .seo-links a:hover { background: rgba(255, 201, 60, 0.18); color: var(--ma-gold); }

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    font-size: 12px;
    color: #a89cd9;
}

.footer-bottom a { color: #c9c1e4; }

.footer-tech-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.footer-tech-links a {
    color: #a89cd9;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.footer-tech-links a:hover { color: var(--ma-gold); }
.footer-tech-links svg { width: 14px; height: 14px; }

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 {
    text-align: center;
    padding: 60px 20px;
    max-width: 640px;
    margin: 0 auto;
}

.error-404 .big-emoji { font-size: 80px; margin-bottom: 14px; }

.error-404 h1 {
    font-size: 32px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-grape) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-404 p { color: var(--ma-ink-soft); margin-bottom: 24px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .cat-grid { grid-template-columns: repeat(4, 1fr); }
    .char-grid { grid-template-columns: repeat(4, 1fr); }
    .masal-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
    .featured-masal { grid-template-columns: 1fr; }
    .featured-masal-body { padding: 24px; }
}

@media (max-width: 768px) {
    .header-main { gap: 12px; padding: 10px 0; }
    .logo-badge { width: 44px; height: 44px; font-size: 20px; }
    .logo-text .site-name { font-size: 18px; }
    .logo-text .site-tagline { display: none; }
    .header-search { display: none; }
    .header-cta .ma-btn-ghost { display: none; }
    .mobile-menu-toggle { display: flex; }

    .hero-section { padding: 40px 0 32px; }
    .hero-stats { gap: 18px; }
    .hero-stat .num { font-size: 22px; }

    .ma-section { padding: 28px 0; }
    .ma-section-title { font-size: 22px; }
    .ma-section-title .ma-title-emoji { width: 38px; height: 38px; font-size: 18px; }

    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .cat-card { padding: 20px 12px 16px; }
    .cat-card-icon { width: 58px; height: 58px; font-size: 28px; }

    .age-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .age-card { padding: 18px 8px; }
    .age-card-num { font-size: 32px; }

    .char-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .char-card { padding: 12px 6px 10px; }
    .char-avatar { width: 50px; height: 50px; font-size: 24px; }
    .char-name { font-size: 12px; }

    .masal-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .masal-related .masal-grid { grid-template-columns: repeat(2, 1fr); }
    .masal-list { grid-template-columns: 1fr; }

    .masal-single h1.masal-title { font-size: 26px; }
    .masal-body { font-size: 17px; }
    .masal-nav { grid-template-columns: 1fr; }

    .featured-masal-title { font-size: 22px; }
    .featured-masal-body { padding: 20px; }

    .ma-cta-strip { padding: 24px; flex-direction: column; text-align: center; }

    .footer-top { grid-template-columns: 1fr; gap: 24px; }
    .footer-brand { text-align: center; }
    .footer-brand .footer-logo { justify-content: center; }
    .footer-social { justify-content: center; }
}

@media (max-width: 480px) {
    .cat-grid { grid-template-columns: 1fr 1fr; }
    .char-grid { grid-template-columns: repeat(3, 1fr); }
    .masal-grid { grid-template-columns: 1fr; }
    .masal-related .masal-grid { grid-template-columns: 1fr; }
    .masal-card-thumb { aspect-ratio: 16/9; }

    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .ma-btn { width: 100%; justify-content: center; }

    .archive-stats { gap: 14px; padding: 10px 14px; }
    .ma-pagination a, .ma-pagination span { min-width: 38px; height: 38px; padding: 0 10px; font-size: 13px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .site-header, .site-footer, .masal-share, .masal-related, .masal-nav, .ma-cta-strip, .header-search, .category-nav { display: none !important; }
    body { background: #fff; }
    .masal-body { font-size: 14pt; }
}

/* ============================================================
   SCROLLBAR (custom)
   ============================================================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ma-cream); }
::-webkit-scrollbar-thumb { background: linear-gradient(135deg, var(--ma-coral) 0%, var(--ma-grape) 100%); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ma-grape-dark); }

/* Selection */
::selection { background: var(--ma-gold); color: var(--ma-ink); }

/* Focus visible */
:focus-visible { outline: 3px solid var(--ma-mint); outline-offset: 2px; border-radius: 6px; }
