@font-face {
    font-family: "Doran";
    src: url("fonts/Doran-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
}

html,
body,
html *,
body * {
    font-family: "Doran", sans-serif !important;

}

:root {
    --bg: #06130f;
    --bg-2: #091c17;

    --card: #0b211b;
    --card-2: #0d281f;

    --primary: #20d6b2;
    --primary-dark: #0ea58e;
    --primary-soft: rgba(32, 214, 178, .12);

    --gold: #c7a65a;

    --text: #effffb;
    --muted: #78958e;

    --border: rgba(59, 221, 191, .12);

    --green-glow: rgba(32, 214, 178, .18);
}

@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap");
:root{--bg:#06130f;--card:#0b211b;--line:#173d2a;--g:#20d6b2;--muted:#78958e;--text:#effffb}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:radial-gradient(circle at 80% 0,#0d281f 0,transparent 27rem),var(--bg);color:var(--text);font-family:Vazirmatn,Tahoma,sans-serif}a{text-decoration:none;color:inherit}button,input{font:inherit}.header{position:sticky;top:12px;z-index:20;width:min(1180px,calc(100% - 28px));margin:12px auto 0;padding:12px 16px;border:1px solid var(--line);border-radius:18px;background:#06100de8;backdrop-filter:blur(15px);display:flex;align-items:center;justify-content:space-between}.brand{font-weight:900}.brand b{display:inline-grid;place-items:center;background:var(--g);color:#021008;width:34px;height:34px;border-radius:11px;margin-left:7px}.header nav{display:flex;gap:7px}.header nav a{font-size:13px;color:#a8bbb5;padding:8px 11px;border-radius:10px}.header nav a:hover{background:#143321;color:var(--g)}.menu{display:none;background:none;color:white;border:0;font-size:23px}main{width:min(1180px,calc(100% - 28px));margin:auto}.hero{min-height:410px;display:grid;grid-template-columns:1.1fr .9fr;gap:35px;align-items:center;padding:65px 15px 50px}.hero small,.head small,.panel>small{color:var(--g);font-weight:800}.hero h1{font-size:clamp(34px,5vw,62px);line-height:1.2;margin:12px 0}.hero p{color:var(--muted);line-height:2;max-width:580px}.green-btn,.read{display:inline-block;background:var(--g);color:#031107;border:0;border-radius:12px;padding:11px 16px;font-weight:900}.hero-art{height:300px;border:1px solid var(--line);border-radius:32px;display:grid;place-items:center;position:relative;background:radial-gradient(circle,#0f3124 0,transparent 40%),#07120f}.hero-art i{font-style:normal;font-size:95px;color:var(--g);text-shadow:0 0 45px #20d6b266}.hero-art span{position:absolute;bottom:25px;font-weight:800;color:#c8eee1}.head{display:flex;justify-content:space-between;align-items:end;margin:18px 0}.head h2,.panel h2{margin:6px 0;font-size:25px}.featured{display:grid;grid-template-columns:.95fr 1.05fr;border:1px solid var(--line);border-radius:24px;overflow:hidden;background:#0b211b;box-shadow:0 20px 60px #0005}.pic,.modalpic{position:relative;min-height:270px;background:linear-gradient(135deg,#0b211b,#0d0b09 55%,#0d281f)}.pic:after,.modalpic:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 30% 30%,#20d6b244,transparent 22%),linear-gradient(135deg,#0000,#0009)}.pic em,.modalpic em{position:absolute;z-index:2;top:15px;right:15px;background:var(--g);color:#031107;padding:6px 10px;border-radius:9px;font-size:11px;font-style:normal;font-weight:900}.feature-text{padding:35px;display:flex;flex-direction:column;justify-content:center}.feature-text label,.modalbody label{font-size:11px;color:var(--muted)}.feature-text h2{font-size:29px;line-height:1.5}.feature-text p{color:var(--muted);line-height:2}.read{width:max-content}.pills{display:flex;gap:8px;overflow:auto;padding-bottom:8px}.pills button{flex:0 0 auto;border:1px solid var(--line);background:transparent;color:#9bb1aa;padding:9px 13px;border-radius:999px}.pills button.active,.pills button:hover{background:var(--g);color:#031107;border-color:var(--g)}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:17px;margin-top:15px}.card{border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--card);transition:.25s}.card:hover{transform:translateY(-5px);border-color:#20d6b266}.cardpic{height:185px;position:relative}.cardpic em{position:absolute;z-index:2;top:13px;right:13px;background:var(--g);color:#031107;padding:5px 9px;border-radius:8px;font-size:10px;font-style:normal;font-weight:900}.p2{background:linear-gradient(135deg,#0d281f,#07100f 55%,#0d281f)}.p3{background:linear-gradient(135deg,#0d281f,#0c0e0a 55%,#0d281f)}.p4{background:linear-gradient(135deg,#0b211b,#090c12 55%,#0d281f)}.p5{background:linear-gradient(135deg,#0d281f,#070d0d 55%,#0d281f)}.p6{background:linear-gradient(135deg,#0b211b,#090c0b 55%,#0d281f)}.p7{background:linear-gradient(135deg,#0d281f,#080e0e 55%,#0d281f)}.cardtext{padding:17px}.cardtext label{font-size:10px;color:var(--g)}.cardtext h3{font-size:16px;line-height:1.7;margin:9px 0}.cardtext p{font-size:12px;color:var(--muted);line-height:1.9}.cardtext button{border:0;background:none;color:var(--g);font-weight:800;font-size:12px}.lower{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:75px 0 55px}.panel{border:1px solid var(--line);border-radius:22px;background:#081a15;padding:24px}.search{display:flex;margin-top:18px;border:1px solid var(--line);border-radius:13px;overflow:hidden}.search input{flex:1;min-width:0;background:none;border:0;outline:0;color:white;padding:13px}.search button{width:50px;border:0;background:var(--g);color:#031107;font-size:23px}.result{display:flex;justify-content:space-between;padding:10px;margin-top:7px;background:#ffffff05;border-radius:10px;font-size:12px}.result button{border:0;background:none;color:var(--g)}.catlist{display:grid;gap:8px;margin-top:18px}.catlist button{border:0;background:#ffffff05;color:#d5e8e2;padding:12px;border-radius:11px;display:flex;justify-content:space-between}.catlist b{color:var(--g)}footer{width:min(1180px,calc(100% - 28px));margin:auto;border-top:1px solid var(--line);padding:22px 0 35px;display:flex;justify-content:space-between;color:#667f77;font-size:11px}.modal{display:none;position:fixed;inset:0;z-index:100}.modal.open{display:block}.back{position:absolute;inset:0;background:#000c;backdrop-filter:blur(9px)}.modalbox{position:absolute;width:min(880px,calc(100% - 24px));max-height:92vh;top:4vh;left:50%;transform:translateX(-50%);overflow:hidden;border:1px solid #20d6b244;border-radius:24px;background:#06130f;box-shadow:0 30px 100px #000}.modalpic{min-height:210px}.modalbody{max-height:calc(92vh - 210px);overflow-y:auto;padding:28px 34px 40px;scrollbar-color:var(--g) #06130f}.modalbody h2{font-size:30px;line-height:1.5}.modalbody label{color:var(--g)}.modalbody .lead{border-right:3px solid var(--g);padding-right:13px;color:#c4d7d0;line-height:2.1}.modalbody p,.modalbody div{color:#aebfb9;line-height:2.25;font-size:14px}.modalbody h3{color:white}.close{position:absolute;z-index:3;top:12px;left:12px;width:40px;height:40px;border-radius:50%;border:1px solid #fff2;background:#0009;color:white;font-size:28px}.modal.open~*{pointer-events:none}body.lock{overflow:hidden}@media(max-width:850px){.header nav{display:none}.menu{display:block}.hero{grid-template-columns:1fr}.featured{grid-template-columns:1fr}.grid{grid-template-columns:repeat(2,1fr)}.lower{grid-template-columns:1fr}}@media(max-width:560px){.hero{padding:40px 5px}.hero-art{height:210px}.hero h1{font-size:35px}.grid{grid-template-columns:1fr}.feature-text{padding:23px}.feature-text h2{font-size:23px}.modalbox{top:2vh;max-height:96vh}.modalpic{min-height:160px}.modalbody{max-height:calc(96vh - 160px);padding:22px 18px 30px}.modalbody h2{font-size:23px}footer{flex-direction:column;gap:7px}}
/* =====================================================
   MAIN SITE COLOR OVERRIDE
===================================================== */

body {
    background: var(--bg) !important;
    color: var(--text) !important;
}

.header {
    background: rgba(6, 19, 15, .88) !important;
    border-bottom-color: rgba(59, 221, 191, .08) !important;
    backdrop-filter: blur(18px);
}

.header.scrolled {
    background: rgba(4, 15, 12, .97) !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .25);
}

.brand {
    color: var(--text) !important;
}

.brand b {
    color: var(--primary) !important;
}

.header nav a {
    color: #718b84 !important;
}

.header nav a:hover,
.header nav a.active {
    color: var(--text) !important;
    background: rgba(32, 214, 178, .08) !important;
}

.menu {
    color: var(--text) !important;
}

/* HERO */

.hero {
    background: transparent !important;
}

.hero small,
.head small {
    color: var(--primary) !important;
}

.hero h1,
.head h2 {
    color: var(--text) !important;
}

.hero p {
    color: var(--muted) !important;
}

/* BUTTON */

.green-btn {
    background: var(--primary) !important;
    color: #04251d !important;
}

.green-btn:hover {
    background: var(--primary-dark) !important;
    box-shadow: 0 10px 30px var(--green-glow);
}

/* FEATURED */

.featured {
    background: rgba(9, 31, 25, .7) !important;
    border-color: var(--border) !important;
}

.feature-text label {
    color: var(--primary) !important;
}

.feature-text h2 {
    color: var(--text) !important;
}

.feature-text p {
    color: var(--muted) !important;
}

.read {
    color: var(--primary) !important;
}

.read:hover {
    color: var(--primary-dark) !important;
}

/* CARDS */

.card {
    background: rgba(9, 31, 25, .7) !important;
    border-color: var(--border) !important;
}

.card:hover {
    border-color: rgba(32, 214, 178, .30) !important;
    background: rgba(12, 40, 32, .85) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .16);
}

.cardpic {
    background-color: var(--card) !important;
}

.cardpic em {
    background: rgba(3, 10, 6, .75) !important;
    border-color: rgba(32, 141, 214, 0.3) !important;
    color: var(--primary) !important;
}

.cardtext label {
    color: var(--primary) !important;
}

.cardtext h3 {
    color: var(--text) !important;
}

.cardtext p {
    color: var(--muted) !important;
}

.cardtext button {
    color: #ffffff !important;
}

.cardtext button:hover {
    color: var(--primary-dark) !important;
}

/* CATEGORY PILLS */

.pills button {
    background: var(--card) !important;
    border-color: var(--border) !important;
    color: var(--muted) !important;
}

.pills button:hover,
.pills button.active {
    background: var(--primary-soft) !important;
    border-color: rgba(32, 214, 178, .30) !important;
    color: var(--primary) !important;
}

/* SEARCH */

.panel {
    background: rgba(9, 31, 25, .7) !important;
    border-color: var(--border) !important;
}

.panel small {
    color: var(--primary) !important;
}

.panel h2 {
    color: var(--text) !important;
}

.search {
    background: rgba(3, 19, 15, .55) !important;
    border-color: var(--border) !important;
}

.search input {
    color: var(--text) !important;
    background: transparent !important;
}

.search input::placeholder {
    color: var(--muted) !important;
}

.search button {
    background: var(--primary) !important;
    color: #04251d !important;
}

/* CATEGORY LIST */

.catlist button {
    background: rgba(3, 19, 15, .55) !important;
    color: #94aaa3 !important;
    border-color: var(--border) !important;
}

.catlist button:hover {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
}

.catlist b {
    color: var(--primary) !important;
}

/* SEARCH RESULTS */

.result {
    background: rgba(3, 19, 15, .55) !important;
    border-color: var(--border) !important;
}

.result span {
    color: var(--text) !important;
}

.result button {
    color: var(--primary) !important;
}

/* MODAL */

.modalbox {
    background: var(--card) !important;
    border-color: var(--border) !important;
}

.close {
    background: rgba(3, 10, 6, .75) !important;
    color: var(--text) !important;
}

.close:hover {
    background: var(--primary) !important;
    color: #04251d !important;
}

.modalbody label {
    color: var(--primary) !important;
}

.modalbody h2 {
    color: var(--text) !important;
}

.modalbody .lead,
.modalbody p {
    color: var(--muted) !important;
}

.modalbody h3 {
    color: var(--text) !important;
}

/* FOOTER */

footer {
    background: #04100d !important;
    border-top-color: rgba(59, 221, 191, .08) !important;
}

footer span:first-child {
    color: var(--primary) !important;
}

footer span:last-child {
    color: var(--muted) !important;
}

/* EMPTY STATE */

.empty-state {
    background: rgba(9, 31, 25, .7) !important;
    border: 1px solid var(--border) !important;
    color: var(--muted) !important;
}

.empty-state h3 {
    color: var(--text) !important;
}
.read,
.read:hover,
.read:focus,
.read:active {
    color: #000000 !important;
}
/* هماهنگ شدن همه تصاویر وبلاگ با قاب */
.cardpic,
.pic,
.modalpic {
    background-size: contain  !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}
/* =========================================================
   ALMAHDI — MASTER VISUAL THEME
   GEOMETRIC BACKGROUND + GREEN PREMIUM STYLE
   بدون تغییر Layout / Icon Size / Icon Position
========================================================= */


/* =========================================================
   COLORS
========================================================= */

:root {
    --master-bg: #f3faf7;
    --master-primary: #18b98d;
    --master-primary-dark: #0d8f6d;
    --master-text: #12382d;
    --master-muted: #648078;
    --master-border: rgba(24,185,141,.15);
}


/* =========================================================
   BASE
========================================================= */

html {
    background: var(--master-bg) !important;
}

body {

    background-color:
        var(--master-bg) !important;

    color:
        var(--master-text);

    position: relative;

    overflow-x: hidden;
}


/* =========================================================
   ⭐ GEOMETRIC BACKGROUND
   این بخش طرح اصلی را به همه صفحات می‌دهد
========================================================= */

body::before {

    content: "";

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 0;

    opacity: .22;

    background-image:

        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='%23117e5f' stroke-width='0.8' opacity='.72'%3E%3Cpath d='M22.5 0L45 13L67.5 0L90 13L90 39L67.5 52L67.5 78L45 90L22.5 78L0 90L0 64L22.5 51L22.5 26L0 13L22.5 0Z'/%3E%3Cpath d='M22.5 26L45 39L67.5 26L67.5 52L45 65L22.5 52Z'/%3E%3Cpath d='M0 39L22.5 26L45 39L45 65L22.5 78L0 65Z'/%3E%3Cpath d='M45 13L45 39L67.5 52L90 39'/%3E%3Cpath d='M22.5 51L45 39L67.5 52'/%3E%3C/g%3E%3C/svg%3E"),

        radial-gradient(
            circle at 15% 10%,
            rgba(24,185,141,.10),
            transparent 28%
        ),

        radial-gradient(
            circle at 85% 85%,
            rgba(24,185,141,.08),
            transparent 30%
        );

    background-repeat:
        repeat,
        no-repeat,
        no-repeat;

    background-size:
        135px 135px,
        auto,
        auto;

    background-position:
        center top,
        top left,
        bottom right;
}


/* =========================================================
   صفحه‌های اصلی را شفاف می‌کنیم
   تا هندسه پشتشان دیده شود
   این بخش به کارت‌ها دست نمی‌زند
========================================================= */

main,
.page,
.main,
.container,
.gallery-container,
.login-page,
.content,
.site-main,
.main-content {

    background:
        transparent !important;
}


/* =========================================================
   CONTENT ABOVE BACKGROUND
========================================================= */

body > * {

    position: relative;
    z-index: 1;
}


/* =========================================================
   MASTER VARIABLES
========================================================= */

body {

    --primary:
        var(--master-primary);

    --primary-dark:
        var(--master-primary-dark);

    --text:
        var(--master-text);

    --muted:
        var(--master-muted);

    --border:
        var(--master-border);
}


/* =========================================================
   HEADER
========================================================= */

.header,
.topbar,
.site-header {

    background:
        rgba(248,253,250,.90) !important;

    border-color:
        rgba(24,185,141,.13) !important;

    backdrop-filter:
        blur(18px);
}


/* =========================================================
   NAV
========================================================= */

.header nav a,
.nav a,
.site-nav a,
.sidebar-nav a {

    color:
        #58756b !important;
}

.header nav a:hover,
.header nav a.active,
.nav a:hover,
.nav a.active,
.site-nav a:hover,
.site-nav a.active,
.sidebar-nav a:hover,
.sidebar-nav a.active {

    color:
        var(--master-primary) !important;
}


/* =========================================================
   CARDS
   اندازه و جای آیکون‌ها دست نخورده
========================================================= */

.card,
.panel,
.stat-card,
.category-card,
.image-card,
.login-card,
.featured,
.upload-panel,
.toolbar,
.posts-panel,
.welcome-card,
.about-card,
.program-card,
.contact-card,
.servant-card,
.gallery-item,
.memories-section,
.hero-card,
.modal-card,
.modalbox {

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.96),
            rgba(237,248,243,.96)
        ) !important;

    border-color:
        var(--master-border) !important;

    box-shadow:
        0 18px 50px
        rgba(4,58,44,.10) !important;
}


/* =========================================================
   GREEN ELEMENTS
========================================================= */

.primary-btn,
.green-btn,
.read,
.view-gallery,
.search button {

    background:
        var(--master-primary) !important;

    color:
        #ffffff !important;
}


.primary-btn:hover,
.green-btn:hover,
.read:hover {

    background:
        var(--master-primary-dark) !important;
}


/* =========================================================
   LABELS / TITLES
========================================================= */

.label,
.eyebrow,
.tag,
.hero-small,
.category-count,
.cardtext label,
.category-info h3,
.section-heading > span,
.section-heading h2 span {

    color:
        var(--master-primary) !important;
}


/* =========================================================
   INPUTS
========================================================= */

input,
textarea,
select {

    background:
        rgba(250,254,252,.96) !important;

    color:
        var(--master-text) !important;

    border-color:
        var(--master-border) !important;
}


/* =========================================================
   ICONS
   ⚠️ فقط رنگ
   ❌ بدون width
   ❌ بدون height
   ❌ بدون position
   ❌ بدون margin
   ❌ بدون padding
========================================================= */

.logo-icon,
.brand-mark,
.brand-icon,
.quick-icon,
.servant-avatar,
.login-icon,
.admin-avatar,
.avatar,
.nav-icon,
.search-btn,
.menu-btn {

    color:
        var(--master-primary) !important;
}


/* =========================================================
   ICON BOX
========================================================= */

.logo-icon,
.brand-mark,
.brand-icon,
.quick-icon,
.servant-avatar,
.login-icon,
.admin-avatar,
.avatar {

    background:
        rgba(24,185,141,.09) !important;

    border-color:
        rgba(24,185,141,.18) !important;
}


/* =========================================================
   HERO
========================================================= */

.hero {

    border-color:
        rgba(24,185,141,.16) !important;

    box-shadow:
        0 25px 75px
        rgba(3,55,42,.12) !important;
}


/* =========================================================
   TEXT
========================================================= */

.hero p,
.cardtext p,
.category-info p,
.topbar p,
.section-heading p,
.panel > small,
.feature-text p,
.modalbody p,
.modalbody div {

    color:
        var(--master-muted) !important;
}


/* =========================================================
   SECONDARY BUTTONS
========================================================= */

.ghost-btn,
.back-btn,
.small-btn,
.secondary-btn {

    border-color:
        var(--master-border) !important;

    color:
        var(--master-text) !important;
}


/* =========================================================
   GALLERY / IMAGE
========================================================= */

.category-card,
.image-card,
.gallery-item {

    overflow: hidden;
}


/* =========================================================
   FOOTER
========================================================= */

footer,
.footer {

    background:
        rgba(243,250,247,.90) !important;

    border-color:
        rgba(24,185,141,.12) !important;
}


/* =========================================================
   MODAL
========================================================= */

.modal {

    background:
        rgba(3,24,17,.58) !important;

    backdrop-filter:
        blur(9px);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 720px) {

    body::before {

        opacity:
            .16;

        background-size:
            95px 95px,
            auto,
            auto;
    }
}


/* =========================================================
   ⭐ MUHARRAM MODE
   body class="moharram"
========================================================= */

body.moharram {

    --master-bg:
        #020604;

    --master-primary:
        #35ff9a;

    --master-primary-dark:
        #11c96e;

    --master-text:
        #effff6;

    --master-muted:
        #88a095;

    --master-border:
        rgba(53,255,154,.15);

    background-color:
        #020604 !important;
}


/* =========================================================
   MUHARRAM BACKGROUND
   قرمز انتزاعی، نه واقعی
========================================================= */

body.moharram::before {

    opacity:
        .36;

    background-image:

        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='%2335ff9a' stroke-width='.7' opacity='.20'%3E%3Cpath d='M22.5 0L45 13L67.5 0L90 13L90 39L67.5 52L67.5 78L45 90L22.5 78L0 90L0 64L22.5 51L22.5 26L0 13L22.5 0Z'/%3E%3Cpath d='M22.5 26L45 39L67.5 26L67.5 52L45 65L22.5 52Z'/%3E%3C/g%3E%3C/svg%3E"),

        radial-gradient(
            ellipse 100px 50px at 8% 18%,
            rgba(170,12,30,.58),
            transparent 72%
        ),

        radial-gradient(
            ellipse 55px 100px at 82% 12%,
            rgba(210,18,40,.42),
            transparent 70%
        ),

        radial-gradient(
            ellipse 110px 55px at 68% 76%,
            rgba(160,8,28,.46),
            transparent 72%
        ),

        radial-gradient(
            ellipse 50px 100px at 18% 86%,
            rgba(190,15,38,.38),
            transparent 70%
        ),

        #020604;

    background-size:
        135px 135px,
        380px 320px,
        420px 360px,
        500px 390px,
        430px 370px;

    background-repeat:
        repeat;
}


/* =========================================================
   MUHARRAM CARDS
========================================================= */

body.moharram .card,
body.moharram .panel,
body.moharram .stat-card,
body.moharram .category-card,
body.moharram .image-card,
body.moharram .login-card,
body.moharram .featured,
body.moharram .upload-panel,
body.moharram .toolbar,
body.moharram .posts-panel,
body.moharram .welcome-card,
body.moharram .about-card,
body.moharram .program-card,
body.moharram .contact-card,
body.moharram .servant-card,
body.moharram .gallery-item,
body.moharram .memories-section,
body.moharram .hero-card,
body.moharram .modal-card,
body.moharram .modalbox {

    background:
        rgba(5,14,10,.90) !important;

    color:
        #effff6 !important;

    border-color:
        rgba(53,255,154,.14) !important;
}


/* =========================================================
   MUHARRAM HEADER
========================================================= */

body.moharram .header,
body.moharram .topbar,
body.moharram .site-header {

    background:
        rgba(2,8,5,.92) !important;

    border-color:
        rgba(53,255,154,.14) !important;
}


/* =========================================================
   MUHARRAM GREEN
========================================================= */

body.moharram .label,
body.moharram .eyebrow,
body.moharram .tag,
body.moharram .hero-small,
body.moharram .category-count,
body.moharram .cardtext label {

    color:
        #35ff9a !important;
}


/* =========================================================
   MOBILE MUHARRAM
========================================================= */

@media (max-width: 720px) {

    body.moharram::before {

        opacity:
            .27;

        background-size:
            95px 95px,
            240px 210px,
            280px 240px,
            320px 260px,
            280px 240px;
    }
}
/* =========================================================
   ALMAHDI — MASTER VISUAL THEME
   GEOMETRIC BACKGROUND + GREEN PREMIUM STYLE
   بدون تغییر Layout / Icon Size / Icon Position
========================================================= */


/* =========================================================
   COLORS
========================================================= */

:root {
    --master-bg: #f3faf7;
    --master-primary: #18b98d;
    --master-primary-dark: #0d8f6d;
    --master-text: #12382d;
    --master-muted: #648078;
    --master-border: rgba(24,185,141,.15);
}


/* =========================================================
   BASE
========================================================= */

html {
    background: var(--master-bg) !important;
}

body {

    background-color:
        var(--master-bg) !important;

    color:
        var(--master-text);

    position: relative;

    overflow-x: hidden;
}


/* =========================================================
   ⭐ GEOMETRIC BACKGROUND
   این بخش طرح اصلی را به همه صفحات می‌دهد
========================================================= */

body::before {

    content: "";

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 0;

    opacity: .22;

    background-image:

        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='%23117e5f' stroke-width='0.8' opacity='.72'%3E%3Cpath d='M22.5 0L45 13L67.5 0L90 13L90 39L67.5 52L67.5 78L45 90L22.5 78L0 90L0 64L22.5 51L22.5 26L0 13L22.5 0Z'/%3E%3Cpath d='M22.5 26L45 39L67.5 26L67.5 52L45 65L22.5 52Z'/%3E%3Cpath d='M0 39L22.5 26L45 39L45 65L22.5 78L0 65Z'/%3E%3Cpath d='M45 13L45 39L67.5 52L90 39'/%3E%3Cpath d='M22.5 51L45 39L67.5 52'/%3E%3C/g%3E%3C/svg%3E"),

        radial-gradient(
            circle at 15% 10%,
            rgba(24,185,141,.10),
            transparent 28%
        ),

        radial-gradient(
            circle at 85% 85%,
            rgba(24,185,141,.08),
            transparent 30%
        );

    background-repeat:
        repeat,
        no-repeat,
        no-repeat;

    background-size:
        135px 135px,
        auto,
        auto;

    background-position:
        center top,
        top left,
        bottom right;
}


/* =========================================================
   صفحه‌های اصلی را شفاف می‌کنیم
   تا هندسه پشتشان دیده شود
   این بخش به کارت‌ها دست نمی‌زند
========================================================= */

main,
.page,
.main,
.container,
.gallery-container,
.login-page,
.content,
.site-main,
.main-content {

    background:
        transparent !important;
}


/* =========================================================
   CONTENT ABOVE BACKGROUND
========================================================= */

body > * {

    position: relative;
    z-index: 1;
}


/* =========================================================
   MASTER VARIABLES
========================================================= */

body {

    --primary:
        var(--master-primary);

    --primary-dark:
        var(--master-primary-dark);

    --text:
        var(--master-text);

    --muted:
        var(--master-muted);

    --border:
        var(--master-border);
}


/* =========================================================
   HEADER
========================================================= */

.header,
.topbar,
.site-header {

    background:
        rgba(248,253,250,.90) !important;

    border-color:
        rgba(24,185,141,.13) !important;

    backdrop-filter:
        blur(18px);
}


/* =========================================================
   NAV
========================================================= */

.header nav a,
.nav a,
.site-nav a,
.sidebar-nav a {

    color:
        #58756b !important;
}

.header nav a:hover,
.header nav a.active,
.nav a:hover,
.nav a.active,
.site-nav a:hover,
.site-nav a.active,
.sidebar-nav a:hover,
.sidebar-nav a.active {

    color:
        var(--master-primary) !important;
}


/* =========================================================
   CARDS
   اندازه و جای آیکون‌ها دست نخورده
========================================================= */

.card,
.panel,
.stat-card,
.category-card,
.image-card,
.login-card,
.featured,
.upload-panel,
.toolbar,
.posts-panel,
.welcome-card,
.about-card,
.program-card,
.contact-card,
.servant-card,
.gallery-item,
.memories-section,
.hero-card,
.modal-card,
.modalbox {

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.96),
            rgba(237,248,243,.96)
        ) !important;

    border-color:
        var(--master-border) !important;

    box-shadow:
        0 18px 50px
        rgba(4,58,44,.10) !important;
}


/* =========================================================
   GREEN ELEMENTS
========================================================= */

.primary-btn,
.green-btn,
.read,
.view-gallery,
.search button {

    background:
        var(--master-primary) !important;

    color:
        #ffffff !important;
}


.primary-btn:hover,
.green-btn:hover,
.read:hover {

    background:
        var(--master-primary-dark) !important;
}


/* =========================================================
   LABELS / TITLES
========================================================= */

.label,
.eyebrow,
.tag,
.hero-small,
.category-count,
.cardtext label,
.category-info h3,
.section-heading > span,
.section-heading h2 span {

    color:
        var(--master-primary) !important;
}


/* =========================================================
   INPUTS
========================================================= */

input,
textarea,
select {

    background:
        rgba(250,254,252,.96) !important;

    color:
        var(--master-text) !important;

    border-color:
        var(--master-border) !important;
}


/* =========================================================
   ICONS
   ⚠️ فقط رنگ
   ❌ بدون width
   ❌ بدون height
   ❌ بدون position
   ❌ بدون margin
   ❌ بدون padding
========================================================= */

.logo-icon,
.brand-mark,
.brand-icon,
.quick-icon,
.servant-avatar,
.login-icon,
.admin-avatar,
.avatar,
.nav-icon,
.search-btn,
.menu-btn {

    color:
        var(--master-primary) !important;
}


/* =========================================================
   ICON BOX
========================================================= */

.logo-icon,
.brand-mark,
.brand-icon,
.quick-icon,
.servant-avatar,
.login-icon,
.admin-avatar,
.avatar {

    background:
        rgba(24,185,141,.09) !important;

    border-color:
        rgba(24,185,141,.18) !important;
}


/* =========================================================
   HERO
========================================================= */

.hero {

    border-color:
        rgba(24,185,141,.16) !important;

    box-shadow:
        0 25px 75px
        rgba(3,55,42,.12) !important;
}


/* =========================================================
   TEXT
========================================================= */

.hero p,
.cardtext p,
.category-info p,
.topbar p,
.section-heading p,
.panel > small,
.feature-text p,
.modalbody p,
.modalbody div {

    color:
        var(--master-muted) !important;
}


/* =========================================================
   SECONDARY BUTTONS
========================================================= */

.ghost-btn,
.back-btn,
.small-btn,
.secondary-btn {

    border-color:
        var(--master-border) !important;

    color:
        var(--master-text) !important;
}


/* =========================================================
   GALLERY / IMAGE
========================================================= */

.category-card,
.image-card,
.gallery-item {

    overflow: hidden;
}


/* =========================================================
   FOOTER
========================================================= */

footer,
.footer {

    background:
        rgba(243,250,247,.90) !important;

    border-color:
        rgba(24,185,141,.12) !important;
}


/* =========================================================
   MODAL
========================================================= */

.modal {

    background:
        rgba(3,24,17,.58) !important;

    backdrop-filter:
        blur(9px);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 720px) {

    body::before {

        opacity:
            .16;

        background-size:
            95px 95px,
            auto,
            auto;
    }
}


/* =========================================================
   ⭐ MUHARRAM MODE
   body class="moharram"
========================================================= */

body.moharram {

    --master-bg:
        #020604;

    --master-primary:
        #35ff9a;

    --master-primary-dark:
        #11c96e;

    --master-text:
        #effff6;

    --master-muted:
        #88a095;

    --master-border:
        rgba(53,255,154,.15);

    background-color:
        #020604 !important;
}


/* =========================================================
   MUHARRAM BACKGROUND
   قرمز انتزاعی، نه واقعی
========================================================= */

body.moharram::before {

    opacity:
        .36;

    background-image:

        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='%2335ff9a' stroke-width='.7' opacity='.20'%3E%3Cpath d='M22.5 0L45 13L67.5 0L90 13L90 39L67.5 52L67.5 78L45 90L22.5 78L0 90L0 64L22.5 51L22.5 26L0 13L22.5 0Z'/%3E%3Cpath d='M22.5 26L45 39L67.5 26L67.5 52L45 65L22.5 52Z'/%3E%3C/g%3E%3C/svg%3E"),

        radial-gradient(
            ellipse 100px 50px at 8% 18%,
            rgba(170,12,30,.58),
            transparent 72%
        ),

        radial-gradient(
            ellipse 55px 100px at 82% 12%,
            rgba(210,18,40,.42),
            transparent 70%
        ),

        radial-gradient(
            ellipse 110px 55px at 68% 76%,
            rgba(160,8,28,.46),
            transparent 72%
        ),

        radial-gradient(
            ellipse 50px 100px at 18% 86%,
            rgba(190,15,38,.38),
            transparent 70%
        ),

        #020604;

    background-size:
        135px 135px,
        380px 320px,
        420px 360px,
        500px 390px,
        430px 370px;

    background-repeat:
        repeat;
}


/* =========================================================
   MUHARRAM CARDS
========================================================= */

body.moharram .card,
body.moharram .panel,
body.moharram .stat-card,
body.moharram .category-card,
body.moharram .image-card,
body.moharram .login-card,
body.moharram .featured,
body.moharram .upload-panel,
body.moharram .toolbar,
body.moharram .posts-panel,
body.moharram .welcome-card,
body.moharram .about-card,
body.moharram .program-card,
body.moharram .contact-card,
body.moharram .servant-card,
body.moharram .gallery-item,
body.moharram .memories-section,
body.moharram .hero-card,
body.moharram .modal-card,
body.moharram .modalbox {

    background:
        rgba(5,14,10,.90) !important;

    color:
        #effff6 !important;

    border-color:
        rgba(53,255,154,.14) !important;
}


/* =========================================================
   MUHARRAM HEADER
========================================================= */

body.moharram .header,
body.moharram .topbar,
body.moharram .site-header {

    background:
        rgba(2,8,5,.92) !important;

    border-color:
        rgba(53,255,154,.14) !important;
}


/* =========================================================
   MUHARRAM GREEN
========================================================= */

body.moharram .label,
body.moharram .eyebrow,
body.moharram .tag,
body.moharram .hero-small,
body.moharram .category-count,
body.moharram .cardtext label {

    color:
        #35ff9a !important;
}


/* =========================================================
   MOBILE MUHARRAM
========================================================= */

@media (max-width: 720px) {

    body.moharram::before {

        opacity:
            .27;

        background-size:
            95px 95px,
            240px 210px,
            280px 240px,
            320px 260px,
            280px 240px;
    }
}

/* Mobile hamburger navigation; uses the existing dark-green magazine palette. */
@media (max-width: 850px) {
    .header {
        position: sticky;
        top: 6px;
        width: calc(100% - 16px);
        margin: 6px auto 0;
        padding: 9px 12px;
        gap: 10px;
    }

    .header .brand {
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        font-size: 13px;
    }

    .header .menu {
        display: inline-flex;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--card);
        color: var(--g);
        line-height: 1;
        touch-action: manipulation;
    }

    .header nav#blogNav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        z-index: 40;
        max-height: calc(100vh - 84px);
        max-height: calc(100dvh - 84px);
        padding: 9px;
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #06130f;
        box-shadow: 0 18px 48px rgba(0,0,0,.24);
    }

    .header nav#blogNav.open {
        display: flex;
    }

    .header nav#blogNav a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 10px 12px;
    }

    main {
        width: calc(100% - 20px);
    }

    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
        padding: 35px 8px 28px;
        min-height: 0;
    }

    .hero h1 {
        overflow-wrap: anywhere;
    }

    .hero-art {
        min-height: 200px;
        height: auto;
    }

    .featured {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid,
    .lower {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
    }

    .card,
    .panel,
    .featured,
    .feature-text {
        min-width: 0;
    }

    .feature-text {
        padding: 22px;
    }

    .pills {
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    footer {
        gap: 10px;
        padding-bottom: 28px;
        overflow-wrap: anywhere;
    }
}
