/* ============================================================
   style.css — Musicatea Enhanced
   Premium dark theme with smooth UX
   Font: Cairo (Arabic-first)
*============================================================= */

/* ── Variables ─┐ ──────────────────*/
:root {
  --bg:         #09090b;
  --bg2:        #0f0f12e0;
  --bg3:        #141418;
  --surface:    rgba(255,255,255,0.035);
  --surface2:   rgba(255,255,255,0.06);
  --border:     rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);
  --gold:       #c8a45a;
  --gold-light: #e2c07a;
  --gold-dim:   rgba(200,164,90,0.12);
  --text:       #ede8dc;
  --text-muted: #ebe9ce;
  --text-dim:   rgba(237,232,220,0.28);
  --red:        #c46060;
  --green:      #7ecfa0;
  --radius:     12px;
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ─┐ Reset ──────────────────*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}
body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s var(--ease);
}

/* ─┐ Skip link (a11y) ──────────────────*/
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--gold);
  color: var(--bg);
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

/* ─┐ Screen-reader only (a11y) ──────────────────*/
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(200,164,90,0.3);
  border-radius: 3px;
  transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover { background: rgba(200,164,90,0.5); }
::selection { background: var(--gold-dim); color: var(--gold-light); }

/* ── Navigation ──────────────────
   Root fix:
   - Navigation is NOT sticky. It scrolls away normally.
   - Desktop: logo and links stay on one row, EN on the left.
   - Mobile: logo remains on the right in Arabic, EN on the physical left,
     and the nav menu remains beside the logo, not stacked underneath.
   - If JS creates .mt-mobile-more-nav, it is styled here as the second visible item.
────────────────── */
.site-nav {
  position: relative;
  top: auto;
  z-index: 200;
  background: rgba(9,9,11,0.92);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
  overflow: visible;
}

.site-nav.scrolled {
  background: rgba(9,9,11,0.96);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav-shell {
  padding: 0 5%;
}

.nav-top {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-top-right,
.nav-top-left {
  display: flex;
  align-items: center;
}

.nav-top-right {
  min-width: 0;
  flex: 1 1 auto;
}

.nav-top-left {
  justify-content: flex-start;
  flex: 0 0 auto;
  margin-inline-start: 16px;
}

.nav-main-group {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  flex: 1 1 auto;
  margin-left: 10px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--gold-light);
  letter-spacing: 0.02em;
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
  line-height: 1;
  white-space: nowrap;
}

.nav-logo-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(200,164,90,0.18));
}

.nav-logo-text {
  display: inline-block;
}

.nav-logo:hover {
  transform: scale(1.04);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s var(--ease);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.lang-toggle:hover {
  background: var(--surface2);
  border-color: rgba(200,164,90,0.35);
  color: var(--gold);
}

.lang-toggle svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nav-bottom {
  min-height: 58px;
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-links a,
.mt-mobile-more-toggle {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 9px;
  transition: all 0.3s var(--ease);
  position: relative;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--gold);
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover,
.mt-mobile-more-toggle:hover {
  color: var(--text);
  background: var(--surface2);
}

.nav-links a.active {
  color: var(--gold-light);
  background: var(--gold-dim);
}

.nav-links a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-top-home {
  min-height: 72px;
  border-bottom: none;
}

.nav-top-home .nav-links {
  flex: 1 1 auto;
}

/* Mobile More menu generated by the existing nav script */
.mt-mobile-more-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.mt-mobile-more-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(200,164,90,0.22);
  background: rgba(200,164,90,0.08);
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.mt-mobile-more-toggle[aria-expanded="true"] {
  color: var(--gold-light);
  border-color: rgba(200,164,90,0.42);
  background: rgba(200,164,90,0.16);
}

.mt-mobile-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 800;
  min-width: 220px;
  max-width: calc(100vw - 28px);
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(200,164,90,0.2);
  background: rgba(12,12,15,0.985);
  box-shadow: 0 18px 34px rgba(0,0,0,0.36);
  display: grid;
  gap: 4px;
}

.mt-mobile-more-menu[hidden] {
  display: none !important;
}

.mt-mobile-more-menu a,
.mt-mobile-more-menu .maqam-nav-item > a {
  display: flex !important;
  width: 100% !important;
  justify-content: flex-start !important;
  text-align: start !important;
  white-space: nowrap !important;
  padding: 10px 12px !important;
  font-size: 0.88rem !important;
  border-radius: 10px !important;
}

.mt-mobile-more-menu a::after {
  display: none;
}

.maqam-nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.maqam-nav-item > a {
  z-index: 2;
}

.maqam-mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: min(860px, calc(100vw - 40px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s var(--ease);
}

.maqam-nav-item.is-open .maqam-mega-menu,
.maqam-nav-item:hover .maqam-mega-menu,
.maqam-nav-item:focus-within .maqam-mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.maqam-mega-shell {
  background: rgba(15,15,18,0.98);
  border: 1px solid rgba(200,164,90,0.16);
  border-radius: 18px;
  box-shadow: 0 24px 50px rgba(0,0,0,0.45);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  overflow: hidden;
}

.maqam-mega-main-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(200,164,90,0.04) 0%, rgba(255,255,255,0.01) 100%);
}

.maqam-mega-main-item {
  min-height: 84px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  transition: all 0.22s var(--ease);
}

.maqam-mega-main-item:hover,
.maqam-mega-main-item:focus,
.maqam-mega-main-item.active {
  background: rgba(200,164,90,0.10);
  border-color: rgba(200,164,90,0.24);
  color: var(--gold-light);
}

.maqam-mega-main-name {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
}

.maqam-mega-main-item:hover .maqam-mega-main-name,
.maqam-mega-main-item:focus .maqam-mega-main-name,
.maqam-mega-main-item.active .maqam-mega-main-name {
  color: var(--gold-light);
}

.maqam-mega-main-latin {
  font-size: 0.76rem;
  color: var(--text-dim);
  font-style: italic;
}

.maqam-mega-branch-panel {
  padding: 18px;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.maqam-mega-branch-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.maqam-mega-branch-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 800;
}

.maqam-mega-branch-family-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 900;
}

.maqam-mega-branch-family-link svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.maqam-mega-branches {
  display: grid;
  gap: 8px;
}

.maqam-mega-branch-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  transition: all 0.22s var(--ease);
}

.maqam-mega-branch-item:hover,
.maqam-mega-branch-item:focus {
  background: rgba(255,255,255,0.05);
  border-color: rgba(200,164,90,0.18);
}

.maqam-mega-branch-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
}

.maqam-mega-branch-latin {
  font-size: 0.74rem;
  color: var(--text-dim);
  font-style: italic;
}

.maqam-mega-empty {
  padding: 14px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.8;
}

html[dir="rtl"] .nav-top,
html[dir="ltr"] .nav-top {
  flex-direction: row;
}

html[dir="rtl"] .nav-bottom,
html[dir="ltr"] .nav-bottom {
  justify-content: flex-start;
}

/* ── Page hero areas ─┐ ────────────────*/
.page-hero {
  padding: 60px 5% 48px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  animation: fadeInUp 0.6s var(--ease);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 580px;
  font-size: 1rem;
  line-height: 1.8;
}

/* ── Filters bar ────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 20px 5%;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s var(--ease);
}

.filters select,
.filters input[type="text"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s var(--ease);
  -webkit-appearance: none;
}

.filters select:hover,
.filters input[type="text"]:hover {
  border-color: rgba(200,164,90,0.3);
  background: var(--surface2);
}

.filters select:focus,
.filters input[type="text"]:focus {
  border-color: rgba(200,164,90,0.5);
  box-shadow: 0 0 0 4px rgba(200,164,90,0.08);
  transform: translateY(-1px);
}

.filters select option { background: var(--bg3); }

/* ── List / grid ─┐ ─────────────────*/
#list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 32px 5%;
}

/* ── Card ──────────────────*/
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.022) 0%, rgba(255,255,255,0.012) 100%), var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: all 0.4s var(--ease);
  animation: fadeInScale 0.5s var(--ease) backwards;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border-color: rgba(200,164,90,0.3);
}

.card-header { margin-bottom: 16px; }

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
  transition: color 0.3s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.05em;
}

.card:hover .card-title {
  color: var(--gold-light);
}

.card-credits {
  display: grid;
  gap: 8px;
}

.card-credit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-credit-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.card-credit-value {
  font-size: 0.86rem;
  color: var(--text-muted);
  transition: color 0.3s var(--ease);
}

.card:hover .card-credit-value {
  color: var(--text);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.card-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-maqam {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(200,164,90,0.08);
  border: 1px solid rgba(200,164,90,0.18);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
}

.card-tag-muted {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text-muted);
}

.card-tonic {
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text-dim);
  transition: all 0.3s;
}

.card:hover .card-tonic {
  background: var(--gold-dim);
  border-color: rgba(200,164,90,0.3);
  color: var(--gold);
}

/* Maqam link in cards */
.maqam-link {
  color: var(--gold);
  text-decoration: none;
  transition: all 0.3s var(--ease);
  position: relative;
}

.card-tag.maqam-link,
.maqam-link.card-tag {
  color: var(--gold-light);
}

.card-tag-clickable {
  cursor: pointer;
}

.card-tag-clickable:hover {
  transform: translateY(-1px);
  background: rgba(200,164,90,0.16);
  border-color: rgba(200,164,90,0.34);
  box-shadow: 0 8px 18px rgba(200,164,90,0.12);
}

.maqam-link::after {
  content: '';
  position: absolute;
  bottom: 6px;
  right: 12px;
  left: 12px;
  width: auto;
  height: 1px;
  background: var(--gold-light);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease);
}

.maqam-link:hover {
  color: var(--gold-light);
}

.maqam-link:hover::after {
  transform: scaleX(1);
}

/* Badges */
.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
  transition: all 0.3s var(--ease);
}

.badge-song {
  background: rgba(200,164,90,0.12);
  color: var(--gold);
  border: 1px solid rgba(200,164,90,0.22);
}

.card:hover .badge-song {
  background: rgba(200,164,90,0.2);
  border-color: rgba(200,164,90,0.4);
}

.badge-inst {
  background: rgba(126,207,160,0.1);
  color: var(--green);
  border: 1px solid rgba(126,207,160,0.2);
}

.card:hover .badge-inst {
  background: rgba(126,207,160,0.15);
  border-color: rgba(126,207,160,0.3);
}

/* Download button */
.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 11px 0;
  background: var(--gold-dim);
  border: 1px solid rgba(200,164,90,0.22);
  border-radius: 10px;
  color: var(--gold-light);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

.download-btn:hover {
  background: rgba(200,164,90,0.22);
  border-color: rgba(200,164,90,0.45);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200,164,90,0.2);
}

.download-btn svg {
  transition: transform 0.3s var(--ease);
}

.download-btn:hover svg {
  transform: translateY(2px);
}

/* Legacy download class */
a.download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 0;
  background: var(--gold-dim);
  border: 1px solid rgba(200,164,90,0.22);
  border-radius: 10px;
  color: var(--gold-light);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

a.download:hover {
  background: rgba(200,164,90,0.22);
  border-color: rgba(200,164,90,0.45);
  transform: translateY(-2px);
}

/* ─┐ Empty state ──────────────────*/
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 80px 20px;
  color: var(--text-dim);
  font-size: 0.95rem;
  text-align: center;
  animation: fadeIn 0.5s var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── System toggle ──────────────────*/
.system-toggle {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 5px;
}

.system-toggle-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-muted);
  transition: all 0.3s var(--ease);
  cursor: pointer;
  border: none;
  background: none;
}

.system-toggle-btn:hover {
  color: var(--text);
  background: var(--surface2);
}

.system-toggle-btn.active {
  background: var(--gold-dim);
  color: var(--gold-light);
  border: 1px solid rgba(200,164,90,0.25);
  transform: scale(1.02);
}

/* ── Footer ─┐ ──────────────────*/
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 5%;
  margin-top: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-dim);
  font-size: 0.85rem;
  background: var(--bg2);
}

.footer-logo {
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--gold-light);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.3s var(--ease);
}

.footer-links a:hover {
  color: var(--gold-light);
}

/* ─┐ Responsive ─┐ ─────────────────*/
@media (max-width: 980px) {
  .nav-top,
  .nav-top-home {
    min-height: auto;
    padding: 10px 0;
    align-items: center;
  }

  .nav-main-group {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .nav-top-home .nav-links {
    width: auto;
  }

  .nav-logo {
    font-size: 1.85rem;
  }

  .nav-logo-mark {
    width: 32px;
    height: 32px;
  }

  .nav-links {
    gap: 3px;
    flex-wrap: nowrap;
  }

  .nav-links a,
  .mt-mobile-more-toggle {
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .maqam-mega-menu {
    display: none;
  }
}

@media (max-width: 640px) {
  #list {
    grid-template-columns: 1fr;
    padding: 24px 4%;
    gap: 16px;
  }

  .filters {
    padding: 16px 4%;
    top: auto;
    gap: 10px;
    position: static;
  }

  .site-nav {
    position: relative;
    top: auto;
    padding: 0;
    overflow: visible;
  }

  .nav-shell {
    padding: 0 4%;
  }

  .nav-top,
  .nav-top-home {
    min-height: auto;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: none;
  }

  .nav-top-right {
    min-width: 0;
    flex: 1 1 auto;
    order: 2;
  }

  .nav-top-left {
    order: 1;
    flex: 0 0 auto;
    margin: 0;
    justify-content: flex-start;
  }

  html[dir="rtl"] .nav-top-left {
    margin-inline-end: auto;
  }

  .nav-main-group {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    width: 100%;
    margin: 0;
  }

  .nav-logo {
    gap: 6px;
    font-size: 1.45rem;
    flex: 0 0 auto;
    order: 0;
  }

  .nav-logo-mark {
    width: 27px;
    height: 27px;
  }

  .nav-links {
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 4px;
    overflow: visible;
    padding: 0;
  }

  .nav-links a,
  .mt-mobile-more-toggle {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 9px;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
    text-align: center;
  }

  .mt-mobile-more-menu {
    inset-inline-end: 0;
    top: calc(100% + 8px);
  }

  .nav-bottom {
    min-height: 54px;
    padding: 8px 0;
  }

  .lang-toggle {
    font-size: 0.72rem;
    padding: 5px 8px;
    min-height: 30px;
    border-radius: 10px;
  }

  .lang-toggle svg {
    width: 13px;
    height: 13px;
  }

  .card {
    padding: 18px;
  }

  .card-title {
    min-height: auto;
  }

  .card-credit-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .site-footer {
    justify-content: center;
    text-align: center;
  }

  .footer-links {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .nav-logo {
    font-size: 1.3rem;
  }

  .nav-logo-mark {
    width: 25px;
    height: 25px;
  }

  .nav-links a,
  .mt-mobile-more-toggle {
    font-size: 0.66rem;
    padding-inline: 7px;
  }
}

/* ─┐ Smooth scroll animations ────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .card {
    animation-delay: calc(var(--card-index, 0) * 0.05s);
  }
}

.android-install-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.android-install-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.android-install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(200,164,90,0.32);
  background: linear-gradient(180deg, rgba(200,164,90,0.18) 0%, rgba(200,164,90,0.10) 100%);
  color: var(--gold-light);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.android-install-btn:hover {
  background: linear-gradient(180deg, rgba(200,164,90,0.26) 0%, rgba(200,164,90,0.16) 100%);
  border-color: rgba(200,164,90,0.48);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(200,164,90,0.14);
}

.android-install-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(200,164,90,0.12);
  border-color: var(--gold);
}

.instagram-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(200,164,90,0.32);
  background: rgba(255,255,255,0.03);
  color: var(--gold-light);
  transition: all 0.25s var(--ease);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  flex-shrink: 0;
}

.instagram-icon-btn:hover {
  background: rgba(200,164,90,0.12);
  border-color: rgba(200,164,90,0.48);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(200,164,90,0.14);
}

.instagram-icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(200,164,90,0.12);
  border-color: var(--gold);
}

.instagram-icon-btn svg {
  display: block;
}

.android-install-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold-light);
}

.android-install-note {
  margin-top: 8px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--gold-light);
  opacity: 0.9;
  text-shadow: 0 1px 6px rgba(200,164,90,0.12);
}

.android-install-text {
  display: inline-block;
  line-height: 1;
}

@media (max-width: 640px) {
  .android-install-wrap {
    margin-top: 14px;
  }

  .android-install-actions {
    width: 100%;
    justify-content: center;
  }

  .android-install-btn {
    width: 100%;
    max-width: 260px;
    font-size: 0.88rem;
    min-height: 42px;
  }

  .instagram-icon-btn {
    width: 42px;
    height: 42px;
  }
}
