/* صفحه‌ی HIMA Media (/media/) — کاشی‌های بالای صفحه از سایت قدیم هیما الهام گرفته شده؛ بقیه هم‌خانواده‌ی hima16.css */
@font-face { font-family: "IRANSansX"; src: url("fonts/iransansx-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IRANSansX"; src: url("fonts/iransansx-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IRANSansX"; src: url("fonts/iransansx-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
:root { --bg: #0b0c14; --card: #151726; --line: rgba(255, 255, 255, .08); --amber: #F5A23A; --gutter: clamp(16px, 5vw, 72px); --fa: "IRANSansX", Tahoma, sans-serif; --en: "Inter", "IRANSansX", sans-serif; color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: #fff; font: 400 16px/1.9 var(--fa); }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: 10px; background: #fff; color: #111; }
.skip:focus { top: 12px; }

/* نوار بالا */
.mtop { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px var(--gutter); background: rgba(11, 12, 20, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.mlogo { font: 600 20px var(--en); text-decoration: none; direction: ltr; white-space: nowrap; }
.mlogo i, .t.s h1 i { font-style: normal; color: var(--amber); }
.mtop nav { display: flex; gap: 4px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.mtop nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; text-decoration: none; font-size: 14px; color: rgba(255, 255, 255, .78); white-space: nowrap; }
.mtop nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.mtop nav a.mcta { background: #fff; color: #111; font-weight: 700; }

/* کاشی‌ها */
.mhero { min-height: calc(100svh - 65px); display: flex; flex-direction: column; justify-content: center; gap: clamp(12px, 2vh, 24px); padding: clamp(12px, 2vh, 28px) 0; }
.mt { width: 100%; padding: 0 var(--gutter); max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: clamp(110px, calc((100svh - 65px - 150px) / 3), 210px); grid-auto-flow: dense; gap: 8px; }
.mcl { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter); scroll-margin-top: 80px; text-align: center; }
.mcl p { margin: 0 0 8px; font-size: 13px; color: rgba(255, 255, 255, .55); }
.mcl .pf-track img { height: 34px; }
.t { position: relative; border-radius: 12px; overflow: hidden; perspective: 900px; }
.t.c { display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; background: var(--c); text-decoration: none; transition: filter .25s, transform .25s; }
.t.c svg { position: absolute; top: 16px; inset-inline-end: 16px; width: 32px; height: 32px; opacity: .9; }
.t.c b { font-size: clamp(16px, 1.4vw, 19px); }
.t.c small { font-size: 13px; line-height: 1.6; opacity: .85; max-height: 0; overflow: hidden; transition: max-height .35s; }
.t.c:hover, .t.c:focus-visible { filter: brightness(1.12); }
.t.c:hover small, .t.c:focus-visible small { max-height: 60px; }
@media (hover: none) { .t.c small { max-height: 60px; } }
.t.s { grid-column: span 3; grid-row: span 2; display: flex; flex-direction: column; justify-content: center; padding: clamp(20px, 4vw, 60px); background: linear-gradient(135deg, #1b1e31, #0f1120); box-shadow: inset 0 0 0 1px var(--line); }
.t.s h1 { margin: 0; font: 600 clamp(36px, 5.4vw, 76px)/1.15 var(--en); direction: ltr; text-align: right; }
.t.s p { margin: 10px 0 0; color: rgba(255, 255, 255, .7); }
.fl { height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.fl img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fl img + img { transform: rotateY(180deg); }
.t.y .fl img + img { transform: rotateX(180deg); }
.t.on .fl { transform: rotateY(180deg); }
.t.y.on .fl { transform: rotateX(180deg); }
.w2 { grid-column: span 2; } .h2 { grid-row: span 2; }

/* بخش‌ها */
.ms { padding: clamp(48px, 7vw, 96px) var(--gutter) 0; scroll-margin-top: 64px; }
.pf { scroll-margin-top: 64px; }
.ms-in { max-width: 1200px; margin: 0 auto; }
.ms h2 { margin: 0 0 22px; font: 900 clamp(26px, 3vw, 38px)/1.35 var(--fa); }
.lt { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.lt article { background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.lt img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.lt article > div { padding: 14px 16px 18px; }
.lt time { color: var(--amber); font-size: 13px; }
.lt h3 { margin: 2px 0 4px; font-size: 17px; line-height: 1.6; }
.lt p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .62); line-height: 1.8; }
.rs { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.rs-about p { margin: 0 0 14px; color: rgba(255, 255, 255, .78); line-height: 2.1; text-align: justify; }
.rs-sv { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rs-sv li { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; background: rgba(245, 162, 58, .1); box-shadow: inset 0 0 0 1px rgba(245, 162, 58, .3); }
.tl { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid #2a2d45; }
.tl li { position: relative; padding: 0 26px 26px; }
.tl li::before { content: ""; position: absolute; inset-inline-start: -8px; top: 9px; width: 14px; height: 14px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px var(--bg); }
.tl b { color: var(--amber); font-size: 14px; }
.tl h3 { margin: 0; font-size: 17px; line-height: 1.7; }
.tl p { margin: 2px 0 0; font-size: 14px; color: rgba(255, 255, 255, .62); line-height: 1.8; }
.cl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cl li { display: grid; place-items: center; height: 96px; padding: 20px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.cl img { max-height: 48px; width: auto; opacity: .75; filter: grayscale(1); transition: opacity .3s, filter .3s; }
.cl li:hover img { opacity: 1; filter: none; }
.mend { margin: clamp(56px, 8vw, 110px) var(--gutter) 0; padding: clamp(28px, 5vw, 56px); border-radius: 24px; text-align: center; background: linear-gradient(135deg, rgba(245, 162, 58, .16), rgba(67, 56, 202, .16)); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.mend h2 { flex-basis: 100%; margin: 0 0 8px; font-size: clamp(22px, 2.6vw, 32px); }
.mfoot { padding: 40px var(--gutter); text-align: center; font-size: 13px; color: rgba(255, 255, 255, .5); }

@media (max-width: 900px) {
    .mtop nav a:not(.mcta) { display: none; }
    .rs { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .mhero { min-height: 0; }
    .mt { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(92px, 28vw, 130px); gap: 6px; }
    .t { border-radius: 10px; }
    .t.s { grid-column: span 3; grid-row: span 1; padding: 16px; }
    .t.s h1 { font-size: 34px; } .t.s p { font-size: 13px; line-height: 1.7; }
    .w2 { grid-column: span 1; }
    .xm { display: none; }
    .t.c { padding: 10px; } .t.c svg { width: 22px; height: 22px; top: 10px; inset-inline-end: 10px; }
    .t.c b { font-size: 13.5px; line-height: 1.5; } .t.c small { display: none; }
    .mcl .pf-track img { height: 28px; }
}
}
@media (prefers-reduced-motion: reduce) { .fl, .t.c, .t.c small { transition: none; } }

/* صفحه‌ی هر نمونه‌کار */
.wk-in { max-width: 1200px; margin: 0 auto; padding: clamp(18px, 3vw, 36px) var(--gutter) 0; }
.crumb { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: rgba(255, 255, 255, .5); }
.crumb a { text-decoration: none; } .crumb a:hover { color: #fff; }
.wk-in h1 { margin: 8px 0 6px; font: 900 clamp(26px, 3.4vw, 44px)/1.35 var(--fa); }
.wk-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 20px; font-size: 15px; }
.wk-meta small { color: var(--amber); margin-inline-end: 6px; font-size: 12.5px; }
.ws { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ws-stage { position: relative; aspect-ratio: 16 / 9; max-height: 78svh; width: 100%; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line); }
.ws-stage.fs { max-height: none; border-radius: 0; }
.ws-sl { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.ws-sl.on { opacity: 1; visibility: visible; }
.ws-sl img, .ws-sl video { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: auto; }
.ws-sl figcaption { position: absolute; inset: auto 0 0; padding: 30px 16px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); font-size: 14px; pointer-events: none; }
.ws-err { position: absolute; inset: auto 16px 50%; text-align: center; }
.ws-nav, .ws-fs { position: absolute; z-index: 3; width: 48px; height: 48px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); cursor: pointer; transition: background .2s; }
.ws-nav:hover, .ws-fs:hover { background: rgba(0, 0, 0, .7); }
.ws-nav svg, .ws-fs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ws-p { right: 12px; top: 50%; translate: 0 -50%; } .ws-n { left: 12px; top: 50%; translate: 0 -50%; }
.ws-fs { top: 12px; left: 12px; }
.ws-count { position: absolute; z-index: 3; top: 14px; right: 14px; padding: 2px 12px; border-radius: 999px; font-size: 13px; background: rgba(0, 0, 0, .5); }
.ws-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: thin; }
.ws-thumbs button { position: relative; flex: 0 0 auto; width: 104px; height: 64px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #1b1d2e; cursor: pointer; opacity: .55; transition: opacity .2s, box-shadow .2s; }
.ws-thumbs button[aria-selected="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--amber); }
.ws-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ws-thumbs svg { position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; color: #fff; filter: drop-shadow(0 1px 3px #000); }
.wk-desc { max-width: 820px; margin-top: 26px; } .wk-desc p { margin: 0 0 14px; line-height: 2.1; color: rgba(255, 255, 255, .8); }
.wk-more { margin-top: clamp(40px, 6vw, 80px); } .wk-more h2 { font-size: clamp(22px, 2.4vw, 30px); margin: 0 0 16px; }
.wk-more .pf-grid { grid-auto-rows: clamp(130px, 14vw, 190px); }
a.pf-it { display: block; cursor: pointer; }
.pf-it img { -webkit-user-drag: none; }
@media (max-width: 700px) {
    .ws-stage { aspect-ratio: 4 / 3; border-radius: 12px; }
    .ws-nav { width: 44px; height: 44px; }
    .ws-thumbs button { width: 80px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .ws-sl { transition: none; } }
