/* =========================
   فونت
   ========================= */

@font-face {
    font-family: 'ChishiIranSans';
    src: url('./IRSL.woff2') format('woff2');
    font-style: normal;
    font-weight: 300;
    font-display: swap;
}

/* =========================
   تنظیمات عمومی
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    background: #fcfaf6;
    color: #292e27;
    font-family: 'ChishiIranSans', Tahoma, Arial, sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 2;
    overflow-wrap: break-word;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: #876139;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #ae7137;
    outline-offset: 5px;
}

img {
    max-width: 100%;
    height: auto;
}

[hidden] {
    display: none !important;
}

.cc-wrap {
    width: min(1080px, calc(100% - 40px));
    margin-inline: auto;
}

.cc-skip {
    position: absolute;
    top: -100px;
    inset-inline-start: 16px;
    z-index: 9;
    padding: 10px;
    background: #fff;
}

.cc-skip:focus {
    top: 0;
}

/* =========================
   سربرگ و منو
   ========================= */

.cc-header {
    border-bottom: 1px solid #e6e3da;
}

.cc-header .cc-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-block: 22px;
}

.cc-brand {
    color: #344b3e;
    font-size: 25px;
    font-weight: 700;
}

.cc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

/* =========================
   معرفی صفحه اصلی
   ========================= */

.cc-hero {
    max-width: 720px;
    padding: 65px 0 48px;
}

.cc-kicker {
    color: #816345;
    font-size: 14px;
}

.cc-hero h1 {
    margin: 12px 0;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.6;
}

.cc-hero p {
    max-width: 600px;
    color: #62675f;
}

/* =========================
   عنوان فهرست و جستجو
   ========================= */

.cc-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 24px 0;
}

.cc-tools h2 {
    font-size: 22px;
}

.cc-search {
    width: 280px;
    max-width: 100%;
    padding: 11px 15px;
    border: 1px solid #cbcfc5;
    border-radius: 8px;
    background: #fff;
    color: #292e27;
}

.cc-search::placeholder {
    color: #73796c;
    opacity: 1;
}

/* =========================
   کارت مطالب
   ========================= */

.cc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 55px;
}

.cc-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e5e5dc;
    border-radius: 14px;
    background: #fff;
}

.cc-art {
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid #e5e5dc;
    background: #ecefdf;
    color: #52634b;
    font-size: 20px;
}

.cc-card:nth-child(2n) .cc-art {
    background: #f2e7d9;
    color: #866140;
}

.cc-card:nth-child(3n) .cc-art {
    background: #eee7e1;
    color: #795d50;
}

.cc-art > a {
    display: block;
    width: 100%;
    height: 100%;
}

.cc-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.cc-card-body {
    padding: 22px;
}

.cc-card h3 {
    margin: 8px 0;
    font-size: 19px;
    line-height: 1.8;
}

.cc-card p {
    color: #65685f;
    font-size: 14px;
}

.cc-meta {
    color: #73796c;
    font-size: 12px;
}

.cc-link {
    color: #36503b;
    font-size: 14px;
    font-weight: 700;
}

/* =========================
   درباره وبلاگ
   ========================= */

.cc-about {
    padding: 32px 0 50px;
    border-top: 1px solid #dedfd4;
}

.cc-about p {
    max-width: 700px;
    color: #64695f;
}

/* =========================
   صفحه تمام مطالب
   ========================= */

.cc-article {
    max-width: 760px;
    padding: 45px 0 65px;
}

.cc-article h1 {
    margin-block: 16px 24px;
    font-size: clamp(27px, 4vw, 38px);
    line-height: 1.7;
}

.cc-article h2 {
    margin-top: 36px;
    margin-bottom: 16px;
    font-size: 23px;
    line-height: 1.8;
}

.cc-article h3 {
    margin-top: 28px;
    margin-bottom: 12px;
    font-size: 19px;
    line-height: 1.8;
}

.cc-article p {
    margin-block: 0 20px;
}

.cc-article ul,
.cc-article ol {
    padding-inline-start: 24px;
    margin-block: 16px 24px;
}

.cc-article li {
    margin-bottom: 10px;
}

.cc-article p a,
.cc-article li a,
.cc-article td a {
    color: #36503b;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.cc-article p a:hover,
.cc-article li a:hover,
.cc-article td a:hover {
    color: #876139;
}

.cc-article blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-inline-start: 3px solid #8a744e;
    background: #f3eee4;
}

.cc-article blockquote p:last-child {
    margin-bottom: 0;
}

/* =========================
   تصاویر داخل مطالب
   ========================= */

.cc-recipe-figure,
.cc-article figure {
    margin: 24px 0 32px;
}

.cc-recipe-figure img,
.cc-article figure img,
.cc-article > p > img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    border-radius: 12px;
}

.cc-article figcaption {
    margin-top: 10px;
    color: #65685f;
    font-size: 13px;
    text-align: center;
}

/* =========================
   جدول مواد و اطلاعات
   ========================= */

.cc-article table {
    width: 100%;
    table-layout: fixed;
    margin-block: 20px 28px;
    border-collapse: collapse;
    background: #fff;
}

.cc-article caption {
    margin-bottom: 12px;
    font-weight: 700;
    text-align: start;
}

.cc-article th,
.cc-article td {
    padding: 12px;
    border: 1px solid #dedfd4;
    text-align: start;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.cc-article thead th {
    background: #edf0e7;
    color: #344b3e;
    font-weight: 700;
}

.cc-article tbody tr:nth-child(even) {
    background: #fafbf7;
}

/* =========================
   کادر نکته
   ========================= */

.cc-notice {
    padding: 12px 18px;
    border-inline-start: 3px solid #8a744e;
    background: #f3eee4;
}

/* =========================
   فوتر و جدیدترین مطالب
   ========================= */

.cc-footer {
    padding: 40px 0 24px;
    border-top: 1px solid #dce0d4;
    background: #edf0e7;
}

.cc-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 50px;
}

.cc-footer-grid > section {
    min-width: 0;
}

.cc-footer h2 {
    font-size: 18px;
}

.cc-latest {
    padding: 0;
    list-style: none;
}

.cc-latest li {
    padding: 8px 0;
    border-bottom: 1px solid #d8ded0;
}

.cc-latest time {
    display: block;
    color: #62695b;
    font-size: 12px;
}

.cc-copy {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid #d8ded0;
    color: #656c5e;
    font-size: 12px;
}

/* =========================
   دکمه شناور رفتن به بالا
   ========================= */

.cc-top {
    position: fixed;
    inset-inline-end: 18px;
    bottom: 24px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid #d5dacd;
    border-radius: 50%;
    background: #fff;
    color: #36503b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 15px #23301a12;
}

.cc-top:hover {
    background: #edf0e7;
}

/* =========================
   تبلت
   ========================= */

@media (max-width: 760px) {
    .cc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cc-footer-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cc-hero {
        padding-top: 35px;
    }

    .cc-nav {
        gap: 14px;
        font-size: 14px;
    }
}

/* =========================
   موبایل
   ========================= */

@media (max-width: 500px) {
    .cc-wrap {
        width: calc(100% - 32px);
    }

    .cc-grid {
        grid-template-columns: 1fr;
    }

    .cc-header .cc-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cc-tools {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .cc-search {
        width: 100%;
    }

    .cc-article {
        padding-block: 28px 45px;
    }

    .cc-article th,
    .cc-article td {
        padding: 10px;
        font-size: 14px;
    }
}

/* =========================
   کاهش حرکت
   ========================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}