@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f8ff;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: #ffffff;
  --text: #172036;
  --muted: #5e6a86;
  --primary: #3a63ff;
  --primary-soft: rgba(58, 99, 255, 0.12);
  --secondary: #8b5cf6;
  --accent: #00b7ff;
  --success: #10b981;
  --danger: #ef4444;
  --border: rgba(84, 103, 158, 0.16);
  --shadow: 0 24px 60px rgba(22, 35, 71, 0.08);
  --radius: 24px;
  --radius-sm: 18px;
  --container: min(1180px, calc(100% - 2rem));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(58, 99, 255, 0.14), transparent 22%),
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: rgba(255,255,255,0.95);
  color: var(--text);
}
textarea { resize: vertical; }
.container { width: var(--container); margin-inline: auto; }
.section { padding: 1rem 0 4rem; }
.page-hero, .hero-section { padding: 2rem 0 1rem; }
.page-hero.compact { padding-top: 2.5rem; }
.glass-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.78));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
}
.topbar {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(84, 103, 158, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-header { position: sticky; top: 0; z-index: 30; padding: 0.55rem 0; }
.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.75rem;flex-shrink: 0;
  min-width: 240px; }
.brand strong { display: block; font-size: 1.05rem;  white-space: nowrap;
  line-height: 1.2;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.2;
  margin-top: 0.3rem;
}
.brand-mark {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 28px rgba(58, 99, 255, 0.22); flex-shrink: 0;

}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  flex: 1;
  flex-wrap: nowrap;
}
.main-nav a {
  padding: 0.58rem 0.78rem;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.95rem;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.admin-link { background: rgba(139,92,246,0.12); color: var(--secondary) !important; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.6rem; }
.pill, .mini-badge, .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}
.pill {
  background: rgba(58, 99, 255, 0.1);
  color: var(--primary);
  padding: 0.45rem 0.85rem;
}
.mini-badge {
  padding: 0.36rem 0.72rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}
.mini-badge.alt { background: rgba(139, 92, 246, 0.12); color: var(--secondary); }
.status-badge {
  padding: 0.42rem 0.75rem;
  background: rgba(58, 99, 255, 0.12);
  color: var(--primary);
}
.status-badge.sold { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.status-badge.out_of_stock { background: rgba(245, 158, 11, 0.14); color: #b56d00; }
.status-badge.available { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 1.5rem;
  align-items: center;
}
.hero-content h1, .page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.15;
  margin: 1rem 0 0.75rem;
}
.hero-content p, .page-hero p { color: var(--muted); font-size: 1.05rem; line-height: 1.95; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin: 1.5rem 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 16px;
  padding: 0.9rem 1.2rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; }
.btn-secondary { background: rgba(255,255,255,0.8); color: var(--text); border-color: var(--border); }
.hero-visual { min-height: 460px; overflow: hidden; padding: 1rem; }
.hero-surface {
  position: relative;
  min-height: 430px;
  border-radius: calc(var(--radius) - 8px);
  background:
    radial-gradient(circle at 20% 20%, rgba(58, 99, 255, 0.18), transparent 20%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.16), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #eef3ff 100%);
  border: 1px solid rgba(84, 103, 158, 0.12);
}
.hero-surface img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.floating-badge {
  position: absolute;
  right: 1rem;
  top: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--border);
  font-weight: 700;
  box-shadow: var(--shadow);
}
.floating-badge.alt { top: auto; bottom: 4rem; right: 2rem; }
.floating-badge.violet { left: 1rem; right: auto; top: 2rem; }
.hero-stats, .feature-grid, .card-grid, .content-grid, .detail-grid, .contact-grid, .footer-grid, .split-section {
  display: grid;
  gap: 1rem;
}
.hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.5rem; }
.stat-card { padding: 1rem 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stat-card strong { font-size: 1.7rem; }
.audience-chips, .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.audience-chips span, .chip-row span {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  color: var(--muted);
  font-weight: 600;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.section-head h2 { margin: 0.45rem 0 0.35rem; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.section-head p { margin: 0; color: var(--muted); max-width: 720px; line-height: 1.9; }
.kicker { color: var(--secondary); font-weight: 800; }
.two-columns { grid-template-columns: 1fr 1fr; }
.feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-grid.four-up { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feature-card, .prose-card, .item-card, .article-card, .case-card, .testimonial-card, .legal-card, .contact-card, .map-card, .quick-contact, .faq-item {
  padding: 1.15rem;
}
.feature-card .icon { font-size: 1.7rem; }
.feature-card h3, .item-card h3, .article-card h3, .case-card h3, .testimonial-card h3, .quick-contact h2 { margin: 0.65rem 0; }
.feature-card p, .item-card p, .article-card p, .case-card p, .testimonial-card p, .legal-card p, .contact-card p, .quick-contact p, .prose-card p { margin: 0; color: var(--muted); line-height: 1.9; }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.item-card img, .article-card img, .case-card img { width: 100%; height: 210px; object-fit: cover; border-radius: 20px; margin-bottom: 1rem; background: #eef2ff; }
.item-card-body { display: grid; gap: 0.85rem; }
.item-card-top { display: flex; align-items: start; justify-content: space-between; gap: 0.75rem; }
.price-chip {
  display: inline-grid;
  gap: 0.15rem;
  justify-items: start;
  padding: 0.55rem 0.7rem;
  border-radius: 16px;
  background: rgba(58, 99, 255, 0.08);
  min-width: fit-content;
}
.price-chip span { font-size: 0.76rem; color: var(--muted); }
.price-chip strong { font-size: 0.95rem; }
.item-image-wrap { position: relative; }
.item-overlay { position: absolute; top: 0.85rem; right: 0.85rem; display: flex; gap: 0.5rem; }
.link-arrow {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--primary);
  font-weight: 800;
}
.link-arrow span { transition: transform 0.2s ease; }
.link-arrow:hover span { transform: translateX(-4px); }
.filters-bar {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 180px));
  gap: 0.85rem;
  padding: 1rem;
  margin-bottom: 1rem;
}
.empty-state, .not-found {
  text-align: center;
  padding: 2rem;
}
.empty-state h3, .not-found h1 { margin-top: 0; }
.empty-state p, .not-found p { color: var(--muted); }
.detail-grid { grid-template-columns: 0.95fr 1.05fr; align-items: start; }
.detail-media, .detail-content { padding: 1.2rem; }
.detail-media img { width: 100%; border-radius: 22px; background: #eef2ff; }
.detail-meta-row { margin-top: 1rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.detail-content h3 { margin: 1.2rem 0 0.6rem; }
.detail-list { margin: 0; padding-inline-start: 1.2rem; color: var(--muted); line-height: 2; }
.detail-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 1.5rem; }
.case-detail-block + .case-detail-block { margin-top: 1rem; }
.prose-block p { color: var(--muted); line-height: 2; }
.faq-list { display: grid; gap: 0.85rem; }
.faq-list.wide { max-width: 920px; margin-inline: auto; }
.faq-item summary { cursor: pointer; list-style: none; font-weight: 800; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 1rem 0 0; color: var(--muted); line-height: 1.95; }
.testimonial-top { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 0.7rem; }
.rating { color: #f59e0b; letter-spacing: 0.15rem; }
.contact-grid { grid-template-columns: 0.95fr 1.05fr; }
.contact-stack, .hours-list { display: grid; gap: 0.85rem; }
.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(84, 103, 158, 0.1);
}
.contact-form { display: grid; gap: 0.9rem; }
.form-note { margin: 0; color: var(--muted); font-size: 0.92rem; }
.map-card { margin-top: 1rem; }
.map-card iframe { width: 100%; min-height: 360px; border: 0; border-radius: 20px; }
.quick-contact { padding: 1.4rem; }
.contact-quick-list { display: grid; gap: 0.8rem; margin-top: 1rem; }
.quick-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(58, 99, 255, 0.07);
}
.site-footer {
  padding: 2.5rem 0 6rem;
  margin-top: 2rem;
  background: rgba(255,255,255,0.4);
  border-top: 1px solid rgba(84, 103, 158, 0.1);
}
.footer-grid { grid-template-columns: 1.3fr repeat(3, 1fr); align-items: start; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; color: var(--muted); }
.footer-bottom {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(84, 103, 158, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  background: rgba(58, 99, 255, 0.08);
  border: 1px solid rgba(84, 103, 158, 0.12);
  color: var(--text);
  font-weight: 700;
}
.social-link:hover { background: rgba(58, 99, 255, 0.14); }
.contact-social-wrap { margin-top: 1.1rem; }
.footer-social { margin-top: 1.15rem; }
.site-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  border-radius: 16px;
  background: rgba(58, 99, 255, 0.07);
  border: 1px solid rgba(84, 103, 158, 0.1);
}
.metric-chip span { color: var(--muted); }
.metric-chip strong { color: var(--text); }
.footer-bottom-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.mobile-cta-bar {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(540px, calc(100% - 1rem));
  display: none;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.5rem;
  z-index: 40;
}
.cta-item {
  text-align: center;
  padding: 0.9rem;
  border-radius: 16px;
  font-weight: 800;
}
.cta-item:first-child { background: rgba(58, 99, 255, 0.1); color: var(--primary); }
.cta-item:nth-child(2) { background: rgba(16,185,129,0.1); color: var(--success); }
.cta-item:nth-child(3) { background: rgba(139,92,246,0.12); color: var(--secondary); }
.ltr-number { direction: ltr; unicode-bidi: plaintext; white-space: nowrap; }
.phone-entry-inline, .phone-entry-block { display: inline-flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.phone-entry-block { width: 100%; justify-content: space-between; }
.phone-entry-label { color: var(--text); font-weight: 0; }
.topbar-item .phone-entry-inline { justify-content: flex-end; }
.legal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 5.6rem;
  background: #172036;
  color: #fff;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 60;
}
.toast.success { background: #0f766e; }
.toast.error { background: #b91c1c; }
#toast-root { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
#toast-root .toast { pointer-events: auto; }

.admin-body { background: #eef3ff; }
.admin-wrap { min-height: 100vh; display: grid; grid-template-columns: 320px 1fr; }
.admin-sidebar { padding: 1.25rem; border-inline-start: 1px solid rgba(84,103,158,.08); }
.admin-main { padding: 1.25rem; }
.admin-panel { padding: 1.25rem; }
.admin-nav { display: grid; gap: 0.45rem; margin-top: 1rem; }
.admin-nav button {
  border: 0;
  background: rgba(255,255,255,0.7);
  color: var(--text);
  text-align: right;
  padding: 0.85rem 1rem;
  border-radius: 16px;
}
.admin-nav button.active { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; }
.admin-toolbar, .admin-stats { display: grid; gap: 1rem; }
.admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-tile { padding: 1rem; }
.stat-tile span { color: var(--muted); display: block; }
.stat-tile strong { display: block; font-size: 1.9rem; margin-top: 0.4rem; }
.admin-list { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; }
.admin-list th, .admin-list td { padding: 0.85rem 0.75rem; border-bottom: 1px solid rgba(84,103,158,.08); text-align: right; vertical-align: top; }
.admin-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-actions button {
  border: 0; border-radius: 12px; padding: 0.55rem 0.8rem; font-weight: 700;
}
.admin-actions .edit { background: rgba(58,99,255,.12); color: var(--primary); }
.admin-actions .delete { background: rgba(239,68,68,.12); color: var(--danger); }
.admin-actions .approve { background: rgba(16,185,129,.12); color: var(--success); }
.drawer {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(10,18,40,.32); z-index: 80;
}
.drawer.open { display: flex; }
.drawer-card { width: min(860px, calc(100% - 1.5rem)); max-height: 92vh; overflow: auto; padding: 1.2rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.form-grid .full { grid-column: 1 / -1; }
.helper-box { padding: 1rem; background: rgba(58,99,255,.08); border-radius: 18px; color: var(--muted); }
.admin-login {
  min-height: 100vh; display: grid; place-items: center; padding: 1rem;
}
.login-card { width: min(460px, 100%); padding: 1.4rem; }
.login-card h1 { margin-top: 0; }
.login-card form { display: grid; gap: 0.9rem; }
.muted { color: var(--muted); }

@media (max-width: 1100px) {
  .hero-grid, .two-columns, .detail-grid, .contact-grid, .split-section, .footer-grid, .admin-wrap { grid-template-columns: 1fr; }
  .card-grid.four-columns, .card-grid.three-columns, .card-grid, .feature-grid.four-up, .feature-grid, .hero-stats, .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 0.8rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; }
  .hero-content h1, .page-hero h1 { font-size: 2rem; }
  .card-grid.four-columns, .card-grid.three-columns, .card-grid, .feature-grid.four-up, .feature-grid, .hero-stats, .admin-stats, .legal-grid, .form-grid { grid-template-columns: 1fr; }
  .filters-bar { grid-template-columns: 1fr; }
  .mobile-cta-bar { display: grid; }
  .site-footer { padding-bottom: 7rem; }
  .topbar-inner, .section-head, .item-card-top, .contact-row, .testimonial-top, .footer-bottom { flex-direction: column; align-items: start; }
}
.footer-list li,
.footer-list a {
  display: block;
  text-align: right;
}

.footer-list .ltr-number {
  display: block;
  width: 100%;
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: right;
}

.footer-meta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.footer-meta-label {
  font-weight: 800;
  color: var(--text-primary);
}

.footer-meta-value {
  color: var(--text-muted);
  line-height: 1.7;
  word-break: break-word;
}

.detail-media-gallery {
  display: grid;
  gap: 14px;
}

.detail-main-media,
.detail-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: #fff;
  cursor: zoom-in;
}

.detail-main-media {
  display: block;
  border-radius: 22px;
  overflow: hidden;
  padding: 12px;
  background: linear-gradient(180deg, #f8faff 0%, #eef3ff 100%);
}

.detail-main-image {
  width: 100%;
  height: clamp(260px, 52vw, 560px);
  border-radius: 18px;
  display: block;
  background: #eef2ff;
  object-fit: contain;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-thumb {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.detail-main-media:hover,
.detail-thumb:hover {
  border-color: rgba(58, 99, 255, 0.22);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.detail-thumb:hover {
  transform: translateY(-2px);
}

.detail-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: #eef2ff;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.image-lightbox.is-visible {
  opacity: 1;
  visibility: visible;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 24, 0.92);
  backdrop-filter: blur(8px);
}

.image-lightbox-topbar {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
  direction: ltr;
}

.image-lightbox-counter {
  min-height: 40px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  letter-spacing: 0.04em;
  direction: ltr;
  unicode-bidi: isolate;
}

.image-lightbox-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(62px, 6vw, 82px) clamp(18px, 3vw, 32px) clamp(40px, 6vw, 56px);
}

.image-lightbox-viewport {
  position: relative;
  width: min(calc(100vw - 40px), 1600px);
  height: min(calc(100dvh - 118px), 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding-bottom: clamp(18px, 3vh, 28px);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.image-lightbox-image {
  width: auto;
  height: auto;
  max-width: min(100%, calc(100vw - 92px));
  max-height: min(100%, calc(100dvh - 152px));
  object-fit: contain;
  display: block;
  margin: auto;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.16s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.image-lightbox-viewport.is-zoomed .image-lightbox-image {
  cursor: grab;
}

.image-lightbox-viewport.is-dragging .image-lightbox-image {
  cursor: grabbing;
  transition: none;
}

.image-lightbox-close,
.image-lightbox-nav {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(18, 24, 39, 0.54);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.image-lightbox-close:hover,
.image-lightbox-nav:hover {
  transform: scale(1.04);
  background: rgba(26, 33, 54, 0.78);
  border-color: rgba(255, 255, 255, 0.24);
}

.image-lightbox-close {
  top: 18px;
  inset-inline-end: 18px;
  font-size: 2rem;
  line-height: 1;
}

.image-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.25rem;
  line-height: 1;
}

.image-lightbox-nav:hover {
  transform: translateY(-50%) scale(1.04);
}

.image-lightbox-prev {
  inset-inline-start: 18px;
}

.image-lightbox-next {
  inset-inline-end: 18px;
}

.image-lightbox-nav[hidden] {
  display: none;
}


@media (max-width: 780px) {
  .image-lightbox-stage {
    padding: 68px 12px 24px;
  }

  .image-lightbox-viewport {
    width: min(calc(100vw - 24px), 100%);
    height: min(calc(100dvh - 96px), 100%);
    padding-bottom: 18px;
  }

  .image-lightbox-close,
  .image-lightbox-nav {
    width: 46px;
    height: 46px;
  }

  .image-lightbox-close {
    top: 14px;
    inset-inline-end: 14px;
  }

  .image-lightbox-prev {
    inset-inline-start: 10px;
  }

  .image-lightbox-next {
    inset-inline-end: 10px;
  }

  .image-lightbox-counter {
    min-height: 36px;
    padding: 0.45rem 0.8rem;
    font-size: 0.92rem;
  }
}
.detail-utility-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.share-dropdown {
  position: relative;
}

.share-dropdown summary {
  list-style: none;
  cursor: pointer;
}

.share-dropdown summary::-webkit-details-marker {
  display: none;
}

.share-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-start: 0;
  min-width: 220px;
  display: grid;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 18px;
  padding: 0.7rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  z-index: 15;
}

.share-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(99, 102, 241, 0.05);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.share-link-btn:hover {
  background: rgba(58, 99, 255, 0.1);
}

.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 70;
}

.qr-modal[hidden] {
  display: none;
}

.qr-modal-card {
  width: min(420px, 100%);
  padding: 1.2rem;
}

.qr-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.qr-canvas-wrap {
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 20px;
  background: #fff;
  border: 1px dashed rgba(99, 102, 241, 0.2);
}

.qr-canvas-wrap canvas {
  width: min(280px, 100%);
  height: auto;
}

.qr-modal-note {
  margin: 0.85rem 0 0;
}

.detail-actions--compact {
  margin-top: 1rem;
}

.slug-input-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.slug-input-row input {
  flex: 1 1 280px;
}

.input-hint {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.media-field-block {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
}

.media-field-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.media-upload-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(58, 99, 255, 0.35);
  background: rgba(58, 99, 255, 0.06);
  cursor: pointer;
}

.media-upload-picker input {
  display: none;
}

.media-preview-stack {
  display: grid;
  gap: 1rem;
}

.media-preview-title {
  display: inline-block;
  margin-bottom: 0.55rem;
}

.media-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.media-preview-card {
  position: relative;
  width: min(100%, 148px);
  flex: 0 0 148px;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: #fff;
}

.media-preview-card img {
  width: 100%;
  height: 112px;
  object-fit: contain;
  display: block;
  background: linear-gradient(180deg, #f8faff 0%, #eef3ff 100%);
}

.media-preview-card figcaption {
  min-height: 48px;
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-word;
}

.media-preview-remove {
  position: absolute;
  top: 0.45rem;
  inset-inline-end: 0.45rem;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.media-preview-remove:hover {
  background: rgba(220, 38, 38, 0.9);
}

.media-upload-result-box {
  display: grid;
  gap: 0.75rem;
}

.media-preview-card--pending {
  border-style: dashed;
}

.media-preview-empty {
  padding: 0.9rem;
  border-radius: 16px;
  background: rgba(58, 99, 255, 0.06);
  color: var(--muted);
}

@page {
  size: auto;
  margin: 12mm;
}

@media print {
  html,
  body {
    background: #fff !important;
    overflow: visible !important;
  }

  body {
    min-height: auto !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #site-header,
  #site-footer,
  #mobile-cta,
  .detail-utility-bar,
  .detail-actions,
  .qr-modal,
  .image-lightbox,
  .contact-grid,
  .map-card,
  .detail-gallery {
    display: none !important;
  }

  .section,
  .container,
  .detail-grid,
  .glass-card,
  .detail-content,
  .detail-media {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    border: 0 !important;
    backdrop-filter: none !important;
  }

  .section {
    padding: 0 !important;
  }

  .detail-grid {
    display: block !important;
  }

  .detail-media {
    margin-bottom: 0.75rem !important;
  }

  .detail-media img,
  .detail-main-image {
    max-height: 100mm;
    object-fit: contain;
  }

  .page-hero {
    padding: 0 0 0.75rem !important;
    margin: 0 0 0.75rem !important;
  }

  .page-hero .pill {
    display: none !important;
  }

  .page-hero h1 {
    margin: 0 0 0.45rem !important;
  }

  .page-hero p,
  .detail-content p,
  .detail-list,
  .chip-row span,
  .detail-meta-row {
    color: #000 !important;
  }

  .detail-list li,
  .chip-row span,
  .case-detail-block,
  .prose-block p,
  .detail-meta-row {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    color: #000 !important;
    text-decoration: none !important;
  }
}


.share-copy-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.58);
}

.share-copy-modal[hidden] {
  display: none;
}

.share-copy-modal-card {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 2rem));
  overflow: auto;
  padding: 1.2rem;
}

.share-copy-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.share-copy-modal-head h2 {
  margin: 0.15rem 0 0;
}

.share-copy-modal-kicker {
  margin: 0;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.9rem;
}

.share-copy-modal-note,
.share-copy-modal-status {
  margin: 0 0 0.85rem;
  color: var(--muted);
  line-height: 1.8;
}

.share-copy-modal-status {
  min-height: 1.6em;
  font-weight: 700;
}

.share-copy-textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.75;
  box-sizing: border-box;
  direction: rtl;
  unicode-bidi: plaintext;
}

.share-copy-modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 0.9rem;
}
