/* ============================================
   SINIFLARI DOLDURDUK - FRESH UI (CHILD FRIENDLY)
   ============================================ */

/* 1. Variables & Design Tokens */
:root {
    /* Palette - Vivid & Playful */
    /* These are now overridden by inline styles from functions.php */
    --primary: #FF6B6B;
    --primary-op: rgba(255, 107, 107, 0.1);
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --dark: #292F36;
    --light: #F7F9FC;

    /* Gradients - Using Dynamic Colors */
    --grad-primary: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --grad-secondary: linear-gradient(135deg, var(--secondary-color), #556270);
    --grad-sky: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 100%);
    --grad-card: linear-gradient(145deg, #ffffff, #f0f0f0);

    /* Typography */
    --font-heading: 'Fredoka', cursive; /* Fallback */
    --font-body: 'Nunito', sans-serif; /* Fallback */

    /* Spacing & Layout */
    --radius-sm: 10px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-xl: var(--button-radius, 50px);

    /* Shadows - Soft & Large */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
    --shadow-pop: 5px 5px 0px rgba(0, 0, 0, 0.1);
}

/* 2. Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 18px;
    /* Slightly larger for readability */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: var(--dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: var(--button-padding-y, 12px) var(--button-padding-x, 24px);
    border-radius: var(--button-radius, 50px);
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: scale(1.05);
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--button-primary-bg, var(--primary));
    color: var(--button-primary-text, white);
}

.btn-primary:hover {
    background: var(--button-primary-hover, var(--primary));
}

.btn-secondary {
    background: var(--button-secondary-bg, var(--secondary));
    color: var(--button-secondary-text, white);
}

/* 3. Header & Navigation - CLOUD THEME */
.site-header {
    background: var(--header-bg, #E0F6FF);
    /* Sky blue background */
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    width: 100%;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
    min-height: 80px;
}

/* Brand Logo - Sun Style */
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 140px;
    height: 120px;
    text-decoration: none;
    margin-right: 20px;
}

.sun-bg {
    position: absolute;
    width: 100px;
    height: 100px;
    background: #FFE66D;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 230, 109, 0.5);
    z-index: 1;
}

/* Sun Rays */
.sun-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: repeating-conic-gradient(from 0deg,
            rgba(255, 230, 109, 0.4) 0deg 10deg,
            transparent 10deg 20deg);
    border-radius: 50%;
    z-index: -1;
    animation: sunSpin 20s linear infinite;
}

@keyframes sunSpin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.brand-text {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.9;
    transform: rotate(-5deg);
}

.text-top {
    font-family: 'Fredoka', cursive;
    font-size: 1.2rem;
    color: #F4A261;
    /* Orange/Yellowish txt */
    font-weight: 700;
    text-shadow: 1px 1px 0px #fff;
    letter-spacing: 1px;
}

.text-bottom {
    font-family: 'Fredoka', cursive;
    font-size: 1.5rem;
    color: #D32F2F;
    /* Deep Red */
    font-weight: 800;
    text-shadow: 2px 2px 0px #fff;
    letter-spacing: 0.5px;
}

/* Hide search for now to match reference */
.header-search {
    display: none;
}

/* Navigation - Cloud Items */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    /* Align to right */
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 9px;
    /* Spacing between clouds */
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px 25px;
    background: #FFFFFF;
    color: #D32F2F;
    /* Red text */
    font-family: 'Fredoka', cursive;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Cloud Shape using border-radius */
    border-radius: 25px 30px 20px 25px / 30px 25px 35px 25px;
    box-shadow:
        inset -2px -2px 5px rgba(0, 0, 0, 0.05),
        2px 5px 10px rgba(135, 206, 235, 0.4);
    min-width: 120px;
    position: relative;
    border: 2px solid transparent;
    white-space: nowrap;
}

/* Randomize cloud shapes slightly for variety using nth-child */
.nav-item:nth-child(odd) .nav-link {
    border-radius: 30px 35px 25px 30px / 35px 30px 30px 35px;
    transform: rotate(-1deg);
}

.nav-item:nth-child(even) .nav-link {
    border-radius: 25px 30px 35px 25px / 30px 35px 25px 30px;
    transform: rotate(1deg);
}

.nav-link:hover,
.nav-link.active {
    transform: translateY(-5px) scale(1.05) rotate(0deg) !important;
    background: #fff;
    color: #FF0000;
    box-shadow:
        0 8px 15px rgba(135, 206, 235, 0.6);
    z-index: 10;
}

.nav-icon {
    display: none;
}

/* Dropdown Menu - Cloud Theme */
.nav-item {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #FFFFFF;
    min-width: 220px;
    padding: 15px 0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    border: 3px solid #E0F6FF;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    margin: 0;
}

.dropdown-link {
    display: block;
    padding: 10px 20px;
    color: #2C3E50;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background: #E0F6FF;
    color: #FF6B6B;
    padding-left: 25px;
    /* Slide effect */
}

/* Little triangle arrow at top */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent #FFFFFF transparent;
}

/* Mobile Menu Toggle - Hamburger */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: white;
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    margin-left: auto;
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--primary);
    border-radius: 4px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Responsive Logic */
@media (max-width: 1200px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: #E0F6FF;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1500;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 25px;
        width: 100%;
        padding: 20px;
    }

    .nav-link {
        width: 80%;
        max-width: 300px;
        font-size: 1.5rem;
        padding: 20px;
        /* Reset rotation for mobile list */
        transform: none !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
}



/* 4. Hero Section - The "Sky" */
.hero-section {
    position: relative;
    padding: 6rem 0 10rem;
    overflow: hidden;
    background: var(--grad-sky);
    text-align: center;
    border-radius: 0 0 50% 50% / 40px;
    /* Curve at bottom */
}

/* Simple Cloud Animation */
.clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.4)" d="M-5,50 Q25,60 50,50 T105,50 L100,0 L0,0 Z"></path></svg>');
    background-repeat: repeat-x;
    background-size: 200% 100%;
    opacity: 0.5;
    animation: cloudMove 60s linear infinite;
    pointer-events: none;
}

@keyframes cloudMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 100% 0;
    }
}

.sun {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(255, 230, 109, 0.6);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    color: white;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero-title span {
    display: inline-block;
    animation: bounceIn 1s ease both;
}

.hero-title span:nth-child(2) {
    animation-delay: 0.2s;
    color: var(--accent);
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero-message {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: rotate(-1deg);
    border: 4px solid var(--accent);
}

.welcome-text {
    color: var(--secondary);
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: #666;
}

/* 5. Categories - Bento Box Grid */
.categories-section {
    padding: 4rem 0;
    margin-top: -3rem;
    /* Overlap with hero */
    position: relative;
    z-index: 5;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 100%;
    height: 8px;
    background: var(--accent);
    border-radius: 4px;
    margin-top: 5px;
    opacity: 0.6;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 55px;
    max-width: 1200px;
    margin: auto;
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

.category-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    border: 3px solid transparent;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--secondary);
    box-shadow: 0 15px 30px rgba(78, 205, 196, 0.2);
}

/* Colorful card borders randomly (using nth-child logic mock) */
.category-card:nth-child(1n) {
    border-bottom: 6px solid var(--primary);
}

.category-card:nth-child(2n) {
    border-bottom: 6px solid var(--secondary);
}

.category-card:nth-child(3n) {
    border-bottom: 6px solid var(--accent);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--light);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--dark);
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.category-description {
    font-size: 0.95rem;
    color: #777;
}

/* 6. Content Cards */
.featured-section {
    padding: 4rem 0;
}

.contents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.content-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: 0.3s ease;
    border: 1px solid #eee;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.content-image {
    height: 200px;
    background: #eee;
    overflow: hidden;
}

.content-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    border-radius: 0;
}

.content-card:hover .content-image img {
    transform: scale(1.1);
}

.content-body {
    padding: 20px;
}

.content-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    display: inline-block;
}

.content-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.content-title a:hover {
    color: var(--primary);
}

.content-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    color: #888;
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 7. Footer */
.site-footer {
    background: var(--footer-bg, var(--dark));
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
}

/* 8. Responsiveness */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .nav-link span {
        display: none;
    }

    /* Show only icons or hide nav text */
}

@media (max-width: 768px) {
    .site-header {
        padding: 15px 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        transition: 0.4s ease;
        z-index: 999;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        gap: 10px;
    }

    .nav-link {
        justify-content: center;
        background: var(--light);
        padding: 15px;
    }

    .hero-section {
        padding-top: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* 3D Card Design - Categories (FROM USER) */
.card-3d {
    position: relative;
    height: 300px;
    background: linear-gradient(145deg, #ffffff, #f0f6ff);
    border-radius: 80px;
    box-shadow:
        0 25px 45px rgba(0, 0, 0, 0.18),
        inset 0 8px 12px rgba(255, 255, 255, 0.9),
        inset 0 -6px 10px rgba(0, 0, 0, 0.08);
    padding: 35px 30px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.35s ease;
    display: block;
    text-decoration: none;
    margin-bottom: 30px;
}

.card-3d:hover {
    transform: translateY(-15px) rotate(-1deg);
    box-shadow: 0 35px 60px rgba(0, 0, 0, 0.25),
        inset 0 8px 12px rgba(255, 255, 255, 0.9);
}

/* ☁️ BOUNCY CLOUD */
.card-cloud {
    position: absolute;
    top: 35px;
    left: 35px;
    width: 120px;
    height: 46px;
    background: linear-gradient(#ffffff, #eaf1ff);
    border-radius: 50px;
    animation: cloudBounce 4s ease-in-out infinite;
    z-index: 1;
}

.card-cloud::before,
.card-cloud::after {
    content: "";
    position: absolute;
    background: linear-gradient(#ffffff, #eaf1ff);
    border-radius: 50%;
}

.card-cloud::before {
    width: 46px;
    height: 46px;
    top: -23px;
    left: 20px;
}

.card-cloud::after {
    width: 38px;
    height: 38px;
    top: -18px;
    right: 18px;
}

/* ☀️ HAPPY SUN */
.card-sun {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at top, #fffde7, #ffd54f);
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(255, 213, 79, 0.9);
    animation: sunSpin 6s linear infinite;
    z-index: 1;
}

/* 🌈 3D RAINBOW */
.card-rainbow {
    position: absolute;
    bottom: -65px;
    right: -45px;
    width: 210px;
    height: 110px;
    border-radius: 210px 210px 0 0;
    background:
        linear-gradient(to top,
            #ff6f61 0%,
            #ff6f61 16%,
            #ffb74d 16%,
            #ffb74d 32%,
            #fff176 32%,
            #fff176 48%,
            #81c784 48%,
            #81c784 64%,
            #64b5f6 64%,
            #64b5f6 80%,
            #ba68c8 80%);
    box-shadow:
        inset 0 6px 10px rgba(255, 255, 255, 0.6),
        inset 0 -6px 10px rgba(0, 0, 0, 0.15);
    animation: rainbowPulse 3.5s ease-in-out infinite;
    z-index: 1;
}

/* TEXT */
.card-3d h3 {
    margin-top: 140px;
    font-size: 26px;
    color: #333;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
    font-family: 'Fredoka', cursive;
}

.card-3d p {
    font-size: 16px;
    color: #555;
    margin-top: 6px;
    position: relative;
    z-index: 2;
    font-family: 'Nunito', sans-serif;
}

/* Color moods for Cards */
.c1 {
    background: linear-gradient(145deg, #ffffff, #fff1d6);
}

.c2 {
    background: linear-gradient(145deg, #ffffff, #e0f7ff);
}


.c3 {
    background: linear-gradient(145deg, #ffffff, #f3e5ff);
}

.c4 {
    background: linear-gradient(145deg, #ffffff, #e8f5e9);
}

.c5 {
    background: linear-gradient(145deg, #ffffff, #fff8e1);
}

.c6 {
    background: linear-gradient(145deg, #ffffff, #ede7ff);
}

/* =========================
   ANIMATED 3D FOOTER
   ========================= */
.kids-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #dff4ff, #ffffff);
    padding-top: 130px;
    margin-top: 5rem;
}

/* =========================
   GÖKYÜZÜ KATMANI
========================= */
.footer-sky {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ☀️ GÜNEŞ */
.footer-sun {
    position: absolute;
    top: 40px;
    right: 70px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 30% 30%, #fff1a8, #ffb703);
    border-radius: 50%;
    box-shadow: 0 0 45px rgba(255, 183, 3, 0.6);
    animation: sunPulse 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes sunPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ☁️ BULUT */
.footer-cloud {
    position: absolute;
    width: 170px;
    height: 65px;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
    opacity: 0.9;
    z-index: 1;
}

.footer-cloud::before,
.footer-cloud::after {
    content: '';
    position: absolute;
    background: #fff;
    border-radius: 50%;
}

.footer-cloud::before {
    width: 75px;
    height: 75px;
    top: -35px;
    left: 20px;
}

.footer-cloud::after {
    width: 95px;
    height: 95px;
    top: -45px;
    right: 20px;
}

.cloud-1 {
    top: 90px;
    left: -220px;
    animation: cloudMove 60s linear infinite;
}

.cloud-2 {
    top: 160px;
    left: -260px;
    animation: cloudMove 80s linear infinite;
}

.cloud-3 {
    top: 240px;
    left: -300px;
    animation: cloudMove 100s linear infinite;
}

@keyframes cloudMove {
    to {
        transform: translateX(120vw);
    }
}

/* 🌈 GÖKKUŞAĞI */
.footer-rainbow {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 150px;
    /* Adjusted to sit behind content better */
    border-radius: 150px 150px 0 0;
    background: linear-gradient(to bottom,
            #ff595e,
            #ffca3a,
            #8ac926,
            #1982c4,
            #6a4c93);
    opacity: 0.8;
    animation: rainbowFloat 6s ease-in-out infinite;
    z-index: 1;
}

@keyframes rainbowFloat {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-12px);
    }
}

/* =========================
   FOOTER İÇERİK
========================= */
.footer-content {
    position: relative;
    z-index: 5;
    background: #ffffff;
    border-radius: 70px 70px 0 0;
    text-align: center;
    padding: 65px 20px 45px;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.06);
}

.footer-content h3 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Fredoka', cursive;
}

.footer-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    font-family: 'Nunito', sans-serif;
}

/* 🔗 LINKLER */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 0;
    list-style: none;
}

.footer-links a {
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    color: #1982c4;
    font-family: 'Fredoka', cursive;
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #ff595e;
    transform: scale(1.15) rotate(-2deg);
}

/* © */
.footer-copy {
    font-size: 14px;
    color: #aaa;
    margin-top: 2rem;
}

/* Social Icons in Footer */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: #f0f8ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
}

@media (max-width: 600px) {
    .footer-sun {
        width: 90px;
        height: 90px;
        right: 30px;
    }

    .footer-rainbow {
        width: 220px;
        height: 110px;
    }

    .footer-content h3 {
        font-size: 22px;
    }
}

/* =========================
   3D BOOK CARD DESIGN
   ========================= */
.book-perspective {
    perspective: 1000px;
}

.book-card {
    position: relative;
    width: 260px;
    height: 380px;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.book-card:hover {
    transform: rotateY(-30deg) translateX(10px) !important;
}

.book-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 4px 15px 15px 4px;
    box-shadow:
        inset 4px 0 10px rgba(0, 0, 0, 0.1),
        /* Spine shadow */
        10px 10px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    transform-origin: left;
    z-index: 2;
    overflow: hidden;
    backface-visibility: hidden;
    /* Book Texture Pattern */
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><g fill="%23ffffff" fill-opacity="0.1"><path d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z"/></g></svg>');
}

/* Book Colors (Overrides default) */
.book-card.c1 .book-cover {
    background: linear-gradient(135deg, #FF9A9E, #FECFEF);
    border: 2px solid #FF9A9E;
}

.book-card.c2 .book-cover {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
    border: 2px solid #a18cd1;
}

.book-card.c3 .book-cover {
    background: linear-gradient(135deg, #84fab0, #8fd3f4);
    border: 2px solid #84fab0;
}

.book-card.c4 .book-cover {
    background: linear-gradient(135deg, #fccb90, #d57eeb);
    border: 2px solid #fccb90;
}

.book-card.c5 .book-cover {
    background: linear-gradient(135deg, #e0c3fc, #8ec5fc);
    border: 2px solid #e0c3fc;
}

.book-card.c6 .book-cover {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border: 2px solid #4facfe;
}

/* Spine aka Binding */
.book-spine {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 5;
    border-radius: 4px 0 0 4px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* 3D Pages Effect on Right Side */
.book-pages {
    position: absolute;
    top: 5px;
    right: -10px;
    width: 20px;
    height: calc(100% - 10px);
    background:
        repeating-linear-gradient(to right,
            #fff 0px,
            #f0f0f0 1px,
            #fff 2px);
    transform: rotateY(90deg);
    transform-origin: left;
    border-radius: 0 4px 4px 0;
    box-shadow: inset 2px 0 5px rgba(0, 0, 0, 0.05);
}

.book-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.4);
    background: #fff;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 20, 0.15);
    transition: transform 0.3s ease;
}

.book-card:hover .book-image {
    transform: scale(1.05) rotate(5deg);
}

.book-title {
    font-family: 'Fredoka', cursive;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    display: block !important;
}

.book-info {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Nunito', sans-serif;
    background: rgba(0, 0, 0, 0.1);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 700;
}

/* Book Series Badges */
.book-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fff;
    color: #FF6B6B;
    font-weight: 800;
    font-family: 'Fredoka', cursive;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: rotate(5deg);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1) rotate(5deg);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Magic Dust (Particle) */
.magic-particle {
    position: fixed;
    pointer-events: none;
    background: radial-gradient(circle, #fff, transparent);
    border-radius: 50%;
    z-index: 9999;
    animation: fadeParticle 1s ease-out forwards;
}

@keyframes fadeParticle {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Gummy Button Effects */
.btn:active,
.book-card:active,
.card-3d:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s cubic-bezier(0.47, 1.64, 0.41, 0.8) !important;
}

/* =========================
   PAGE TRANSITIONS (Cloud Effect)
   ========================= */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.page-transition-overlay.active {
    pointer-events: all;
    opacity: 1;
    visibility: visible;
}

.transition-cloud-layer {
    width: 100%;
    height: 120vh;
    /* Taller than screen to cover fully */
    background: #E0F6FF;
    border-radius: 50% 50% 0 0;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    position: absolute;
    bottom: 0;
    box-shadow: 0 -50px 0 #E0F6FF;
    /* Extender */
}

/* Multiple layers for depth */
.transition-cloud-layer:nth-child(1) {
    background: #E0F6FF;
    z-index: 3;
    transition-delay: 0.1s;
}

.transition-cloud-layer:nth-child(2) {
    background: #81D4FA;
    height: 110vh;
    z-index: 2;
    border-radius: 40% 40% 0 0;
    transition-delay: 0.05s;
}

.transition-cloud-layer:nth-child(3) {
    background: #4FC3F7;
    height: 100vh;
    z-index: 1;
    border-radius: 30% 30% 0 0;
    transition-delay: 0s;
}

/* Active State: Slide Up */
.page-transition-overlay.active .transition-cloud-layer {
    transform: translateY(0);
}

/* =========================
   FLOATING MASCOT (Mascot)
   ========================= */
.floating-mascot {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* Moved to Left */
    width: 100px;
    height: 100px;
    z-index: 9990;
    cursor: pointer;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.floating-mascot:hover {
    transform: translateY(-10px) scale(1.1);
}

/* SVG Styling */
.mascot-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.mascot-body {
    fill: #FFD700;
}

.mascot-face {
    transform-origin: center;
}

.mascot-eye {
    fill: #333;
}

.mascot-pupil {
    fill: #fff;
    animation: blink 4s infinite;
}

@keyframes blink {

    0%,
    48%,
    52%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.1);
    }
}

.mascot-speech {
    position: absolute;
    bottom: 110px;
    left: 10px;
    /* Aligned to Left */
    background: #fff;
    padding: 10px 15px;
    border-radius: 20px 20px 20px 0;
    /* Pointing down-left */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Fredoka', cursive;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: all 0.3s ease;
    pointer-events: none;
}

.floating-mascot:hover .mascot-speech {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* =========================
   MAGIC CHALK (Canvas)
   ========================= */
.magic-chalk-btn {
    position: fixed;
    bottom: 150px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    /* Higher than canvas (9998) and overlay */
    transition: all 0.3s ease;
    border: 3px solid #ff6b6b;
}

.magic-chalk-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

.magic-chalk-btn.active {
    background: #ff6b6b;
    color: #fff;
    border-color: #fff;
}

#chalk-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23ff0000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path></svg>') 0 24, auto;
    pointer-events: none;
}

#chalk-canvas.active {
    pointer-events: all;
    background: rgba(0, 0, 0, 0.05);
    /* Slight dim to focus */
}

/* Celebration Overlay */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.victory-message {
    font-family: 'Fredoka', cursive;
    font-size: 3rem;
    color: #FF6B6B;
    text-shadow: 0 4px 0 #fff, 0 8px 10px rgba(0, 0, 0, 0.2);
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.celebration-overlay.active .victory-message {
    transform: scale(1);
}