:root {
    --primary: #0c6b4e;
    --primary-2: #0a5a42;
    --ink: #121417;
    --muted: #67707a;
    --line: #e9ecef;
    --g50: #eefcf4;
    --g100: #d8f7e6;
    --g200: #b7efcf;
    --g300: #8ae3b2;
    --shadow: 0 18px 40px rgba(0, 0, 0, .07);
    --r-lg: 20px;
    --r: 14px;
}




a {
    color: inherit;
    text-decoration: none
}

.wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px
}

/* Header – تخت و شیک با موج سبک */
.hero {
    position: relative;
}

.hero-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.hero img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center;
}

.hero .geo {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .30;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140" viewBox="0 0 140 140"><g fill="none" stroke="%23076B50" stroke-width="1"><path d="M70 0 140 70 70 140 0 70Z"/><circle cx="70" cy="70" r="18"/></g></svg>');
    background-size: 140px 140px;
    background-repeat: repeat;
}

.hero .text {
    position: absolute;
    inset: auto 0 0 0;
    color: #fff;
    padding: 28px 18px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 55%);
}

.hero .text h1 {
    margin-bottom: 6px;
    letter-spacing: .2px;
}

.hero .text p {
    margin: 0;
    opacity: .92;
    color: #fff;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 8px;
}

.divider:before,
.divider:after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(to left, transparent, #b9ccbf 30%, transparent);
}

.kufic {
    display: inline-block;
    border: 1px solid #b9ccbf;
    border-radius: 6px;
    padding: 2px 8px;
    color: #2b564a;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 1px;
}

/* Feature block (right side in RTL) */
.feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
}

.f-cover {
    position: relative
}

.f-cover img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    display: block
}

.f-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #eaf7f1;
    color: #0b3f28;
    border: 1px solid #cdeee0;
    padding: .16rem .6rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: .8rem
}

.f-body {
    padding: 14px
}

.f-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    color: #5f6b72;
    font-size: .9rem
}

.f-title {
    margin: .3rem 0 0;
    font-size: 1.4rem;
    line-height: 1.4;
    font-weight: 900;
    color: #0b3f28
}

.f-excerpt {
    margin: .35rem 0 0;
    color: #364152
}

.f-cta {
    display: flex;
    gap: 8px;
    margin-top: 10px
}

.btn {
    border: 1px solid #e0dfdf;
    background: var(--primary);
    color: #fff;
    padding: .6rem .95rem;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: .24s
}

.btn:hover {
    background: #0a5a42;
    transform: translateY(-1px);
    color: #fff;
}

.btn.ghost {
    background: #fff;
    color: #0b3f28
}

.btn.ghost:hover {
    border: 1px solid #093a28;
}

/* Rail (left column in RTL) */
.rail {
    display: grid;
    gap: 18px;
    height: max-content
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden
}

.card .headx {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    font-weight: 900;
    color: #0b3f28;
    background: #fafafa
}

.tiny {
    padding: 10px 12px;
    display: grid;
    gap: 10px
}

.tiny a {
    display: grid;
    grid-template-columns: 98px 1fr;
    gap: 10px
}

.tiny img {
    width: 98px;
    height: 68px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #eee
}

.tiny .t {
    font-weight: 800
}

.tags {
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.tag {
    padding: .22rem .6rem;
    border: 1px solid #d8f7e6;
    border-radius: 999px;
    background: #eefcf4;
    color: #0b3f28;
    font-weight: 700;
    font-size: .86rem
}

.flex-news {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

/* Controls */
.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 16px 0
}

.chip {
    padding: .42rem .8rem;
    border-radius: 999px;
    border: 1px solid #cfeedd;
    background: #fff;
    cursor: pointer;
    font-weight: 800;
    color: #222;
}

.chip:hover {
    color: #fff;
}

.chip[aria-pressed="true"] {
    background: #eaf7f1;
    border-color: #a3e0c8;
    color: #0b3f28
}

.input {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: .6rem .8rem;
    font: inherit;
    outline: none
}

.input:focus {
    box-shadow: 0 0 0 3px #b7efcf80;
    border-color: #8ae3b2
}

.controls .spacer {
    flex: 1
}

/* Masonry-ish grid */
.grid {
    columns: 3 280px;
    column-gap: 16px;
    /* CSS Columns => حس ماسونری */
}

@media (max-width:900px) {
    .grid {
        columns: 2 260px
    }
}

@media (max-width:620px) {
    .grid {
        columns: 1 100%
    }
}

.card-news {
    display: inline-block;
    width: 100%;
    margin: 0 0 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    transition: transform .2s ease, box-shadow .2s ease;
}

.card-news:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .06)
}

@media (max-width:620px) {
    .card-news .img img {
        width: 100%;
        height: 220px;
        object-fit: cover;
    }
}

.card-news .img img {
    width: 100%;
    /* height: auto; */
    display: block;
}

.card-news .cnt {
    padding: 10px 12px
}

.badge {
    display: inline-block;
    background: #eaf7f1;
    color: #0b3f28;
    border: 1px solid #cdeee0;
    padding: .18rem .55rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: .78rem
}

.meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    color: #5f6b72;
    font-size: .86rem;
    margin-top: 4px
}

.title {
    font-weight: 900;
    margin: .2rem 0 0
}

.foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    color: #5f6b72;
    font-size: .86rem
}

/* Load more */
.more {
    display: flex;
    justify-content: center;
    margin: 18px 0 30px
}

.btn.flat {
    background: #fff;
    color: #0b3f28;
    border-color: #b7efcf
}

.btn.flat:hover {
    background: #eefcf4
}

/* Modal */
.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: #00000066;
    z-index: 50
}

.modal {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(96vw, 920px);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 40px 120px rgba(0, 0, 0, .35);
    z-index: 1000
}

.modal .m-head {
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fafafa
}

.modal .m-head .close {
    margin-inline-start: auto;
    border: 0;
    background: #db1032;
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer
}

.modal .m-body {
    padding: 14px
}

.cover {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #eee;
    margin-bottom: 10px
}

.show {
    display: block
}

/* ====== Hero: موبایل کوتاه‌تر، متن همیشه خوانا ====== */
@media (max-width: 720px) {
    .hero img {
        height: 240px;
    }

    .hero .text {
        padding: 18px 14px 14px;
    }
}

/* ====== Feature + Rail: به Grid تغییر بدیم ====== */
.flex-news {
    display: grid;
    grid-template-columns: 1.7fr .9fr;
    /* دسکتاپ */
    gap: 16px;
    align-items: start;
}

/* تبلت: کمی جمع‌وجورتر */
@media (max-width: 1100px) {
    .flex-news {
        grid-template-columns: 1.2fr .8fr;
    }
}

/* موبایل/عرض‌های باریک: ستونِ واحد */
@media (max-width: 900px) {
    .flex-news {
        grid-template-columns: 1fr;
    }

    .rail {
        position: static;
    }

    /* sticky نه، تا روی موبایل اسکرول طبیعی بشه */
}

/* ====== Feature Cover: به aspect-ratio تغییر بدیم ====== */
.f-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    /* نسبت تصویری تمیز */
    object-fit: cover;
}

/* موبایل: نسبت بازتر تا ارتفاع زیاد نشه */
@media (max-width: 620px) {
    .f-cover img {
        aspect-ratio: 16/10;
    }
}

/* ====== Rail: جمع‌وجورتر در موبایل ====== */
.rail {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 16px;
    height: max-content;
}

@media (max-width: 900px) {
    .rail {
        position: static;
        top: auto;
    }
}

.tiny a {
    display: grid;
    grid-template-columns: 98px 1fr;
    gap: 10px;
    align-items: center;
}

@media (max-width: 420px) {
    .tiny a {
        grid-template-columns: 84px 1fr;
    }

    .tiny img {
        width: 84px;
        height: 60px;
    }
}



/* ====== Masonry Grid: به ستون‌های شناور، فاصله‌ها ثابت ====== */
.grid {
    columns: 3 280px;
    column-gap: 16px;
}

@media (max-width: 980px) {
    .grid {
        columns: 2 260px;
    }
}

@media (max-width: 620px) {
    .grid {
        columns: 1 100%;
    }
}

/* کارت خبر: تصویر واکنش‌گرا */
.card-news .img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* موبایل: یک ارتفاع حداقلی برای کاورها */
@media (max-width: 620px) {
    .card-news .img img {
        aspect-ratio: 16/10;
    }
}

/* ====== Modal: در موبایل تمام‌عرض‌تر و بلندتر ====== */
@media (max-width: 560px) {
    .modal {
        width: min(98vw, 680px);
        max-height: 92vh;
        border-radius: 14px;
    }
}


/* سایه فقط زیر متن هدرِ اخبار */
.hero--news .text {
    position: absolute;
    inset: auto 0 0 0;
    /* پایین تصویر */
    z-index: 2;
    color: #fff;
    padding: 28px 18px 20px;
    /* گرادیان فقط پشت متن */
    background: linear-gradient(to top,
            rgba(0, 0, 0, .70) 0%,
            rgba(0, 0, 0, .40) 55%,
            rgba(0, 0, 0, 0) 100%);
}

/* اگر تو موبایل خوانایی بیشتر خواستی: */
@media (max-width: 600px) {
    .hero--news .text {
        background: linear-gradient(to top,
                rgba(0, 0, 0, .78) 0%,
                rgba(0, 0, 0, .50) 55%,
                rgba(0, 0, 0, 0) 100%);
    }
}

/* دکمه بستن داخل هدر مودال */
.m-head .close {
    margin-inline-start: auto;   /* در RTL می‌چسبه به سمت چپ هدر */
    width: 48px;                 /* تاچ تارگت استاندارد */
    height: 48px;
    border: 0;
    padding: 0;                  /* مزاحمِ مرکزقرارگیری نشه */
    border-radius: 12px;
    background: #db1032;
    color: #fff;
    display: grid;               /* وسط‌چین واقعی */
    place-items: center;         /* افقی/عمودی دقیقاً وسط */
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease;
  }
  .m-head .close:hover { box-shadow: 0 0 0 3px rgba(219,16,50,.18); }
  .m-head .close:active { transform: translateY(1px); }
  
  /* خود آیکن ضربدر (Remix Icon یا Font Awesome) */
  .m-head .close i {
    font-size: 22px;   /* بزرگ‌تر و خواناتر */
    line-height: 1;    /* جلوگیری از آفست عمودی */
    display: block;    /* پایه‌ی متن حذف شود */
  }
  
  /* اگر جایی از پروژه «close-x» هم داری (مثل صفحه مقالات) */
  .close-x {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    padding: 0;
    display: grid;
    place-items: center;
  }
  .close-x i { font-size: 22px; line-height: 1; display: block; }
  
  /* موبایل: کمی بزرگ‌تر برای لمس راحت‌تر */
  @media (max-width:560px){
    .m-head .close,
    .close-x { width: 52px; height: 52px; }
    .m-head .close i,
    .close-x i { font-size: 24px; }
  }
  