/*
Theme Name: BirMasalOku V10-Elit
Theme URI: https://birmasaloku.com
Author: Bir Masal Oku
Description: Çocuklar için modern, SEO uyumlu ve mobil etkileşimli hikaye teması.
Version: 10
*/

:root {
    --primary: #6c5ce7;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --bg-color: #f0f3f7;
    --sidebar-width: 280px;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 20%), radial-gradient(circle at 90% 80%, rgba(253, 121, 168, 0.1) 0%, transparent 20%);
    color: #2d3436;
    overflow-x: hidden;
}

/* --- OPTİMİZE EDİLMİŞ MENÜ --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.menu-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    background: none;
    border: none;
}

.brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.brand a {
    text-decoration: none;
    color: inherit;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    z-index: 1001;
    padding: 20px;
    box-shadow: 5px 0 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: transform;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #eee;
}

.close-btn {
    cursor: pointer;
    font-size: 1.5rem;
    color: #b2bec3;
}

/* WordPress Menü Stilleri */
.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu ul li {
    margin-bottom: 10px;
}

.sidebar-menu ul li a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #636e72;
    font-weight: 600;
    border-radius: 12px;
    transition: 0.2s;
}

.sidebar-menu ul li a:hover {
    background: #f0f3f7;
    color: var(--primary);
    transform: translateX(5px);
}

.sidebar-menu ul li.current-menu-item a {
    background: var(--primary);
    color: white;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.main-content {
    padding-top: 85px;
    padding-bottom: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Hero */
.hero {
    background: linear-gradient(120deg, #a29bfe 0%, #74b9ff 100%);
    border-radius: 25px;
    padding: 40px;
    color: white;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(116, 185, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.hero-decoration {
    font-size: 6rem;
    opacity: 0.2;
    position: absolute;
    right: 20px;
    bottom: -20px;
    transform: rotate(-15deg);
}

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 20px;
    scrollbar-width: none;
}

.filter-chip {
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    color: #636e72;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    white-space: nowrap;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.filter-chip:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
}

.card.hidden {
    display: none;
}

.card-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

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

.bg-grad-0 {
    background: linear-gradient(45deg, #a29bfe, #6c5ce7);
    color: white;
}

.bg-grad-1 {
    background: linear-gradient(45deg, #fd79a8, #e84393);
    color: white;
}

.bg-grad-2 {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
}

.bg-grad-3 {
    background: linear-gradient(45deg, #ffeaa7, #fdcb6e);
    color: white;
}

.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 8px;
    background: #f0f3f7;
    color: var(--primary);
    display: inline-block;
    margin-bottom: 10px;
    align-self: flex-start;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card h3 a {
    text-decoration: none;
    color: #2d3436;
}

.card p {
    font-size: 0.9rem;
    color: #636e72;
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-read {
    display: block;
    text-align: center;
    background: var(--primary);
    color: white;
    padding: 10px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    transition: 0.2s;
}

.btn-read:hover {
    background: #5649c0;
}

/* Single Content */
.story-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.story-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.story-meta {
    font-size: 0.9rem;
    color: #b2bec3;
    margin-bottom: 20px;
}

.story-body {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #2d3436;
}

.story-body p {
    margin-bottom: 20px;
}

/* --- REAKSİYON SİSTEMİ --- */
.reaction-area {
    margin: 30px 0;
    text-align: center;
    padding: 25px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    border: 2px dashed #e1e1e1;
    width: 100%;
}

.reaction-title {
    font-size: 1.1rem;
    color: #636e72;
    margin-bottom: 20px;
    font-weight: 700;
}

.reaction-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.react-btn {
    border: none;
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    color: #2d3436;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    flex: 1 1 auto;
    max-width: 200px;
}

.react-btn:hover {
    transform: scale(1.05);
}

.react-btn.liked {
    background: #ffeaa7;
    color: #d35400;
    pointer-events: none;
}

.react-btn span {
    font-size: 1.4rem;
    line-height: 1;
}

@media (max-width: 400px) {
    .react-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    .reaction-buttons {
        gap: 10px;
    }
}

/* --- YENİ EKLENEN REKLAM KUTUSU (SINGLE.PHP) --- */
.single-ad-box {
    width: 100%;
    margin: 30px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 10px;
}

.single-ad-box img,
.single-ad-box iframe,
.single-ad-box ins {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* --- MODERN FOOTER TASARIMI --- */
.site-footer {
    position: relative;
    background-color: #2d3436;
    color: #dfe6e9;
    margin-top: 120px;
    padding-top: 20px;
    font-size: 0.95rem;
}

/* Dalga Efekti */
.footer-wave {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.footer-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 50px;
}

.footer-wave .shape-fill {
    fill: #2d3436;
}

/* Footer İçerik Düzeni */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

/* Sol Sütun Marka */
.footer-brand {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(to right, #a29bfe, #74b9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

/* Başlık Altı Çizgi */
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 4px;
    background-color: #6c5ce7;
    border-radius: 10px;
}

.footer-col p {
    line-height: 1.6;
    opacity: 0.8;
}

/* Footer Linkleri */
.footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #b2bec3;
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Link Önü İkon Efekti */
.footer-links a::before {
    content: '•';
    color: #6c5ce7;
    margin-right: 10px;
    font-size: 1.2rem;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(5px);
}

.footer-links a:hover::before {
    color: #00cec9;
}

/* Sosyal Medya İkonları */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-btn {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: 0.3s;
    font-size: 1.2rem;
}

.social-btn:hover {
    transform: translateY(-5px);
    background: #6c5ce7;
}

.social-btn.facebook:hover {
    background: #1877F2;
}

.social-btn.x-twitter:hover {
    background: #000000;
}

.social-btn.pinterest:hover {
    background: #E60023;
}

.social-btn.youtube:hover {
    background: #ff0000;
}

.social-btn.instagram:hover {
    background: #E1306C;
}

/* Alt Telif Kısmı */
.footer-bottom {
    text-align: center;
    padding: 25px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 20px;
    color: #636e72;
    font-size: 0.9rem;
}

/* =========================================
GECE MODU RENKLERİ (ZORUNLU)
========================================= */

/* Arkaplanı ve yazıyı değiştir */
[data-theme="dark"] body {
    background-color: #1e272e !important;
    color: #dcdde1 !important;
}

/* Üst Menü (Navbar) */
[data-theme="dark"] .navbar {
    background: rgba(47, 54, 64, 0.95) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

/* Kartlar, Sidebar ve Kutular */
[data-theme="dark"] .card,
[data-theme="dark"] .story-container,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .filter-chip,
[data-theme="dark"] .reaction-area {
    background-color: #2f3640 !important;
    color: #dcdde1 !important;
    border-color: #4b6584 !important;
}

/* Kart İçindeki Başlıklar */
[data-theme="dark"] .card h3,
[data-theme="dark"] .card h3 a {
    color: #f5f6fa !important;
}

/* Linkler */
[data-theme="dark"] .sidebar-menu ul li a,
[data-theme="dark"] .footer-links a {
    color: #dcdde1 !important;
}

/* Reaksiyon Butonları */
[data-theme="dark"] .react-btn {
    background-color: #1e272e !important;
    color: #dcdde1 !important;
}

/* Footer (Alt Kısım) */
[data-theme="dark"] .site-footer {
    background-color: #000000 !important;
}

[data-theme="dark"] .footer-wave .shape-fill,
[data-theme="dark"] .footer-wave svg path {
    fill: #000000 !important;
}

/* Gece Modu Butonu ve Arama Butonu Renkleri */
[data-theme="dark"] .theme-toggle-btn,
[data-theme="dark"] .search-toggle-btn {
    border-color: #a29bfe;
    color: #a29bfe;
}

[data-theme="dark"] .theme-toggle-btn:hover,
[data-theme="dark"] .search-toggle-btn:hover {
    background: #a29bfe;
    color: #2f3640;
}

/* --- ÖNERİLEN HİKAYELER --- */
.related-posts-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Mobil Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-decoration {
        display: none;
    }
    .main-content {
        padding-top: 80px;
    }
}