/*
Theme Name: Khodro Fanavar
Theme URI: https://khodrofanavar.com
Author: Khodro Fanavar Team
Description: قالب اختصاصی خبری خودرو فناور برای انتشار خودکار اخبار از کانال تلگرام. راست‌چین، فارسی، سبک ادیتوریال مینیمال، بهینه برای سئو.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: khodro-fanavar
Tags: news, rtl, persian, custom-colors
*/

:root{
    --accent: #31AB53;       /* سبز لوگو - برای برچسب‌ها، لینک‌ها، دکمه‌ها */
    --accent-dark: #4fd478;
    --ink: #000000;          /* مشکی برای هدر و فوتر */
    --header-bg: #000000;    /* مشکی برای هدر و فوتر */
    --bg: #000000;
    --surface: #161616;
    --text: #f2f2f2;
    --text-muted: #a3a3a3;
    --border: #2b2b2b;
    --heading: #ffffff;
    --radius: 6px;
    --shadow: none;
    --font-fa: 'Vazirmatn', 'Iran Sans', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { direction: rtl; }

body{
    font-family: var(--font-fa);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.85;
    font-size: 16px;
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; height: auto; display:block; }
ul{ margin:0; padding:0; list-style: none; }

.container{
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.site-header{
    background: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--accent);
}
.header-top{
    background: #000;
    color:#cfcfcf;
    font-size: 12.5px;
    padding: 6px 0;
    border-bottom: 1px solid #232323;
}
.header-top .container{
    display:flex;
    justify-content: space-between;
    align-items:center;
}
.header-top a{ color:#fff; }
.header-main{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 14px 0;
}
.site-branding{ display:flex; align-items:center; gap:12px; }
.site-branding img.custom-logo{ max-height: 100px; width:auto; }
.site-title{ font-size: 20px; font-weight:800; margin:0; color: #fff; }
.site-description{ font-size:12px; color: #9a9a9a; margin:2px 0 0; }

.main-navigation ul{ display:flex; gap: 24px; }
.main-navigation a{
    font-weight:700;
    font-size:14px;
    color:#e9e9e9;
    padding: 8px 2px;
    border-bottom: 2px solid transparent;
    transition:.2s;
    text-transform: uppercase;
    letter-spacing:.3px;
}
.main-navigation a:hover, .main-navigation .current-menu-item a{
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.menu-toggle{
    display:none;
    background: var(--accent);
    color:#fff;
    border:none;
    border-radius:4px;
    padding:8px 12px;
    font-size:14px;
    cursor:pointer;
}

/* ===== Category feature strip (سه دسته ویژه) ===== */
.category-strip{ padding: 28px 0 6px; }
.category-strip .grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.category-card{
    position:relative;
    border-radius: var(--radius);
    overflow:hidden;
    height: 210px;
    display:flex; align-items:flex-end;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
    transition: box-shadow .3s ease, transform .3s ease;
}
.category-card:hover{
    box-shadow: 0 0 22px 4px var(--accent), 0 8px 20px rgba(0,0,0,.4);
    transform: translateY(-3px);
}
.category-card img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.category-card::after{
    content:''; position:absolute; inset:0;
    background: linear-gradient(0deg, rgba(0,0,0,.82) 10%, rgba(0,0,0,.05) 65%);
}
.category-card .cc-body{ position:relative; z-index:2; padding: 16px 18px; width:100%; }
.category-card .cc-eyebrow{
    display:inline-block; background: var(--accent); color:#fff; font-size:11px;
    padding:3px 10px; border-radius:3px; font-weight:700; margin-bottom:8px;
    text-transform:uppercase; letter-spacing:.5px;
}
.category-card h3{ color:#fff; font-size:19px; margin:0; line-height:1.6; font-weight:800; }

/* ===== Hero / Latest ===== */
.hero-section{ padding: 28px 0 10px; }
.hero-grid{ display:grid; grid-template-columns: 2fr 1fr; gap:20px; }
.hero-main{ position:relative; border-radius: var(--radius); overflow:hidden; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.hero-main img{ width:100%; height: 420px; object-fit:cover; }
.hero-main .hero-overlay{
    position:absolute; inset:auto 0 0 0;
    background: linear-gradient(0deg, rgba(0,0,0,.88), transparent);
    color:#fff; padding: 30px 26px 20px;
}
.hero-overlay .badge{ background: var(--accent); padding:4px 12px; border-radius:3px; font-size:11px; font-weight:700; text-transform:uppercase; display:inline-block; margin-bottom:10px; }
.hero-overlay h2{ font-size: 26px; margin:0 0 6px; line-height:1.6; font-weight:800; }
.hero-side{ display:flex; flex-direction:column; gap:14px; }
.hero-side-item{ display:flex; gap:12px; background:var(--surface); border:1px solid var(--border); border-radius: var(--radius); padding:10px; }
.hero-side-item img{ width:100px; height:80px; object-fit:cover; border-radius:4px; flex-shrink:0; }
.hero-side-item h3{ font-size:14px; margin:0; line-height:1.7; font-weight:700; }

/* ===== Post Grid ===== */
.section-title{
    display:flex; align-items:center; gap:10px; justify-content:space-between;
    font-size:20px; font-weight:800; margin: 36px 0 18px;
    padding-bottom:10px; border-bottom: 3px solid var(--heading);
    color: var(--heading);
    text-transform: uppercase;
}
.section-title span.bar{ color:var(--accent); }
.posts-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.post-card{
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow:hidden;
    transition: box-shadow .2s;
    display:flex; flex-direction:column;
}
.post-card:hover{ box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.post-card .thumb{ position:relative; }
.post-card .thumb img{ width:100%; height:190px; object-fit:cover; }
.post-card .thumb .cat{
    position:absolute; top:10px; right:10px;
    background: var(--accent); color:#fff; font-size:11px; font-weight:700;
    padding:4px 10px; border-radius:3px; text-transform:uppercase;
}
.post-card .body{ padding: 14px 16px 18px; flex:1; display:flex; flex-direction:column; }
.post-card h3{ font-size:16px; line-height:1.8; margin:0 0 8px; font-weight:800; }
.post-card h3 a:hover{ color: var(--accent); }
.post-card .excerpt{ font-size:13px; color:var(--text-muted); flex:1; margin-bottom:10px; }
.post-meta{ font-size:12px; color:var(--text-muted); display:flex; gap:10px; align-items:center; }

.section-more{ text-align:center; margin: 24px 0 10px; }
.btn-pill{
    display:inline-block; background: var(--ink); color:#fff !important;
    padding:10px 26px; border-radius:30px; font-size:13px; font-weight:700;
    text-transform:uppercase; letter-spacing:.4px;
}
.btn-pill:hover{ background: var(--accent); }

/* ===== Single ===== */
.single-post{ padding: 30px 0 60px; }
.single-post .post-header{ margin-bottom:20px; }
.single-post .post-header .cat-badge{
    background: var(--accent); color:#fff; font-size:11px; font-weight:700; padding:5px 12px; border-radius:3px; text-transform:uppercase;
}
.single-post h1{ font-size: 30px; line-height:1.8; margin: 14px 0 10px; color: var(--heading); font-weight:800; }
.single-post .featured-image{ border-radius: var(--radius); overflow:hidden; margin: 18px 0; }
.single-post .entry-content{ font-size:17px; line-height:2.1; }
.single-post .entry-content p{ margin: 0 0 18px; }
.single-post .entry-content h2{ color: var(--heading); font-size:22px; margin-top:30px; border-right:4px solid var(--accent); padding-right:10px; }
.single-post .entry-content h3{ color: var(--accent-dark); font-size:19px; }
.single-post .entry-content img{ border-radius:4px; margin: 14px 0; }
.single-post .entry-content blockquote{
    border-right:4px solid var(--accent); background:var(--surface);
    margin:0; padding: 14px 18px; border-radius:4px; color:var(--text);
}
.share-box{ display:flex; align-items:center; gap:10px; margin: 26px 0; padding:14px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }

.content-layout{ display:grid; grid-template-columns: 2.3fr 1fr; gap: 30px; }
.sidebar .widget{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; margin-bottom:20px; }
.sidebar .widget h4{ margin:0 0 14px; border-bottom:3px solid var(--heading); padding-bottom:8px; font-size:14px; text-transform:uppercase; }
.sidebar .related-item{ display:flex; gap:10px; margin-bottom:12px; }
.sidebar .related-item img{ width:64px; height:52px; object-fit:cover; border-radius:4px; }
.sidebar .related-item h5{ font-size:13px; margin:0; line-height:1.6; font-weight:700; }

/* ===== Footer ===== */
.site-footer{ background: var(--header-bg); color:#c9c9c9; margin-top: 50px; padding: 40px 0 0; }
.footer-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:30px; padding-bottom:30px; border-bottom:1px solid #262626; }
.footer-grid img.footer-logo{ max-height:88px; margin-bottom:12px; }
.footer-grid h4{ font-size:14px; margin-bottom:14px; color:#fff; text-transform:uppercase; }
.footer-grid p, .footer-grid a{ color: #b3b3b3; font-size:14px; }
.footer-grid ul li{ margin-bottom:8px; }
.footer-contact-btn{
    display:inline-flex; align-items:center; gap:8px;
    background: var(--accent); color:#fff !important; padding:9px 18px;
    border-radius:30px; margin-top:10px; font-size:13px; font-weight:700;
}
.contact-icons{ display:flex; flex-direction:column; gap:10px; margin-top:6px; }
.contact-icon-btn{
    display:inline-flex; align-items:center; gap:10px;
    background: var(--surface); border:1px solid var(--border);
    padding:8px 14px; border-radius:8px; font-size:13px; color:var(--text) !important;
    width:fit-content; transition:.2s;
}
.contact-icon-btn:hover{ border-color: var(--accent); }
.contact-icon-btn svg{ flex-shrink:0; }
.site-info{ text-align:center; padding: 16px 0; font-size:12.5px; color:#777; }

/* ===== Pagination ===== */
.pagination{ display:flex; gap:8px; justify-content:center; margin: 30px 0; }
.pagination a, .pagination span{
    padding:8px 14px; border-radius:4px; background:var(--surface); border:1px solid var(--border); font-size:14px;
}
.pagination .current{ background: var(--ink); color:#fff; border-color: var(--ink); }

/* ===== Responsive ===== */
@media (max-width: 900px){
    .hero-grid, .content-layout, .category-strip .grid{ grid-template-columns: 1fr; }
    .posts-grid{ grid-template-columns: repeat(2,1fr); }
    .footer-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 600px){
    .posts-grid{ grid-template-columns: 1fr; }
    .main-navigation{ display:none; position:absolute; top:100%; right:0; left:0; background: var(--header-bg); }
    .main-navigation.open{ display:block; }
    .main-navigation ul{ flex-direction:column; padding: 14px 20px; gap: 14px; }
    .menu-toggle{ display:inline-block; }
    .hero-main img{ height: 260px; }
}
