/* ===== Amond public site ===== */
:root { --nav-h: 64px; --pad: clamp(14px, 3vw, 40px); }

/* ---------- nav ---------- */
.nav-wrap { position: fixed; top: 14px; inset-inline: 0; z-index: 100; display: flex; justify-content: center; padding: 0 var(--pad); pointer-events: none; }
.nav { pointer-events: auto; display: flex; align-items: center; gap: 1.25rem; padding: .45rem .6rem .45rem 1.1rem; border-radius: 999px; width: min(100%, 880px); height: var(--nav-h); transition: transform .5s var(--ease), box-shadow .4s; }
.nav.scrolled { box-shadow: var(--shadow), inset 0 1px 0 var(--highlight); transform: translateY(-2px); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
.logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--glass-strong); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--highlight); }
.logo svg { width: 24px; height: 24px; }
.nav-links { display: flex; gap: .2rem; margin-inline-start: auto; }
.nav-links a { padding: .5rem 1rem; border-radius: 999px; font-weight: 500; color: var(--muted); transition: all .3s var(--ease); }
.nav-links a:hover { color: var(--text); background: var(--glass-strong); }
.theme-toggle .ic-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: block; }

/* ---------- hero (simple banner) ---------- */
.hero { position: relative; min-height: 78vh; min-height: 78svh; display: grid; place-items: center; padding: calc(var(--nav-h) + 60px) var(--pad) 70px; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 1.2s ease; }
.hero-media.on { opacity: 1; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .05) 40%, var(--bg) 100%); }
.hero-card { width: min(100%, 760px); padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 60px); text-align: center; border-radius: var(--radius-xl); animation: rise .9s var(--ease) both; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; padding: .35rem 1rem; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--text); background: var(--glass-strong); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--highlight); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-grad); box-shadow: 0 0 0 3px rgba(201, 138, 116, .25); }
.hero h1 { margin: 0; font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 70%, var(--accent))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 1rem auto 1.8rem; max-width: 560px; font-size: clamp(1rem, 2vw, 1.15rem); color: var(--muted); }
.hero-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-stats .stat { padding: .45rem 1rem; border-radius: 999px; background: var(--glass-weak); border: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.hero-stats .stat b { color: var(--text); font-weight: 700; margin-inline-end: .25rem; }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity: 1; transform: none; } }
.brand-logo { height: 40px; width: auto; max-width: 190px; object-fit: contain; display: block; border-radius: 10px; }

/* ---------- gallery ---------- */
.gallery-section { padding: 10px var(--pad) 60px; max-width: 1600px; margin: 0 auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
.section-head-main { display: flex; flex-direction: column; gap: .35rem; }
.section-head-main > p { margin: 0; font-size: .92rem; max-width: 720px; }
.filters { position: sticky; top: calc(var(--nav-h) + 22px); z-index: 50; display: flex; align-items: center; justify-content: center; gap: .8rem; padding: .55rem .7rem; margin: 0 auto 1.1rem; width: fit-content; max-width: 100%; border-radius: 999px; flex-wrap: wrap; }
.cats { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; flex: 0 1 auto; min-width: 0; padding: 2px; -webkit-overflow-scrolling: touch; }
.cats::-webkit-scrollbar { display: none; }
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 999px; background: var(--glass-weak); border: 1px solid var(--line); isolation: isolate; }
.seg button { position: relative; z-index: 1; border: 0; background: transparent; padding: .38rem .95rem; border-radius: 999px; font-weight: 600; font-size: .86rem; color: var(--muted); transition: color .3s; white-space: nowrap; }
.seg button.active { color: var(--accent-ink); }
.seg-thumb { position: absolute; top: 3px; bottom: 3px; inset-inline-start: 3px; width: 0; border-radius: 999px; background: var(--accent-grad); box-shadow: 0 4px 14px rgba(201, 138, 116, .4); transition: transform .45s var(--ease-liquid), width .45s var(--ease-liquid); }

/* Dynamic Justified Media Gallery */
.justified { display: flex; flex-direction: column; gap: var(--gap, 8px); min-height: 200px; }
.jrow { display: flex; gap: var(--gap, 8px); }
.jrow.center { justify-content: center; }
.tile { position: relative; margin: 0; flex: none; overflow: hidden; border-radius: var(--radius-md); background: var(--glass-weak); cursor: zoom-in; isolation: isolate; transform: translateZ(0); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.04); opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .4s var(--ease); }
.tile.in { opacity: 1; transform: none; }
.tile:hover { z-index: 2; box-shadow: var(--shadow); }
.tile .ph { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(12px); transform: scale(1.12); transition: opacity .6s ease; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .55s ease, transform .9s var(--ease); }
.tile img.loaded { opacity: 1; }
.tile.loaded .ph { opacity: 0; }
.tile:hover img { transform: scale(1.04); }
.tile video.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.tile video.preview.on { opacity: 1; }
.tile .overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: .75rem .85rem; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55)); color: #fff; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.tile:hover .overlay, .tile:focus-visible .overlay { opacity: 1; }
.tile .overlay .t { font-weight: 600; font-size: .92rem; line-height: 1.4; text-shadow: 0 1px 6px rgba(0,0,0,.5); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .overlay .c { font-size: .76rem; opacity: .85; }
.tile .play { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.6); box-shadow: 0 6px 20px rgba(0,0,0,.25); color: #fff; transition: transform .4s var(--ease-liquid), opacity .3s; pointer-events: none; }
.tile .play svg { width: 22px; height: 22px; margin-inline-start: -3px; }
.tile:hover .play { transform: translate(-50%, -50%) scale(1.1); }
.tile.previewing .play { opacity: 0; }
.tile .dur { position: absolute; top: .55rem; inset-inline-start: .55rem; padding: .12rem .5rem; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; font-size: .72rem; font-weight: 600; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tile .star { position: absolute; top: .55rem; inset-inline-end: .55rem; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.tile .star svg { width: 14px; height: 14px; }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.grid-state { text-align: center; color: var(--muted); padding: 2rem 0; display: none; }
.grid-state.on { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.load-more { display: flex; justify-content: center; padding: 1.6rem 0 0; }
.justified.filtering { opacity: .35; transition: opacity .25s; }

/* skeleton */
.skel { border-radius: var(--radius-md); background: linear-gradient(90deg, var(--glass-weak), var(--glass-strong), var(--glass-weak)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border: 1px solid var(--line); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- footer ---------- */
.footer { padding: 20px var(--pad) 40px; max-width: 1200px; margin: 0 auto; }
.footer-card { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 1.5rem; align-items: center; padding: clamp(22px, 4vw, 36px); border-radius: var(--radius-xl); }
.footer-brand h3 { margin: 0 0 .2rem; font-size: 1.3rem; }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; font-size: .93rem; }
.contact-list li { display: flex; align-items: center; gap: .55rem; }
.contact-list svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.contact-list a:hover { color: var(--accent); }
.contact-list [dir=ltr] { unicode-bidi: isolate; }
.social { display: flex; gap: .5rem; }
.social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-strong); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--highlight); transition: transform .35s var(--ease-liquid), background .3s; }
.social a:hover { transform: translateY(-3px) scale(1.05); background: var(--accent-grad); color: var(--accent-ink); }
.social svg { width: 20px; height: 20px; }
.copyright { text-align: center; font-size: .82rem; margin: 1.2rem 0 0; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lb-backdrop { position: absolute; inset: 0; background: var(--overlay); -webkit-backdrop-filter: blur(26px) saturate(140%); backdrop-filter: blur(26px) saturate(140%); animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lb-figure { position: relative; margin: 0; max-width: min(96vw, 1500px); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: .75rem; animation: lbIn .5s var(--ease-liquid); }
@keyframes lbIn { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
.lb-stage { position: relative; display: grid; place-items: center; max-width: 100%; }
.lb-stage img, .lb-stage video { max-width: 96vw; max-height: 76vh; width: auto; height: auto; border-radius: var(--radius-lg); box-shadow: 0 30px 80px rgba(0,0,0,.5); background: #000; object-fit: contain; }
.lb-stage .spinner { position: absolute; }
.lb-caption { max-width: min(96vw, 760px); padding: .7rem 1.2rem; border-radius: var(--radius-lg); text-align: center; font-size: .92rem; }
.lb-caption:empty { display: none; }
.lb-caption .t { font-weight: 700; }
.lb-caption .d { color: var(--muted); font-size: .86rem; margin-top: .15rem; }
.lb-caption .meta { display: inline-flex; gap: .5rem; margin-top: .3rem; font-size: .76rem; color: var(--muted); }
.lb-close { position: absolute; top: 18px; inset-inline-start: 18px; z-index: 3; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 50px; height: 50px; }
.lb-prev { inset-inline-end: 18px; }
.lb-next { inset-inline-start: 18px; }
.lb-nav:disabled { opacity: .25; }
.lb-counter { position: absolute; top: 24px; inset-inline-end: 24px; padding: .3rem .8rem; border-radius: 999px; font-size: .82rem; z-index: 3; }
body.lb-open { overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .footer-card { grid-template-columns: 1fr; text-align: center; }
  .contact-list li { justify-content: center; }
  .social { justify-content: center; }
}
@media (max-width: 640px) {
  :root { --nav-h: 56px; }
  .nav { gap: .5rem; padding-inline-start: .8rem; }
  .brand-text { font-size: 1.05rem; }
  .nav-links a { padding: .45rem .7rem; font-size: .9rem; }
  .hero { min-height: 70vh; min-height: 70svh; padding-top: calc(var(--nav-h) + 40px); }
  .filters { border-radius: 24px; position: static; }
  .seg { width: 100%; }
  .lb-nav { width: 42px; height: 42px; top: auto; bottom: 18px; transform: none; }
  .lb-stage img, .lb-stage video { max-height: 68vh; }
}

/* ---------- دکمهٔ استعلام قیمت (بنر) ---------- */
.btn-inquiry { background: var(--glass-strong); border: 1px solid var(--accent); color: var(--text); font-weight: 600; box-shadow: inset 0 1px 0 var(--highlight), 0 6px 20px rgba(201, 138, 116, .18); }
.btn-inquiry:hover { background: var(--accent-grad); border-color: transparent; color: var(--accent-ink); transform: translateY(-2px); }

/* ---------- نسخهٔ سرور-رندرشدهٔ گالری (کراولر / بدون JS) ---------- */
.ssr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--gap, 8px); width: 100%; }
.ssr-grid .ssr-tile { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius-md); background: var(--glass-weak); border: 1px solid var(--line); }
.ssr-grid .ssr-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ssr-grid .ssr-tile figcaption { padding: .45rem .7rem .6rem; font-size: .8rem; color: var(--muted); }
.ssr-grid .ssr-tile figcaption span { opacity: .75; }
.justified:has(.ssr-grid) { min-height: auto; }

/* ---------- مطالب مفید (کارت‌ها) ---------- */
.articles-section { padding: 6px var(--pad) 60px; max-width: 1600px; margin: 0 auto; }
.section-sub { margin: -.4rem 0 1.2rem; max-width: 760px; }
.more-link { font-size: .9rem; border-bottom: 1px dashed var(--line-strong); padding-bottom: 2px; }
.more-link:hover { color: var(--accent); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.post-grid.wide { margin-top: 1.5rem; }
.post-card { border-radius: var(--radius-lg); overflow: hidden; transition: transform .5s var(--ease), box-shadow .4s var(--ease); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card .pc-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.pc-cover { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--glass-weak); }
.pc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s var(--ease); }
.post-card:hover .pc-cover img { transform: scale(1.05); }
.pc-body { display: block; padding: 1rem 1.1rem 1.2rem; }
.pc-title { display: block; font-weight: 700; font-size: 1.04rem; line-height: 1.7; }
.pc-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: .5rem; color: var(--muted); font-size: .9rem; line-height: 1.9; }
.pc-meta { display: block; margin-top: .85rem; font-size: .76rem; color: var(--muted); }
html.js .post-card { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.js .post-card.in { opacity: 1; transform: none; }

/* ---------- دکمهٔ صدا در لایت‌باکس ---------- */
.lb-sound { position: absolute; bottom: 14px; inset-inline-start: 14px; z-index: 3; display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .85rem; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line); color: var(--text); font-size: .8rem; font-weight: 600; cursor: pointer; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.lb-sound svg { width: 18px; height: 18px; }
.lb-sound:hover { background: var(--accent-grad); color: var(--accent-ink); }
.lb-hint { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 3; padding: .45rem .9rem; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line); color: var(--text); font-size: .8rem; font-weight: 600; }
@media (max-width: 640px) { .filters { padding: .45rem .5rem; } .articles-section { padding-bottom: 40px; } }

/* اگر کاربر انیمیشن کم می‌خواهد (یا مرورگر انیمیشن را اجرا نکند) کارت‌ها بلافاصله دیده شوند */
@media (prefers-reduced-motion: reduce) {
  .tile, .post-card { opacity: 1 !important; transform: none !important; transition: none !important; }
}
