/*
Theme Name: رمان یار
Theme URI: https://novel-reader.ir
Author: سجاد رشیدی
Author URI: https://sajjadrashidi.ir
Description: قالب حرفه‌ای و اختصاصی وردپرس برای سایت‌های رمان و داستان با امکانات پیشرفته، طراحی واکنش‌گرا و سازگار با صفحه‌خوان‌ها
Version: 1.0.2
Requires at least: 5.6
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: novel-reader
Tags: novel, story, books, reading, literature, rtl-language, accessibility-ready, custom-background, custom-colors, custom-menu, featured-images, flexible-header, theme-options, translation-ready
*/

/* ==========================================================================
   1. Reset & Base Styles
   ========================================================================== */

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

@font-face {
    font-family: 'Vazir';
    src: url('assets/fonts/Vazir.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* ... other @font-face rules ... */

:root {
    --color-bg: #f5f5f5;
    --color-surface: #ffffff;
    --color-text: #333333;
    --color-primary: #2c3e50;
    --color-accent: #e74c3c;
    --radius: 8px;
    --shadow: 0 4px 6px rgba(0,0,0,0.08);
}

body {
    font-family: 'IRANSans', 'Vazir', 'Shabnam', Arial, sans-serif;
    line-height: 1.7;
    background-color: var(--color-bg);
    color: var(--color-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-primary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #c0392b;
}


/* ==========================================================================
   2. Header & Navigation Styles
   ========================================================================== */

.site-header {
    background-color: var(--color-surface);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
}
.site-title a {
    color: var(--color-primary);
    text-decoration: none;
}

.main-navigation {
    margin: 0 auto;
}
.main-navigation ul {
    list-style: none;
    display: flex;
    padding: 0;
}
.main-navigation li {
    margin: 0 1rem;
}
.main-navigation a {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-buttons .nav-button,
.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
    padding: 0.5rem;
    font-size: 24px;
    line-height: 1;
}

/* --- FIX: Mobile Menu Toggle Visibility --- */

/* By default (on desktop), hide the mobile toggle button. */
.mobile-menu-toggle {
    display: none;
}

/* On screens 768px or less, hide the desktop menu and show the mobile toggle. */
@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    .mobile-menu-toggle {
        display: inline-flex; /* Use inline-flex to align the icon properly */
    }
}


/* ==========================================================================
   3. Content & Layout Styles (Novel Cards, etc.)
   ========================================================================== */

.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.novel-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.novel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}


/* ==========================================================================
   4. Font & Dark Mode Preferences
   ========================================================================== */

body.font-family-iransans { font-family: 'IRANSans', Arial, sans-serif; }
body.font-family-vazir { font-family: 'Vazir', Arial, sans-serif; }
body.font-family-shabnam { font-family: 'Shabnam', Arial, sans-serif; }

body.font-size-small { font-size: 14px; }
body.font-size-small h1 { font-size: 1.8rem; }
/* ... other font size rules ... */

body.font-size-medium { font-size: 16px; }
body.font-size-medium h1 { font-size: 2rem; }
/* ... other font size rules ... */

body.font-size-large { font-size: 18px; }
body.font-size-large h1 { font-size: 2.2rem; }
/* ... other font size rules ... */

body.dark-mode {
    --color-bg: #121212;
    --color-surface: #1e1e1e;
    --color-text: #e0e0e0;
    --color-primary: #ffffff;
    --shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.dark-mode a { color: #e74c3c; }
.dark-mode .site-header,
.dark-mode .novel-card,
.dark-mode .widget,
.dark-mode .comments-area {
    background-color: var(--color-surface);
    border: 1px solid #333;
}
.dark-mode .site-title a,
.dark-mode h1, .dark-mode h2, .dark-mode h3 {
    color: var(--color-primary);
}
/* ... other dark mode rules ... */
