/* public/css/header-v2.css */

/* متغیرها */
:root {
    --brand: #1c9630;
    --brand-d: #178126;
    --ring: rgba(28, 150, 48, .25);
    --text: #1f2937;
    --muted: #6b7280;
    --stroke: rgba(0, 0, 0, .08);
}



/* ریشه‌ی هدر v2 */
.v2-header {
    direction: rtl;
    background: linear-gradient(180deg, #f9fafb 0%, #eef6f1 100%);
}

.v2-header-topbar {
    height: 6px;
    background: linear-gradient(90deg, var(--brand) 0%, #29b341 60%, #6ddc7d 100%);
}

/* نوار برند/لوگو + اکشن‌ها */
.v2-topbar {
    background: rgba(255, 255, 255, .78);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--stroke);
    padding: .6rem 0;
}

.v2-logoimg {
    height: 42px;
    width: auto;
    display: block;
}

.v2-brand-name {
    font-weight: 800;
    letter-spacing: -.01em;
    color: #111827;
}

/* دکمه جستجو */
.v2-search-btn {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--stroke);
    background: #fff;
    color: #374151;
    border-radius: .7rem;
    transition: box-shadow .2s ease, transform .06s ease;
}

.v2-search-btn:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.v2-search-btn:active {
    transform: translateY(1px);
}

/* نوار ناوبری */
.v2-navbar-bg {
    background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .7));
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--stroke);
}

.v2-navbar-bg,
.v2-main-navbar {
    position: relative;
    z-index: 2000;
    /* از کاروسل بزرگ‌تر */
}

/* خود منو همیشه رو باشد */
.v2-main-navbar .dropdown-menu,
.v2-dropdown-rtl {
  position: absolute;       /* اطمینان از لایه‌بندی درست */
  z-index: 3000 !important; /* بالاتر از هر اسلاید */
}

/* اسلایدر پایین‌تر از ناوبری بماند */
.v2-hero,
.v2-hero-carousel {
  position: relative;
  z-index: 1;
}

/* اگر اسلایدر یا ظرفش overflow:hidden داشت، مانعش نشویم */
.v2-hero-carousel {
  overflow: visible; /* اگر برای گردی کارت به hidden نیاز داری، فقط روی تصویر/ماسک اعمال کن نه ریشه کاروسل */
}

.v2-main-navbar .navbar-nav .nav-link {
    color: #374151;
    padding: .6rem .9rem;
    border-radius: .6rem;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.v2-main-navbar .nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.v2-main-navbar .nav-link.active {
    color: #111827;
    background: rgba(28, 150, 48, .10);
    box-shadow: inset 0 0 0 2px rgba(28, 150, 48, .12);
}

.v2-text-brand {
    color: var(--brand) !important;
}

/* دکمه شبه-لینک */
.v2-btn-as-link {
    border: 0;
    background: transparent;
    padding: .6rem .9rem;
    cursor: pointer;
    color: #374151;
    border-radius: .6rem;
}

.v2-btn-as-link:hover {
    background: #f3f4f6;
    color: #111827;
}

/* منوی کشویی راست‌به‌چپ */
.v2-dropdown-rtl {
    direction: rtl;
    text-align: right;
}

.v2-dropdown-rtl .dropdown-item {
    padding: .5rem .85rem;
    color: #374151;
}

.v2-dropdown-rtl .dropdown-item:hover {
    background: #eef6f1;
    color: #111827;
}

/* دکمه همبرگری سفارشی (اگر استفاده می‌کنید) */
.v2-toggle-btn {
    display: none;
    position: absolute;
    right: 20px;
    top: 50px;
    height: 20px;
    width: 25px;
    padding: 0;
}

.v2-toggle-btn span {
    display: block;
    height: 2px;
    background: #99eba7;
    margin-bottom: 6px;
}

.v2-toggle-btn .span2 {
    width: 70%;
    transition: all .2s;
}

.v2-toggle-btn .span3 {
    width: 40%;
    transition: all .2s;
}

.v2-toggle-btn:hover .span2 {
    width: 100%;
}

.v2-toggle-btn:hover .span3 {
    width: 100%;
}

/* لینک‌ها در محدوده‌ی هدر v2 */
.v2-header a {
    color: #374151;
    text-decoration: none;
}

.v2-header a:hover {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ریسپانسیو */
@media (max-width: 991.98px) {
    .v2-brand-name {
        display: none;
    }

    .v2-main-navbar .navbar-nav .nav-link {
        padding: .55rem .75rem;
    }
}




.v2-home a {
    color: #374151;
    text-decoration: none;
}

.v2-home a:hover {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ========== HERO / CAROUSEL ========== */
.v2-hero {
    margin: .25rem 0 1rem 0;
}

.v2-hero-carousel {
    border: 1px solid var(--stroke);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
}

.v2-hero-img {
    width: 100%;
    height: auto;
    transition: transform .8s ease;
}

.v2-hero .carousel-item:hover .v2-hero-img {
    transform: scale(1.035);
}

.v2-hero-caption {
    text-align: right;
    background: linear-gradient(180deg, rgba(0, 0, 0, .00) 0%, rgba(0, 0, 0, .55) 100%);
    border-radius: .75rem;
    padding: .75rem .85rem;
}

.v2-hero-title {
    margin: .35rem 0 0 0;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}

.v2-hero-control .carousel-control-prev-icon,
.v2-hero-control .carousel-control-next-icon {
    filter: invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, .4));
}

/* ========== CHIPS/Badges ========== */
.v2-chip {
    display: inline-block;
    background: rgba(28, 150, 48, .9);
    color: #fff;
    border-radius: .6rem;
    padding: .15rem .5rem;
    font-size: .8rem;
}

.v2-chip-muted {
    background: rgba(0, 0, 0, .55);
}

/* ========== SECTION ==========\*/
.v2-section {
    margin: 1.25rem 0 1.5rem 0;
}

.v2-section-head {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.v2-section-title {
    margin: 0;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #111827;
    position: relative;
    margin-bottom: 5px;
}

.v2-section-underline {
    height: 3px;
    flex: 1;
    background: linear-gradient(90deg, var(--brand) 0%, #6ddc7d 100%);
    border-radius: 999px;
}

/* ========== HERO CARD (بزرگ) ========== */
.v2-card-hero {
    position: relative;
    overflow: hidden;
    border-radius: .85rem;
    border: 1px solid var(--stroke);
    background: #fff;
}

.v2-card-hero-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .5s ease;
}

.v2-card-hero:hover .v2-card-hero-img {
    transform: scale(1.02);
}

.v2-card-hero-link {
    display: block;
}

.v2-card-hero-caption {
    position: absolute;
    inset-inline: .6rem;
    bottom: .6rem;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    border-radius: .75rem;
    padding: .55rem .7rem;
}

.v2-card-hero-title {
    margin: .35rem 0 0 0;
}

/* ========== LIST (کوچک‌ها) ========== */
.v2-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.v2-list-row {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    border: 1px solid var(--stroke);
    border-radius: .75rem;
    background: #fff;
    padding: .35rem;
    transition: box-shadow .2s ease, transform .06s ease;
}

.v2-list-row:hover {
    box-shadow: 0 10px 26px rgba(0, 0, 0, .09);
    transform: translateY(-1px);
}

.v2-thumb {
    width: 100px;
    height: 80px;
    border-radius: .6rem;
    overflow: hidden;
    flex: 0 0 auto;
    background: #f7f7f7;
}

.v2-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.v2-meta {
    flex: 1 1 auto;
}

.v2-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .25rem;
}

.v2-list-title {
    font-weight: 600;
}

/* ========== SIDEBAR ========== */
.v2-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.v2-sidebar-widget {
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .7);
    backdrop-filter: saturate(140%) blur(8px);
    border-radius: 1rem;
    padding: .85rem;
}

.v2-link-tile {
    display: flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid var(--stroke);
    border-radius: .6rem;
    padding: .45rem .6rem;
    background: #fff;
    transition: box-shadow .2s ease, transform .06s ease, border-color .2s ease;
}

.v2-link-tile i {
    color: var(--brand);
}

.v2-link-tile:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    transform: translateY(-1px);
    border-color: #1c963033;
}


/* ===== Offcanvas v2 tweaks ===== */
:root{
    --v2-offcanvas-w: 360px;
    --v2-offcanvas-z: 1400; /* بالاتر از اسلایدر/دیگر لایه‌ها */
    --v2-stroke: rgba(0,0,0,.08);
  }
  
  .offcanvas.v2-offcanvas{
    width: min(100vw, var(--v2-offcanvas-w));
    z-index: 120000 !important;

    background: rgba(255,255,255,.95);
    backdrop-filter: saturate(140%) blur(8px);
    border-inline-start: 1px solid var(--v2-stroke);
  }
  .offcanvas-backdrop.show{
    backdrop-filter: blur(2px);
    z-index: calc(var(--v2-offcanvas-z) - 1);
  }
  
  /* لینک‌های فهرست داخل کانواس */
  .v2-drawer-link{
    display:flex; align-items:center; gap:.5rem;
    padding:.5rem .65rem; border-radius:.6rem;
    color:#374151; text-decoration:none;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
  }
  .v2-drawer-link:hover{ background:#f3f4f6; color:#111827; }
  .v2-drawer-link.active{
    color:#111827; background:rgba(28,150,48,.10);
    box-shadow: inset 0 0 0 2px rgba(28,150,48,.12);
  }
  
 

  /* ===== Manual Dark Theme (header + navbar) ===== */
/* فعال با: <html data-theme="dark"> */
html[data-theme="dark"]{
    --brand: #59d074;
    --brand-d: #3fb65b;
    --ring: rgba(89,208,116,.25);
    --text: #e5e7eb;
    --muted: #9ca3af;
    --stroke: rgba(255,255,255,.08);
    color-scheme: dark;
  }
  
  /* پس‌زمینهٔ بدنه */
  html[data-theme="dark"] body{ background:#0b1220; }
  
  /* هدر و نوارهای بالایی */
  html[data-theme="dark"] .v2-header{
    background: linear-gradient(180deg, #0b1220 0%, #0f1a15 100%);
  }
  html[data-theme="dark"] .v2-topbar,
  html[data-theme="dark"] .v2-navbar-bg{
    background: rgba(17,24,39,.80);
    backdrop-filter: saturate(140%) blur(8px);
    border-color: var(--stroke);
  }
  
  /* برند و دکمه جستجو */
  html[data-theme="dark"] .v2-brand-name{ color:#e5e7eb; }
  html[data-theme="dark"] .v2-search-btn{
    background:#111827; color:#e5e7eb; border-color:var(--stroke);
  }
  
  /* لینک‌ها، نوبار و وضعیت active/hover */
  html[data-theme="dark"] .v2-header a{ color:#e5e7eb; }
  html[data-theme="dark"] .v2-header a:hover{ color:#6ddc7d; }
  
  html[data-theme="dark"] .v2-main-navbar .navbar-nav .nav-link{ color:#e5e7eb; }
  html[data-theme="dark"] .v2-main-navbar .nav-link:hover{
    background:#111827; color:#fff;
  }
  html[data-theme="dark"] .v2-main-navbar .nav-link.active{
    background: rgba(28,150,48,.18);
    color:#fff;
    box-shadow: inset 0 0 0 2px rgba(28,150,48,.20);
  }
  
  /* دراپ‌داون راست‌به‌چپ */
  html[data-theme="dark"] .v2-dropdown-rtl{
    background:#0b1220; border-color:var(--stroke);
  }
  html[data-theme="dark"] .v2-dropdown-rtl .dropdown-item{ color:#e5e7eb; }
  html[data-theme="dark"] .v2-dropdown-rtl .dropdown-item:hover{
    background:#111827; color:#fff;
  }
  
  /* اطمینان از روی‌بودن منو */
  html[data-theme="dark"] .v2-main-navbar .dropdown-menu,
  html[data-theme="dark"] .v2-dropdown-rtl{
    position:absolute; z-index:3000 !important;
  }
  
  /* حالت استیکی سایه تیره‌تر */
  html[data-theme="dark"] .v2-navbar-bg.is-sticky{
    box-shadow: 0 6px 16px rgba(0,0,0,.45);
  }
  
  /* کاروسل/کارت‌های هرو اگر داخل هدر می‌آید */
  html[data-theme="dark"] .v2-hero-carousel,
  html[data-theme="dark"] .v2-card-hero,
  html[data-theme="dark"] .v2-list-row,
  html[data-theme="dark"] .v2-sidebar-widget,
  html[data-theme="dark"] .v2-link-tile{
    background:#111827; border-color:var(--stroke);
  }
  html[data-theme="dark"] .v2-section-title{ color:#f3f4f6; }
  html[data-theme="dark"] .v2-list-title{ color:#e5e7eb; }
  html[data-theme="dark"] .v2-thumb{ background:#0f172a; }
  
  /* Offcanvas نسخه v2 (هماهنگ با دارک دستی) */
  html[data-theme="dark"] .offcanvas.v2-offcanvas{
    background: rgba(17,24,39,.94);
    border-color: var(--stroke);
    color:#e5e7eb;
  }
  html[data-theme="dark"] .v2-drawer-link{ color:#e5e7eb; }
  html[data-theme="dark"] .v2-drawer-link:hover{ background:#111827; color:#fff; }
  html[data-theme="dark"] .v2-drawer-link.active{ background:rgba(28,150,48,.18); color:#fff; }
  html[data-theme="dark"] #v2CatsAccordion .accordion-button{
    background:#111827; color:#e5e7eb;
  }
  html[data-theme="dark"] #v2CatsAccordion .accordion-button:not(.collapsed){
    background:#0f172a; color:#fff;
  }
  

  /* =========================
   V2 Dark – Completer Pack
   (append to end of header-v2.css)
   ========================= */

/* 1) Dropdowns (Bootstrappy) */
html[data-theme="dark"] .dropdown-menu{
    background:#0f172a;
    border:1px solid var(--stroke);
    box-shadow:0 12px 28px rgba(0,0,0,.55);
  }
  html[data-theme="dark"] .dropdown-menu .dropdown-item{
    color:#e5e7eb;
  }
  html[data-theme="dark"] .dropdown-menu .dropdown-item:hover,
  html[data-theme="dark"] .dropdown-menu .dropdown-item:focus{
    background:#111827;
    color:#fff;
  }
  
  /* 2) Navbar toggler (همبرگری) */
  html[data-theme="dark"] .navbar-toggler{
    border-color: rgba(255,255,255,.18);
  }
  html[data-theme="dark"] .navbar-toggler:focus{
    box-shadow:0 0 0 3px var(--ring);
  }
  html[data-theme="dark"] .navbar-toggler-icon{
    filter: invert(1) opacity(.9);
  }
  /* اگر از همبرگری سفارشی v2 استفاده می‌کنی */
  html[data-theme="dark"] .v2-toggle-btn span{ background:#59d074; }
  
  /* 3) Search button hover/active + فوکِس */
  html[data-theme="dark"] .v2-search-btn:hover{
    box-shadow:0 10px 24px rgba(0,0,0,.45);
  }
  html[data-theme="dark"] .v2-search-btn:focus{
    outline:0; box-shadow:0 0 0 3px var(--ring);
  }
  
  /* 4) Nav link focus ring */
  html[data-theme="dark"] .v2-main-navbar .nav-link:focus{
    outline:0; box-shadow:0 0 0 3px var(--ring);
  }
  
  /* 5) Sticky navbar shadow (already hinted; stronger here) */
  html[data-theme="dark"] .v2-navbar-bg.is-sticky{
    box-shadow: 0 8px 22px rgba(0,0,0,.50);
  }
  
  /* 6) Section underline (کمی درخشان‌تر در دارک) */
  html[data-theme="dark"] .v2-section-underline{
    background:linear-gradient(90deg, #59d074 0%, #8ef0a5 100%);
  }
  
  /* 7) Chips/Badges contrast */
  html[data-theme="dark"] .v2-chip{
    background:rgba(89,208,116,.95);
    color:#0b1220;
  }
  html[data-theme="dark"] .v2-chip-muted{
    background:#1f2937;
    color:#e5e7eb;
  }
  
  /* 8) Hero caption (خوانایی بیشتر در دارک) */
  html[data-theme="dark"] .v2-hero-caption{
    background: linear-gradient(180deg, rgba(0,0,0,.00) 0%, rgba(0,0,0,.65) 100%);
    color:#f9fafb;
  }
  html[data-theme="dark"] .v2-hero-title{
    color:#fff; text-shadow:0 2px 16px rgba(0,0,0,.6);
  }
  
  /* 9) Link tiles + sidebar icons */
  html[data-theme="dark"] .v2-link-tile{
    background:#111827;
    border-color:var(--stroke);
  }
  html[data-theme="dark"] .v2-link-tile:hover{
    border-color:#59d07433;
    box-shadow:0 10px 24px rgba(0,0,0,.45);
  }
  html[data-theme="dark"] .v2-link-tile i,
  html[data-theme="dark"] .v2-text-brand{
    color:#59d074 !important;
  }
  
  /* 10) Header links + hover underline color هماهنگ با برند */
  html[data-theme="dark"] .v2-header a{
    color:#e5e7eb;
    text-decoration:none;
  }
  html[data-theme="dark"] .v2-header a:hover{
    color:#8ef0a5;
    text-decoration:underline;
    text-underline-offset:3px;
  }
  
  /* 11) Offcanvas (تمِ دارک هماهنگ با آکاردئون) */
  html[data-theme="dark"] .offcanvas.v2-offcanvas{
    background:rgba(17,24,39,.94);
    border-color:var(--stroke);
    color:#e5e7eb;
  }
  html[data-theme="dark"] .offcanvas-header,
  html[data-theme="dark"] .offcanvas-body > .border-bottom,
  html[data-theme="dark"] .offcanvas-body > .border-top{
    border-color: var(--stroke) !important;
  }
  html[data-theme="dark"] .v2-drawer-link{ color:#e5e7eb; }
  html[data-theme="dark"] .v2-drawer-link:hover{ background:#111827; color:#fff; }
  html[data-theme="dark"] .v2-drawer-link.active{
    background:rgba(28,150,48,.18); color:#fff;
  }
  
  /* 12) Accordion in drawer */
  html[data-theme="dark"] #v2CatsAccordion .accordion-button{
    background:#111827; color:#e5e7eb;
  }
  html[data-theme="dark"] #v2CatsAccordion .accordion-button:not(.collapsed){
    background:#0f172a; color:#fff;
  }
  html[data-theme="dark"] #v2CatsAccordion .accordion-body{
    background:#0b1220;
  }
  
  /* 13) Dropdown shadow on navbar (over hero) */
  html[data-theme="dark"] .v2-main-navbar .dropdown-menu{
    z-index: 3000 !important;
    box-shadow: 0 16px 36px rgba(0,0,0,.60);
  }
  
  /* 14) Scrollbar (اختیاری؛ فقط کرومیوم/اِج) */
  html[data-theme="dark"] ::-webkit-scrollbar{
    width:10px; height:10px;
  }
  html[data-theme="dark"] ::-webkit-scrollbar-track{
    background:#0b1220;
  }
  html[data-theme="dark"] ::-webkit-scrollbar-thumb{
    background:#1f2937; border-radius:999px; border:2px solid #0b1220;
  }
  html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{
    background:#374151;
  }

  

  .post-card{
    border:1px solid var(--stroke); border-radius:16px; overflow:hidden;
    background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(255,255,255,.9));
    box-shadow:0 10px 26px rgba(0,0,0,.05);
  }
  .post-head{
    padding:1rem 1.25rem; border-bottom:1px solid var(--stroke); direction:rtl;
    background:linear-gradient(90deg,#f8fafc 0%, #f1f5f9 100%);
  }
  .post-cat.badge{
    background:#1c9630; font-weight:600; letter-spacing:.2px;
  }
  .post-title{ margin:.5rem 0 0 0; font-weight:800; line-height:1.5; }
  .post-meta{ color:var(--muted); font-size:.9rem; display:flex; gap:.75rem; flex-wrap:wrap; }
  .post-meta i{ opacity:.9; margin-left:.25rem; }
  .views-pill{
    display:inline-flex; align-items:center; gap:.35rem; padding:.25rem .6rem; border-radius:999px;
    background:rgba(28,150,48,.08); color:#0f5132; border:1px solid rgba(28,150,48,.18);
  }

  .post-media{ position:relative; }
  .post-media .ratio{ --bs-aspect-ratio: 56%; }
  .post-media img{ width:100%; height:auto; display:block; }
  .media-vignette{ position:absolute; inset:0;
    background:linear-gradient(180deg, transparent 55%, rgba(0,0,0,.25));
    pointer-events:none;
  }
  .media-logo{ position:absolute; top:.75rem; inset-inline-start:.75rem; width:88px; }
  .media-caption{
    position:absolute; inset-inline-end:.75rem; bottom:.75rem;
    background:rgba(0,0,0,.5); color:#fff; padding:.35rem .6rem; border-radius:.6rem;
    max-width:min(85%, 720px); font-size:.95rem;
  }

  .post-body{ direction:rtl; padding:1.25rem 1.25rem 1rem; color:#1f2937; line-height:2; }
  .post-body p{ margin-bottom:1rem; }
  .post-body a{ color:#0f766e; text-decoration:underline; text-underline-offset:3px; }
  .post-body h2, .post-body h3, .post-body h4{ margin:1.25rem 0 .75rem; font-weight:800; }

  .author-card{
    display:flex; gap:.75rem; align-items:center; padding:.6rem .75rem; border-radius:12px;
    border:1px solid var(--stroke); background:#fff; margin:.5rem 0 1rem;
  }
  .author-avatar{ width:44px; height:44px; border-radius:999px; overflow:hidden; border:1px solid var(--stroke); }
  .author-name{ margin:0; font-weight:700; color:#111827; }
  .author-link{ color:#374151; text-decoration:none; } .author-link:hover{ color:#1c9630; text-decoration:underline; }

  .related-card{
    border:1px solid var(--stroke); border-radius:14px; overflow:hidden; background:#fff;
  }
  .related-item{ display:flex; gap:.75rem; padding:.6rem .75rem; align-items:center; border-bottom:1px solid rgba(0,0,0,.05); }
  .related-item:last-child{ border-bottom:0; }
  .related-thumb{ width:86px; height:56px; border-radius:.5rem; overflow:hidden; flex:0 0 86px; }
  .related-title{ margin:0; font-weight:700; line-height:1.5; }
  .related-title a{ color:#111827; text-decoration:none; }
  .related-title a:hover{ color:#1c9630; text-decoration:underline; text-underline-offset:3px; }
  .related-badge{ font-size:.75rem; margin-bottom:.25rem; display:inline-block; }

  .soft-btn{
    display:inline-flex; align-items:center; gap:.4rem; padding:.5rem .85rem; border-radius:10px;
    border:1px solid var(--stroke); background:#fff; transition:transform .06s ease, filter .15s ease;
  }
  .soft-btn:hover{ filter:brightness(1.03); } .soft-btn:active{ transform:translateY(1px); }


  /* فعال‌سازی با: <html data-theme="dark"> */
html[data-theme="dark"]{
  --brand:#59d074;
  --brand-d:#3fb65b;
  --stroke:rgba(255,255,255,.08);
  --muted:#9ca3af;
  color-scheme: dark;
}

/* کارت پست */
html[data-theme="dark"] .post-card{
  border:1px solid var(--stroke);
  border-radius:16px; overflow:hidden;
  background:linear-gradient(180deg, rgba(17,24,39,.94), rgba(17,24,39,.88));
  box-shadow:0 10px 26px rgba(0,0,0,.35);
}

/* هِدِر پست */
html[data-theme="dark"] .post-head{
  padding:1rem 1.25rem; direction:rtl;
  border-bottom:1px solid var(--stroke);
  background:linear-gradient(90deg, #0b1220 0%, #0e1726 100%);
}

/* بج کتگوری */
html[data-theme="dark"] .post-cat.badge{
  background:var(--brand);
  color:#0b1220; font-weight:700;
  letter-spacing:.2px;
}

/* متا/تیتر */
html[data-theme="dark"] .post-title{ color:#f3f4f6; }
html[data-theme="dark"] .post-meta{ color:var(--muted); }
html[data-theme="dark"] .post-meta i{ opacity:.9; }

/* ویوز-پیل */
html[data-theme="dark"] .views-pill{
  background:rgba(89,208,116,.18);
  color:#d1fae5;
  border:1px solid rgba(89,208,116,.35);
}

/* مدیا */
html[data-theme="dark"] .post-media .media-vignette{
  background:linear-gradient(180deg, transparent 55%, rgba(0,0,0,.45));
}
html[data-theme="dark"] .post-media .media-caption{
  background:rgba(0,0,0,.55);
  color:#fff; border:1px solid rgba(255,255,255,.06);
}

/* بدنه */
html[data-theme="dark"] .post-body{
  color:#e5e7eb;
}
html[data-theme="dark"] .post-body a{
  color:#5eead4; /* teal-300 */
  text-decoration:underline; text-underline-offset:3px;
}
html[data-theme="dark"] .post-body a:hover{ color:#a7f3d0; }

/* کارت نویسنده */
html[data-theme="dark"] .author-card{
  display:flex; gap:.75rem; align-items:center;
  padding:.6rem .75rem; border-radius:12px;
  border:1px solid var(--stroke); background:#0b1220;
}
html[data-theme="dark"] .author-avatar{ border:1px solid var(--stroke); }
html[data-theme="dark"] .author-name{ color:#f3f4f6; }
html[data-theme="dark"] .author-link{ color:#e5e7eb; text-decoration:none; }
html[data-theme="dark"] .author-link:hover{ color:var(--brand); text-decoration:underline; }

/* کارت مطالب مرتبط */
html[data-theme="dark"] .related-card{
  border:1px solid var(--stroke); border-radius:14px; overflow:hidden; background:#0b1220;
}
html[data-theme="dark"] .related-item{
  border-bottom:1px solid var(--stroke);
}
html[data-theme="dark"] .related-item:last-child{ border-bottom:0; }
html[data-theme="dark"] .related-title{ color:#e5e7eb; }
html[data-theme="dark"] .related-title a{ color:#e5e7eb; }
html[data-theme="dark"] .related-title a:hover{ color:var(--brand); text-decoration:underline; }
html[data-theme="dark"] .related-badge{
  background:var(--brand); color:#0b1220; border:1px solid rgba(255,255,255,.06);
}

/* دکمه نرم */
html[data-theme="dark"] .soft-btn{
  border:1px solid var(--stroke); background:#0b1220; color:#e5e7eb;
}
html[data-theme="dark"] .soft-btn:hover{ filter:brightness(1.06); }
html[data-theme="dark"] .soft-btn:active{ transform:translateY(1px); }

