/* Rasa Portfolio — front styles. Builds on the theme's .work / .grid-3 /
   .logo-marquee classes in main.css; only the new pieces live here. */

.pf-wrap { display: flex; flex-direction: column; gap: 56px; }
.pf-cat-title {
  font-size: clamp(20px, 2.6vw, 26px); color: var(--ink); margin: 0 0 24px;
  display: flex; align-items: center; gap: 12px; padding-bottom: 14px;
  border-bottom: 2px solid var(--line);
}
.pf-cat-title::before { content: ""; width: 6px; height: 22px; border-radius: 6px; background: var(--grad-blue); flex: none; }
.pf-cat-title b { color: var(--blue-600); font-size: .6em; font-weight: 700; }

/* portfolio card grid uses the theme .work card; make the whole card a clean link */
.pf-grid { gap: 24px; }
a.work { display: block; text-decoration: none; }
.pf-grid .work, .pf-cat .work { animation: none; }

/* brand names/logos inside the home "trusted" marquee */
.logo-marquee .lm-item { display: inline-flex; align-items: center; gap: 9px; }
.logo-marquee .lm-item .lm-logo {
  height: 34px; width: auto; max-width: 110px; object-fit: contain;
  border-radius: 8px; display: block;
}

/* ---- tabbed filter bar (نمونه‌کارها page) ---- */
.pf-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.pf-tab {
  font-family: inherit; cursor: pointer; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 15px;
  padding: 10px 22px; border-radius: 999px; box-shadow: var(--shadow-sm);
  transition: transform .22s, background .22s, color .22s, border-color .22s, box-shadow .22s;
}
.pf-tab b { color: var(--muted); font-weight: 700; font-size: .82em; }
.pf-tab:hover { border-color: var(--blue-400); transform: translateY(-2px); }
.pf-tab.active { background: var(--grad-blue); color: #fff; border-color: transparent; box-shadow: var(--shadow-blue); }
.pf-tab.active b { color: rgba(255,255,255,.85); }
.pf-grid.pf-filter { gap: 24px; }
.pf-grid.pf-filter .work { animation: none; }
@media (max-width: 560px){ .pf-tab { font-size: 13.5px; padding: 9px 16px; } }

/* "related work" heading helper used on service pages (optional) */
.rw-related-empty { display: none; }

/* ---- full-page screenshot preview cards ---- */
.pf-work { overflow: hidden; }
.pf-work .meta { position: relative; z-index: 1; }
.pf-shot {
  height: 330px; overflow: hidden; position: relative; isolation: isolate;
  border-radius: 18px 18px 0 0; background: #eaf2ff;
}
.pf-shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 28, 70, .05), transparent 28%, transparent 72%, rgba(8, 28, 70, .14));
}
.pf-shot-track { transform: translateY(0); transition: transform 7s cubic-bezier(.2,.7,.2,1); }
.pf-shot-track img { display: block; width: 100%; height: auto; }
.pf-shot--fallback { min-height: 330px; }
.pf-open { display: inline-flex; align-items: center; gap: 5px; margin-top: 11px; color: var(--blue-600); font-size: 13px; font-weight: 800; }
@media (hover:hover) and (pointer:fine) {
  .pf-work:hover { transform: translateY(-7px); }
  .pf-work:hover .pf-shot-track { transform: translateY(calc(-100% + 330px)); }
}
@media (prefers-reduced-motion:reduce), (hover:none) {
  .pf-shot-track { transition: none !important; transform: none !important; }
}

/* ---- immersive shared project viewer ---- */
.pf-case { min-height: 100svh; padding: 48px 0 44px; background: radial-gradient(circle at 50% 0, rgba(42,153,255,.26), transparent 34%), radial-gradient(circle at 11% 40%, rgba(13,74,198,.32), transparent 31%), #04133a; color: #fff; }
.pf-case .container { width: min(1180px, calc(100% - 40px)); }
.pf-viewer-layout { display: grid; }
.pf-viewer-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.pf-icon { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pf-viewer-brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 17px; font-weight: 900; letter-spacing: -.02em; }
.pf-viewer-brand .pf-icon { width: 22px; height: 22px; color: #58d8ff; filter: drop-shadow(0 0 9px rgba(82,212,255,.72)); }
.pf-case-back { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; color: #fff; text-decoration: none; font-size: 31px; line-height: 1; transition: background .2s ease, transform .2s ease; }
.pf-case-back .pf-icon { width: 22px; height: 22px; }
.pf-case-back:hover { color: #04133a; background: #fff; transform: rotate(90deg); }
.pf-device { position: relative; }
.pf-device-tabs { position: absolute; z-index: 2; top: 96px; inset-inline-start: -78px; display: grid; gap: 10px; padding: 0; background: transparent; border: 0; }
.pf-device-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 58px; min-height: 58px; padding: 8px; border: 1px solid rgba(255,255,255,.66); border-radius: 50%; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; color: rgba(255,255,255,.84); background: rgba(5,20,57,.75); transition: background .2s ease, color .2s ease, transform .2s ease; }
.pf-device-tab-icon { width: 18px; height: 18px; }
.pf-device-tab[aria-pressed="true"] { color: #07316f; background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.pf-device-tab[aria-pressed="true"] .pf-device-tab-icon { color: #178cff; filter: drop-shadow(0 0 7px rgba(23,140,255,.35)); }
.pf-device-tab:hover { transform: scale(1.06); }
.pf-device-tab:disabled { display: none; }
.pf-device-stage { position: relative; }
.pf-device-panel[hidden] { display: none; }
.pf-viewer-shell { position: relative; margin-inline: auto; }
.pf-browser { overflow: visible; border: 7px solid #fff; border-radius: 25px; background: #fff; box-shadow: 0 34px 90px rgba(0,0,0,.38), 0 0 0 1px rgba(82,212,255,.2); }
.pf-browser-top { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-bottom: 1px solid #d9e2f3; background: linear-gradient(90deg, #f5f9ff, #fff); }
.pf-browser-top span { width: 9px; height: 9px; border-radius: 50%; background: #ff8d83; }
.pf-browser-top span:nth-child(2) { background: #ffd36b; }
.pf-browser-top span:nth-child(3) { background: #56d39b; }
.pf-viewer-viewport { height: min(68svh, 720px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; touch-action: pan-y; background: #ecf3ff; }
.pf-viewer-viewport::-webkit-scrollbar { display: none; }
.pf-viewer-viewport:focus-visible { outline: 3px solid #55d7ff; outline-offset: -3px; }
.pf-viewer-viewport img { display: block; width: 100%; height: auto; }
.pf-scroll-rail { position: absolute; z-index: 3; inset-block: 72px 22px; inset-inline-end: -35px; width: 19px; border-radius: 999px; background: rgba(255,255,255,.2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.pf-scroll-rail.is-hidden { display: none; }
.pf-rail-direction { position: absolute; inset-inline: 0; width: 15px; height: 15px; margin-inline: auto; color: rgba(255,255,255,.78); }
.pf-rail-direction:first-child { top: -21px; }
.pf-rail-direction:last-child { bottom: -21px; }
.pf-scroll-thumb { position: absolute; inset-inline: 3px; top: 0; min-height: 44px; border-radius: 999px; background: linear-gradient(180deg, #84e6ff, #2497ff); box-shadow: 0 0 0 4px rgba(82,212,255,.16), 0 7px 15px rgba(0,0,0,.3); cursor: grab; touch-action: none; }
.pf-scroll-thumb:active { cursor: grabbing; }
.pf-phone-wrap { display: grid; justify-content: center; padding: 2px 18px; }
.pf-phone { width: 440px; max-width: 100%; padding: 10px; border: 7px solid rgba(255,255,255,.96); border-radius: 41px; background: #071535; box-shadow: 0 28px 68px rgba(0,0,0,.42); }
.pf-phone-notch { width: 42%; height: 18px; margin: -4px auto 6px; border-radius: 0 0 13px 13px; background: #071535; }
.pf-phone .pf-viewer-viewport { height: min(63svh, 630px); border-radius: 25px; }
.pf-phone .pf-scroll-rail { inset-block: 46px 22px; inset-inline-end: -31px; }
.pf-case-info { width: min(760px, 100%); margin: 36px auto 0; padding: 25px 28px; border: 1px solid rgba(255,255,255,.14); border-radius: 22px; background: rgba(10,35,84,.58); box-shadow: 0 18px 45px rgba(0,0,0,.16); backdrop-filter: blur(14px); }
.pf-info-label { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px; color: #77e3ff; font-size: 13px; font-weight: 800; }
.pf-info-label .pf-icon { width: 17px; height: 17px; }
.pf-case-kicker { margin: 0 0 10px; color: #77e3ff; font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.pf-case-info h1 { margin: 0; color: #fff; font-size: clamp(28px,4vw,44px); line-height: 1.14; }
.pf-case-service { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 7px 13px; border: 1px solid rgba(130,223,255,.3); border-radius: 999px; color: #ccecff; font-size: 13px; font-weight: 700; }
.pf-case-service .pf-icon { width: 15px; height: 15px; }
.pf-case-description { margin-top: 18px; color: rgba(255,255,255,.78); font-size: 16px; line-height: 2; }
.pf-case-description > :first-child { margin-top: 0; }
.pf-case-description > :last-child { margin-bottom: 0; }
.pf-case-actions { margin-top: 23px; }
.pf-case-visit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; background: linear-gradient(120deg, #48d0ff, #2874f8); color: #fff; text-decoration: none; font-weight: 800; box-shadow: 0 12px 30px rgba(0,159,255,.28); transition: transform .2s ease, box-shadow .2s ease; }
.pf-case-visit .pf-icon { width: 18px; height: 18px; }
.pf-case-visit:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0,159,255,.38); }
.pf-no-screenshot { display: grid; min-height: 240px; place-items: center; padding: 24px; border: 1px dashed rgba(255,255,255,.35); border-radius: 24px; color: rgba(255,255,255,.72); text-align: center; }
@media (max-width: 1320px) { .pf-device-tabs { position: static; display: flex; justify-content: center; margin-bottom: 18px; } .pf-device-tab { min-width: 108px; min-height: 44px; border-radius: 999px; } }
@media (max-width: 680px) {
  .pf-case { padding: 34px 0 28px; }
  .pf-case .container { width: min(100% - 28px, 1180px); }
  .pf-viewer-bar { margin-bottom: 18px; }
  .pf-browser { border-width: 4px; border-radius: 17px; }
  .pf-viewer-viewport { height: min(58svh, 560px); }
  .pf-scroll-rail { inset-block: 59px 14px; inset-inline-end: 10px; width: 12px; background: rgba(3,23,62,.26); }
  .pf-scroll-thumb { inset-inline: 2px; min-height: 44px; }
  .pf-phone-wrap { padding-inline: 2px; }
  .pf-phone { width: 350px; max-width: 100%; border-width: 5px; border-radius: 34px; }
  .pf-phone .pf-viewer-viewport { height: min(56svh, 500px); border-radius: 22px; }
  .pf-phone .pf-scroll-rail { inset-inline-end: 9px; }
  .pf-case-info { margin-top: 28px; padding: 22px 20px; border-radius: 18px; }
  .pf-case-description { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .pf-scroll-thumb, .pf-case-back, .pf-device-tab, .pf-case-visit { transition: none !important; } }

/* ---- premium device showcase and readable companion panel ---- */
.pf-showcase-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: clamp(26px, 4vw, 58px); align-items: center; }
.pf-showcase-preview { min-width: 0; }
.pf-showcase-grid .pf-case-info { width: auto; margin: 0; padding: 32px; border-color: rgba(91,211,255,.38); background: linear-gradient(145deg, rgba(18,57,127,.98), rgba(5,24,67,.99)); box-shadow: 0 24px 55px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.08); }
.pf-showcase-grid .pf-case-info h1 { font-size: clamp(31px, 3vw, 43px); }
.pf-showcase-grid .pf-case-description { color: rgba(255,255,255,.93); font-size: 16px; line-height: 2.05; }
.pf-showcase-grid .pf-device-tab { width: 52px; min-width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: 50%; }
.pf-showcase-grid .pf-device-tab-icon { width: 21px; height: 21px; }
.pf-showcase-grid .pf-browser { margin-bottom: 24px; border: 12px solid #131a29; border-radius: 25px 25px 12px 12px; background: #131a29; box-shadow: 0 38px 85px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.12); }
.pf-macbook-camera { position: absolute; z-index: 4; top: 4px; left: 50%; width: 72px; height: 16px; transform: translateX(-50%); border-radius: 0 0 10px 10px; background: #080e1a; box-shadow: inset 0 -1px 2px rgba(255,255,255,.12); }
.pf-macbook-camera::after { content: ""; position: absolute; top: 5px; left: 50%; width: 5px; height: 5px; transform: translateX(-50%); border-radius: 50%; background: #263a59; box-shadow: 0 0 5px rgba(80,178,255,.55); }
.pf-showcase-grid .pf-browser-top { height: 42px; padding-inline: 19px; background: linear-gradient(90deg, #222c3b, #111927); border-color: rgba(255,255,255,.08); }
.pf-macbook-base { position: absolute; z-index: 1; inset-inline: 7%; bottom: -24px; height: 24px; border-radius: 0 0 22px 22px; background: linear-gradient(180deg, #e2e9f1, #8c99aa); box-shadow: 0 15px 22px rgba(0,0,0,.35); }
.pf-macbook-base::before { content: ""; position: absolute; inset-inline: -7%; bottom: 0; height: 6px; border-radius: 0 0 14px 14px; background: linear-gradient(90deg, #9aa8b9, #e9eef4 50%, #9aa8b9); }
.pf-macbook-base span { display: block; width: 28%; height: 5px; margin: auto; border-radius: 0 0 8px 8px; background: #708094; }
.pf-showcase-grid .pf-phone { border-color: #111b2c; background: linear-gradient(135deg, #b8c3d0, #111b2c 4%, #07111f 92%, #9daab8); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), 0 30px 70px rgba(0,0,0,.52); }
.pf-showcase-grid .pf-phone::before { content: ""; position: absolute; inset-block-start: 112px; inset-inline-end: -8px; width: 4px; height: 48px; border-radius: 0 4px 4px 0; background: #98a7b9; box-shadow: 0 58px 0 #98a7b9; }
.pf-showcase-grid .pf-phone::after { content: ""; position: absolute; inset: 10px auto 10px 10px; width: 2px; border-radius: 99px; background: rgba(255,255,255,.22); pointer-events: none; }
@media (max-width: 980px) {
  .pf-showcase-grid { grid-template-columns: 1fr; gap: 30px; }
  .pf-showcase-grid .pf-case-info { width: min(760px, 100%); margin-inline: auto; }
}
@media (max-width: 680px) {
  .pf-showcase-grid { gap: 28px; }
  .pf-showcase-grid .pf-browser { margin-bottom: 19px; border-width: 7px; border-radius: 18px 18px 9px 9px; }
  .pf-showcase-grid .pf-case-info { padding: 24px 21px; }
  .pf-macbook-base { bottom: -19px; height: 19px; }
}

/* ---- technology skin: light by default, theme-dark follows the site switch ---- */
.rasa-project-viewer-page .pf-case {
  --pf-stage: #edf6ff;
  --pf-stage-ink: #0b1e42;
  --pf-stage-muted: #49627f;
  --pf-surface: rgba(255, 255, 255, .90);
  --pf-line: rgba(23, 104, 194, .20);
  --pf-glow: rgba(27, 142, 255, .22);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(circle at 73% 12%, var(--pf-glow), transparent 27%), radial-gradient(circle at 7% 49%, rgba(13, 118, 222, .12), transparent 28%), var(--pf-stage);
  color: var(--pf-stage-ink);
}
html.theme-dark .rasa-project-viewer-page .pf-case {
  --pf-stage: #04133a;
  --pf-stage-ink: #f3f8ff;
  --pf-stage-muted: #b7cae7;
  --pf-surface: rgba(8, 27, 68, .84);
  --pf-line: rgba(118, 208, 255, .22);
  --pf-glow: rgba(42, 153, 255, .30);
}
.pf-tech-grid { position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: .52; background-image: linear-gradient(var(--pf-line) 1px, transparent 1px), linear-gradient(90deg, var(--pf-line) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(ellipse at 63% 37%, #000 8%, transparent 70%); }
.pf-case .container { position: relative; z-index: 1; }
.pf-viewer-brand, .pf-case-back { color: var(--pf-stage-ink); }
.pf-viewer-brand .pf-icon { color: #168bff; }
.pf-case-back { border-color: var(--pf-line); background: var(--pf-surface); box-shadow: 0 9px 26px rgba(13, 61, 133, .09); }
.pf-case-back:hover { color: var(--pf-stage-ink); background: #fff; }
.pf-device-tab { border-color: var(--pf-line); color: var(--pf-stage-ink); background: var(--pf-surface); box-shadow: 0 10px 25px rgba(10, 56, 125, .10); }
.pf-device-tab[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, #139af8, #2966f6); box-shadow: 0 12px 28px rgba(25, 129, 244, .27); }
.pf-device-tab[aria-pressed="true"] .pf-device-tab-icon { color: #fff; filter: none; }
.pf-scroll-rail { background: color-mix(in srgb, var(--pf-stage) 66%, transparent); box-shadow: inset 0 0 0 1px var(--pf-line), 0 8px 22px rgba(9, 41, 92, .12); }
.pf-rail-direction { color: var(--pf-stage-muted); }
.pf-case-info, .pf-showcase-grid .pf-case-info { position: relative; overflow: hidden; border-color: var(--pf-line); background: var(--pf-surface); box-shadow: 0 24px 55px rgba(9, 48, 105, .14), inset 0 1px 0 rgba(255,255,255,.58); }
.pf-showcase-grid .pf-case-info::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, #52d6ff, #2869f8); }
.pf-info-label, .pf-case-kicker { color: #1473c8; }
.pf-case-info h1 { color: var(--pf-stage-ink); }
.pf-case-service { border-color: var(--pf-line); color: var(--pf-stage-ink); background: rgba(55, 146, 245, .08); }
.pf-case-description, .pf-showcase-grid .pf-case-description { color: var(--pf-stage-muted); }
.pf-tech-status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--pf-stage-ink); font-size: 12px; font-weight: 900; }
.pf-tech-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c993; box-shadow: 0 0 0 5px rgba(34, 201, 147, .14), 0 0 18px rgba(34, 201, 147, .65); }
.pf-tech-signals { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 19px 0 0; list-style: none; }
.pf-tech-signals li { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 9px; border: 1px solid var(--pf-line); border-radius: 999px; color: var(--pf-stage-ink); background: rgba(70, 152, 243, .07); font-size: 11px; font-weight: 800; white-space: nowrap; }
.pf-tech-signals .pf-icon { width: 14px; height: 14px; color: #167cd7; }
.pf-viewer-brand:focus-visible, .pf-case-back:focus-visible, .pf-device-tab:focus-visible, .pf-case-visit:focus-visible { outline: 3px solid #31b9ff; outline-offset: 4px; }
html.theme-dark .pf-case-back:hover { color: #04133a; }
html.theme-dark .pf-showcase-grid .pf-case-info { box-shadow: 0 24px 55px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.08); }
html.theme-dark .pf-case-back { background: rgba(8, 27, 68, .62); }
html.theme-dark .pf-device-tab { background: rgba(5, 20, 57, .75); }
html.theme-dark .pf-case-service, html.theme-dark .pf-tech-signals li { background: rgba(72, 174, 255, .10); }
@media (prefers-reduced-motion: reduce) {
  .pf-tech-grid, .pf-tech-status-dot { animation: none !important; }
}
@media (max-width: 680px) {
  .pf-tech-grid { background-size: 30px 30px; opacity: .38; }
  .pf-tech-signals { gap: 6px; }
  .pf-tech-signals li { font-size: 10.5px; }
}
