/*
Theme Name: SarvHost Blog
Theme URI: https://sarvhost.com
Author: SarvHost Team
Author URI: https://sarvhost.com
Description: قالب وبلاگ سرو هاست
Version: 1.0.0
Text Domain: sarvhost-blog
*/

/* ==================== فونت ==================== */
@font-face {
    font-family: 'Byekan';
    src: url('assets/fonts/YekanBakhFaNum-Bold.woff2') format('woff2'),
        url('assets/fonts/BYekan.woff') format('woff'),
        url('assets/fonts/BYekan.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Byekan';
    src: url('assets/fonts/YekanBakh-SemiBold.woff2') format('woff2'),
        url('assets/fonts/BYekan-Bold.woff') format('woff'),
        url('assets/fonts/BYekan-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
/* ==================== متغیرها ==================== */
:root {
    --font-main: 'Byekan', Tahoma, sans-serif;

    --primary: #1A8A9B;
    --primary-dark: #147080;
    --primary-light: #2CB5C9;
    --secondary: #F59E0B;
    --accent: #10B981;

    --grey-50: #F9FAFB;
    --grey-100: #F3F4F6;
    --grey-200: #E5E7EB;
    --grey-300: #D1D5DB;
    --grey-400: #9CA3AF;
    --grey-500: #6B7280;
    --grey-600: #4B5563;
    --grey-700: #374151;
    --grey-800: #1F2937;
    --grey-900: #111827;

    --text-primary: #1F2937;
    --text-secondary: #6B7280;

    --light: #E0F7FA;
    --lighter: #F0FDFA;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* ==================== ریست ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    background: var(--grey-50);
    direction: rtl;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

ul,
ol {
    list-style: none;
}

/* ==================== Container ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== دکمه‌ها ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: normal;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
    line-height: 1.5;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background: #D97706;
    border-color: #D97706;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

/* ==================== نوار بالایی ==================== */
.top-bar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0C3547 100%);
    color: #fff;
    padding: 0;
    font-size: 0.85rem;
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
}

.top-bar-right,
.top-bar-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s;
}

a.top-bar-item:hover {
    color: #fff;
}

.top-bar-item svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* ==================== هدر ==================== */
.site-header {
background: linear-gradient(135deg, #1A237E 0%, #283593 50%, #3949AB 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 24px;
}

/* لوگو */
.site-branding {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.site-title {
    font-size: 1.3rem;
    color: #fff;
}

/* منوی اصلی */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    display: block;
    padding: 10px 18px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-links li a:hover,
.nav-links li.current-menu-item a {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* اکشن‌ها */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-actions .btn-primary {
    background: #fff;
    color: var(--primary-dark);
    border-color: #fff;
}

.header-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
}

/* همبرگر */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.hamburger span {
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

/* ==================== منوی موبایل ==================== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    transition: right 0.35s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--grey-200);
    background: var(--primary);
    color: #fff;
}

.mobile-menu-title {
    font-size: 1.1rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #fff;
    padding: 4px;
    line-height: 1;
}

.mobile-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.mobile-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-links li a {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
    color: var(--grey-700);
    border-bottom: 1px solid var(--grey-100);
}

.mobile-nav-links li a:hover {
    background: var(--lighter);
    color: var(--primary);
}

.mobile-menu-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--grey-200);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--grey-50);
}

.mobile-contact-item {
    font-size: 0.9rem;
    color: var(--grey-600);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

/* ==================== هیرو ==================== */
.blog-hero {
    background: linear-gradient(135deg, #1A237E 0%, #283593 50%, #3949AB 100%);
    padding: 50px 0 60px;
    color: #fff;
    text-align: center;
}

.blog-hero h1 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.5;
}

.gradient-text {
    background: linear-gradient(135deg, #5EEAD4, #A7F3D0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 550px;
    margin: 0 auto 28px;
    line-height: 1.9;
}

.hero-search-box {
    max-width: 520px;
    margin: 0 auto;
}

.hero-search-box form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 5px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.hero-search-box .search-icon {
    margin: 0 12px;
    color: var(--grey-400);
    flex-shrink: 0;
}

.hero-search-box input {
    flex: 1;
    padding: 12px 8px;
    border: none;
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--grey-900);
    outline: none;
    background: transparent;
}

.hero-search-box .btn {
    flex-shrink: 0;
}

/* ==================== بلاگ اصلی ==================== */
.blog-main {
    background: var(--grey-100);
    padding: 40px 0 70px;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
}

.blog-content {
    min-width: 0;
}

/* عنوان بخش */
.section-title-row {
    margin-bottom: 28px;
}

.section-title {
    font-size: 1.2rem;
    color: var(--grey-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-bar {
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

/* ==================== کارت مقاله - حرفه‌ای ==================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.post-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.post-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.08);
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--grey-100) 0%, var(--grey-200) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-400);
}

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

.post-card-date {
    font-size: 0.8rem;
    color: var(--grey-500);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-card-date::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.post-card-title {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--grey-900);
    margin-bottom: 12px;
    transition: color 0.2s;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card:hover .post-card-title {
    color: var(--primary);
}

.post-card-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--lighter);
    color: var(--primary);
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    margin-top: auto;
    align-self: flex-start;
}

.post-card:hover .post-card-btn {
    background: var(--primary);
    color: #fff;
}

.post-card-btn svg {
    transition: transform 0.2s;
}

.post-card:hover .post-card-btn svg {
    transform: translateX(-4px);
}

/* ==================== صفحه‌بندی ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    transition: all 0.2s;
}

.pagination a {
    background: #fff;
    color: var(--grey-700);
    border: 1px solid var(--grey-300);
}

.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

.pagination .dots {
    background: transparent;
    border: none;
    color: var(--grey-500);
}

/* ==================== سایدبار ==================== */
.blog-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
}

.widget {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1rem;
    color: var(--grey-900);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--grey-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title svg {
    color: var(--primary);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ==================== فوتر ==================== */
.site-footer {
    background: var(--grey-900);
    color: rgba(255, 255, 255, 0.8);
    padding-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo img {
    height: 45px;
    width: auto;
    margin-bottom: 18px;
    filter: brightness(0) invert(1);
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 18px;
}

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

.footer-social a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

.footer-social a svg {
    width: 18px;
    height: 18px;
}

.footer-social a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 20px;
}

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

.footer-links li a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
    display: inline-block;
}

.footer-links li a:hover {
    color: #fff;
    padding-right: 8px;
}

.footer-bottom {
    padding: 22px 0;
    text-align: center;
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== استایل محتوای مقاله (single) ==================== */
.entry-content {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 40px 45px;
    box-shadow: var(--shadow-sm);
    font-size: 1.05rem;
    line-height: 2.2;
    color: var(--text-primary);
}

.entry-content p {
    margin-bottom: 24px;
    text-align: justify;
}

.entry-content h2 {
    font-size: 1.5rem;
    color: var(--grey-900);
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    line-height: 1.6;
}

.entry-content h3 {
    font-size: 1.25rem;
    color: var(--grey-800);
    margin-top: 32px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.entry-content h4 {
    font-size: 1.1rem;
    color: var(--grey-800);
    margin-top: 28px;
    margin-bottom: 14px;
    line-height: 1.6;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 24px;
    padding-right: 28px;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    margin-bottom: 12px;
    line-height: 2;
}

.entry-content a {
    color: var(--primary);
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.entry-content a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

.entry-content img {
    border-radius: var(--radius-md);
    margin: 28px 0;
    box-shadow: var(--shadow-md);
}

.entry-content blockquote {
    background: var(--lighter);
    border-right: 4px solid var(--primary);
    padding: 24px 28px;
    margin: 28px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1.05rem;
    color: var(--grey-700);
    line-height: 2;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content pre,
.entry-content code {
    font-family: 'Courier New', monospace;
    direction: ltr;
    text-align: left;
}

.entry-content code {
    background: var(--grey-100);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-dark);
}

.entry-content pre {
    background: var(--grey-900);
    color: #E5E7EB;
    padding: 24px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 28px 0;
    font-size: 0.9rem;
    line-height: 1.7;
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
    padding: 14px 18px;
    border: 1px solid var(--grey-300);
    text-align: right;
}

.entry-content th {
    background: var(--grey-100);
    color: var(--grey-900);
}

.entry-content tbody tr:hover {
    background: var(--grey-50);
}

/* ==================== ریسپانسیو ==================== */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .top-bar-left {
        display: none;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-inner {
        height: 60px;
    }

    .blog-hero h1 {
        font-size: 1.5rem;
    }

    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-card-image {
        height: 200px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-search-box form {
        flex-direction: column;
        gap: 10px;
        padding: 14px;
    }

    .hero-search-box .search-icon {
        display: none;
    }

    .hero-search-box input {
        border: 1px solid var(--grey-300);
        border-radius: var(--radius-sm);
        padding: 12px 16px;
    }

    .hero-search-box .btn {
        width: 100%;
    }

    .entry-content {
        padding: 28px 20px;
        font-size: 1rem;
    }

    .entry-content h2 {
        font-size: 1.3rem;
    }

    .entry-content h3 {
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 35px 0 40px;
    }

    .blog-hero h1 {
        font-size: 1.3rem;
    }

    .post-card-body {
        padding: 16px;
    }

    .post-card-image {
        height: 160px;
    }

    .post-card-title {
        font-size: 1rem;
    }
}

/* ==================== بدون مقاله ==================== */
.content-none {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--radius-lg);
}

.content-none h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.content-none p {
    color: var(--text-secondary);
    line-height: 1.9;
}