/*
Theme Name: ClashYar
Description: قالب اختصاصی، سبک و راست‌چین کلش یار
Version: 0.1.0
Author: ClashYar
Text Domain: clashyar
*/

@font-face {
    font-family: 'IRANSansWeb';
    src: url('assets/fonts/IRANSansWeb.woff2') format('woff2'),
         url('assets/fonts/IRANSansWeb.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html,
body,
button,
input,
textarea,
select,
optgroup,
option {
    font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif;
}

:root {
    --cy-primary: #f0a500;
    --cy-primary-dark: #d88900;
    --cy-dark: #17202a;
    --cy-text: #252525;
    --cy-muted: #6b7280;
    --cy-bg: #f5f6f8;
    --cy-white: #ffffff;
    --cy-border: #e5e7eb;
    --cy-radius: 12px;
    --cy-shadow: 0 5px 20px rgba(0,0,0,.06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--cy-bg);
    color: var(--cy-text);
    font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.9;
    direction: rtl;
}

a {
    color: var(--cy-dark);
    text-decoration: none;
    transition: .2s ease;
}

a:hover {
    color: var(--cy-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: min(1180px, calc(100% - 30px));
    margin-inline: auto;
}

/* =========================================
   HEADER
   ========================================= */

.site-header {
    width: min(1180px, 100%);
    margin: 0 auto;
    background: #17202a;
    position: relative;
    z-index: 100;
}

/* باکس اصلی تصویر هدر */
.site-header-image {
    width: 100%;
    background: #17202a;
    text-align: center;
    line-height: 0;
    overflow: hidden;
}

/* لینک تصویر */
.header-image-link {
    display: block;
    width: 100%;
    max-width: 1045px;
    margin: 0 auto;
}

/* خود تصویر */
.site-header-image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 1045px;
    margin: 0 auto;
}


/* =========================================
   TOP MENU
========================================= */

.top-menu-wrapper {
    background: #fff;
    border-bottom: 1px solid var(--cy-border);
}

.top-navigation {
    min-height: 42px;
}

.top-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 3px;
}

.top-navigation li {
    margin: 0;
    padding: 0;
}

.top-navigation a {
    display: block;

    padding: 7px 13px;

    color: var(--cy-dark);

    font-size: 13px;

    transition: .2s ease;
}

.top-navigation a:hover,
.top-navigation .current-menu-item > a {
    background: #fff5dc;
    color: var(--cy-primary-dark);
}


/* =========================================
   MAIN MENU
========================================= */

.main-menu-wrapper {
    background: #fff;

    border-bottom: 1px solid var(--cy-border);

    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.main-navigation {
    min-height: 54px;

    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;

    padding: 0;
    margin: 0;

    display: flex;
    align-items: center;

    gap: 4px;
}

.main-navigation li {
    margin: 0;
    padding: 0;
}

.main-navigation a {
    display: block;

    padding: 12px 16px;

    color: var(--cy-dark);

    font-size: 14px;
    font-weight: 600;

    border-radius: 8px;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background: #fff5dc;
    color: var(--cy-primary-dark);
}


/* =========================================
   MOBILE MENU
========================================= */

.mobile-menu-toggle {
    display: none;

    border: 1px solid var(--cy-border);

    background: #fff;

    border-radius: 8px;

    padding: 8px 13px;

    cursor: pointer;

    font-family: inherit;

    font-size: 14px;
}

.mobile-menu-toggle span {
    margin-right: 5px;
}

.mobile-navigation {
    display: none;
}

.mobile-navigation ul {
    list-style: none;

    padding: 0;
    margin: 0;
}

.mobile-navigation li {
    border-bottom: 1px solid var(--cy-border);
}

.mobile-navigation a {
    display: block;

    padding: 12px;

    color: var(--cy-dark);
}

.mobile-navigation a:hover {
    background: #fff5dc;
    color: var(--cy-primary-dark);
}


/* =========================
   Search
========================= */

.header-search {
    width: 220px;
}

.header-search form {
    position: relative;
}

.header-search input[type="search"] {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--cy-border);
    border-radius: 9px;
    outline: none;
    background: #fafafa;
}

.header-search input[type="search"]:focus {
    border-color: var(--cy-primary);
    background: #fff;
}

.header-search button {
    position: absolute;
    left: 4px;
    top: 4px;
    height: 34px;
    border: 0;
    background: var(--cy-primary);
    color: #fff;
    border-radius: 7px;
    cursor: pointer;
    padding: 0 10px;
}


/* =========================
   Main
========================= */

.site-main {
    padding: 35px 0 50px;
}

.content-sidebar-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
}

.no-sidebar .content-sidebar-wrap {
    grid-template-columns: 1fr;
}

.content-area {
    min-width: 0;
}

.sidebar {
    min-width: 0;
}


/* =========================
   Hero
========================= */

.cy-hero {
    background: linear-gradient(135deg, #17202a, #293847);
    color: #fff;
    padding: 45px;
    border-radius: var(--cy-radius);
    margin-bottom: 30px;
    box-shadow: var(--cy-shadow);
}

.cy-hero h1 {
    margin: 0 0 10px;
    font-size: 34px;
}

.cy-hero p {
    margin: 0 0 20px;
    color: #d9dee3;
}


/* =========================
   Posts Grid
========================= */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.post-card {
    background: var(--cy-white);
    border: 1px solid var(--cy-border);
    border-radius: var(--cy-radius);
    overflow: hidden;
    box-shadow: var(--cy-shadow);
}

.post-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.04);
}

.post-card-content {
    padding: 18px;
}

.post-card-date,
.entry-meta {
    color: var(--cy-muted);
    font-size: 12px;
}

.post-card h2 {
    font-size: 19px;
    line-height: 1.6;
    margin: 7px 0;
}

.post-card-excerpt {
    color: #555;
    font-size: 14px;
}


/* =========================
   Single / Page
========================= */

.single-post,
.page-content-box,
.archive-header {
    background: var(--cy-white);
    border: 1px solid var(--cy-border);
    border-radius: var(--cy-radius);
    padding: 30px;
    box-shadow: var(--cy-shadow);
}

.entry-title {
    font-size: 32px;
    line-height: 1.5;
    margin: 5px 0 10px;
}

.featured-image {
    margin: 25px 0;
    border-radius: 10px;
    overflow: hidden;
}

.featured-image img {
    display: block;
    width: 100%;
}

.entry-content {
    font-size: 16px;
}

.entry-content h2 {
    margin-top: 35px;
    font-size: 25px;
}

.entry-content h3 {
    margin-top: 28px;
    font-size: 21px;
}

.entry-content img {
    border-radius: 8px;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--cy-border);
    padding: 10px;
}

.entry-content th {
    background: #fff8e9;
}


/* =========================
   Buttons
========================= */

.cy-button,
.wp-block-button__link {
    display: inline-block;
    background: var(--cy-primary);
    color: #fff !important;
    border: 0;
    border-radius: 8px;
    padding: 9px 17px;
    font-weight: 700;
}

.cy-button:hover,
.wp-block-button__link:hover {
    background: var(--cy-primary-dark);
}


/* =========================
   Sidebar
========================= */

.widget {
    background: var(--cy-white);
    border: 1px solid var(--cy-border);
    border-radius: var(--cy-radius);
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: var(--cy-shadow);
}

.widget-title {
    font-size: 18px;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--cy-primary);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f0;
}


/* =========================
   Archive
========================= */

.archive-header {
    margin-bottom: 25px;
}

.archive-title {
    margin: 0 0 5px;
    font-size: 29px;
}

.archive-description {
    color: var(--cy-muted);
}


/* =========================
   Pagination
========================= */

.navigation.pagination {
    margin-top: 30px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.page-numbers {
    display: inline-flex;
    min-width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cy-border);
    background: #fff;
    border-radius: 7px;
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--cy-primary);
    color: #fff;
    border-color: var(--cy-primary);
}


/* =========================
   Forms
========================= */

input,
textarea,
select {
    max-width: 100%;
    border: 1px solid var(--cy-border);
    border-radius: 8px;
    padding: 9px 12px;
    font-family: inherit;
}

button,
input[type="submit"] {
    font-family: inherit;
}


/* =========================
   Footer
========================= */

.site-footer {
    background: var(--cy-dark);
    color: #d8dde2;
    padding: 45px 0 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.site-footer .widget {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.site-footer .widget-title {
    color: #fff;
}

.site-footer a {
    color: #d8dde2;
}

.site-footer a:hover {
    color: var(--cy-primary);
}

.site-info {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}


/* =========================
   WooCommerce basic
========================= */

.woocommerce .site-main {
    min-height: 500px;
}

.woocommerce ul.products {
    margin: 0;
}

.woocommerce div.product {
    background: #fff;
    padding: 25px;
    border-radius: var(--cy-radius);
    border: 1px solid var(--cy-border);
}

.woocommerce div.product .product_title {
    font-size: 28px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--cy-primary-dark);
    font-weight: 800;
}

.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button {
    background: var(--cy-primary);
    color: #fff;
    border-radius: 8px;
}

.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover {
    background: var(--cy-primary-dark);
    color: #fff;
}


@media (max-width: 900px) {

    .container {
        width: min(100% - 20px, 1180px);
    }

    /* منوی بالا در موبایل همچنان نمایش داده می‌شود */
    .top-navigation ul {
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .top-navigation a {
        padding: 7px 10px;
        font-size: 12px;
    }


    /* منوی اصلی دسکتاپ مخفی */
    .main-navigation {
        display: none;
    }


    /* دکمه منوی موبایل */
    .mobile-menu-toggle {
        display: block;
        width: 100%;
        text-align: right;
        margin: 8px 0;
    }


    /* منوی موبایل */
    .mobile-navigation {
        display: none;
        padding-bottom: 10px;
    }

    .mobile-navigation.is-open {
        display: block;
    }


    /* هدر در موبایل */
    .site-header-image img {
        width: 100%;
        height: auto;
    }


    .content-sidebar-wrap {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }
}