/* Legendaries TCG — Cursor.com-style layout, white background, Cairo, RTL */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --text-muted: #404040;
  --border: #e5e5e5;
  --hover-bg: #f5f5f5;
  /* فئات الندرة */
  --rarity-basic: #9ca3af;
  --rarity-common: #6b7280;
  --rarity-uncommon: #16a34a;
  --rarity-rare: #2563eb;
  --rarity-epic: #dc2626;
  --rarity-legendary: #7c3aed;
}

html {
  direction: rtl;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* —— Header (Cursor-style: minimal, full-width) —— */
.site-header {
  background: var(--bg);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-block {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  width: min-content;
  max-width: 120px; /* mobile-first: prevents header shift */
}
@media (min-width: 641px) {
  .logo-block { max-width: 160px; }
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: block;
  min-width: 0;
  width: 100%;
}

.logo-img {
  display: block;
  width: 100%;
  height: auto;
  min-width: 0;
  max-height: 44px; /* mobile: reserve space, prevent CLS */
  object-fit: contain;
}
@media (min-width: 641px) {
  .logo-img { max-height: 52px; }
}

.logo-en {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.slogan {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
  border-radius: 6px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-menu a:hover {
  color: var(--text);
  background: var(--hover-bg);
}

.nav-menu a.active {
  color: var(--text);
}

.nav-menu a.btn-primary {
  color: var(--text) !important;
  background: var(--hover-bg);
  border-color: var(--border);
}
.nav-menu a.btn-primary:hover {
  color: #fff !important;
  background: var(--text);
  border-color: var(--text);
}

/* —— Main (full-width sections like Cursor) —— */
main {
  flex: 1;
  width: 100%;
}

/* —— Coming soon page —— */
.coming-soon-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
}
.coming-soon {
  text-align: center;
  padding: 2rem 1rem;
}
.coming-soon-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}
.coming-soon-tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.coming-soon-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: 1200px;
}

/* —— Hero (Cursor-style: one big headline + sub + 2 CTAs) —— */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 5rem;
}

.hero-media {
  margin: 0 auto 1.75rem;
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--hover-bg);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.65rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero .hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border: 1px solid transparent;
}

.btn-icon {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn-primary:hover {
  background: #333;
  border-color: #333;
  color: var(--bg);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--hover-bg);
  border-color: #d4d4d4;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-whatsapp .btn-icon,
.btn-whatsapp svg {
  fill: currentColor;
  color: inherit;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.btn-whatsapp:hover {
  background: #20bd5a;
  border-color: #20bd5a;
  color: #fff;
}

.contact-whatsapp {
  margin-top: 2rem;
  text-align: center;
}

.contact-whatsapp .btn-whatsapp {
  margin-bottom: 1rem;
}

.whatsapp-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.whatsapp-partnership {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 2.5rem 0 0.75rem;
}

/* —— Contact page layout —— */
.page-main--contact .contact-intro {
  text-align: center;
  margin-bottom: 2.5rem;
}

.page-main--contact .contact-intro h1 {
  margin-bottom: 0.5rem;
}

.page-main--contact .contact-intro p {
  max-width: 520px;
  margin: 0 auto;
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .page-main--contact {
    padding: 1.5rem 1.25rem 2.5rem;
  }
  .page-main--contact .contact-intro {
    margin-bottom: 1.5rem;
  }
  .page-main--contact .contact-intro h1 {
    font-size: 1.45rem;
    margin-bottom: 0.4rem;
  }
  .page-main--contact .contact-intro p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  .contact-cards {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
  }
  .contact-card {
    padding: 1.2rem 1.25rem;
    border-radius: 10px;
  }
  .contact-card-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 0.65rem;
  }
  .contact-card-icon svg {
    width: 23px;
    height: 23px;
  }
  .contact-card h2 {
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
  }
  .contact-card p {
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
  }
  .contact-card .btn {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }
  .contact-note {
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .page-main--contact {
    padding: 1rem 1rem 2rem;
  }
  .page-main--contact .contact-intro {
    margin-bottom: 1.15rem;
  }
  .page-main--contact .contact-intro h1 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
  }
  .page-main--contact .contact-intro p {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  .contact-cards {
    gap: 0.65rem;
    margin-bottom: 1rem;
  }
  .contact-card {
    padding: 1rem 1.1rem;
    border-radius: 8px;
  }
  .contact-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
  }
  .contact-card-icon svg {
    width: 20px;
    height: 20px;
  }
  .contact-card h2 {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
  }
  .contact-card p {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }
  .contact-card .btn {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }
  .contact-card .btn-icon {
    width: 16px;
    height: 16px;
  }
  .contact-note {
    font-size: 0.78rem;
  }
}

.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.contact-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(37, 211, 102, 0.15);
  color: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.contact-card-icon--partnership {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

.contact-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.contact-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.6;
  flex-grow: 1;
}

.contact-card .btn {
  width: 100%;
  justify-content: center;
}

.contact-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 !important;
}

.btn-sm {
  font-size: 0.875rem;
  padding: 0.4rem 0.9rem;
}

/* —— Section block (Cursor-style: heading + text + link) —— */
.section {
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--border);
}

.section:first-of-type {
  border-top: none;
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.section-head p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
}

/* Feature grid (2 cols on desktop) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.link-arrow {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.link-arrow:hover {
  text-decoration: underline;
}

/* —— Page content (inner pages) —— */
.page-main {
  padding: 3rem 1.5rem 4rem;
}

.page-main .container {
  max-width: 720px;
}
.page-main .container.container--wide {
  max-width: 1100px;
}

.page-main h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.page-main h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.page-main p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.page-main a {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-main a:hover {
  color: var(--text-muted);
}

.page-main .btn,
.page-main a.btn {
  text-decoration: none !important;
}
.page-main a.btn-primary {
  color: #fff !important;
}
.page-main a.btn-primary:hover {
  color: #fff !important;
}

/* —— Earn page —— */
.earn-intro {
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.earn-payment-policy {
  background: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.earn-payment-policy h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.earn-payment-policy p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.earn-terms {
  background: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.earn-terms h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.earn-terms p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.earn-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (max-width: 640px) {
  .earn-types { grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 1.5rem; }
}
.earn-type {
  background: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}
.earn-type h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.earn-type p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-muted);
}
.earn-how {
  margin-bottom: 1.5rem;
}
.earn-cta {
  text-align: center;
  margin: 0 !important;
}

@media (max-width: 480px) {
  .page-main--earn { padding: 1.5rem 1rem 2.5rem; }
  .earn-intro { font-size: 0.95rem; margin-bottom: 1.5rem; }
  .earn-type { padding: 1rem; }
}

/* —— Rules page mobile —— */
@media (max-width: 640px) {
  .page-main--rules {
    padding: 2rem 1.25rem 3rem;
  }
  .page-main--rules h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  .page-main--rules h2 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
  }
  .page-main--rules p {
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
  }
}

@media (max-width: 480px) {
  .page-main--rules {
    padding: 1.5rem 1rem 2.5rem;
  }
  .page-main--rules .container {
    max-width: 100%;
  }
  .page-main--rules h1 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
  }
  .page-main--rules h2 {
    font-size: 1rem;
    margin: 1.25rem 0 0.4rem;
  }
  .page-main--rules p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
  }
  .page-main--rules > .container > p:last-of-type {
    margin-top: 1.25rem;
  }
}

/* —— Cards grid (characters page) —— */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  max-width: 100%;
}
@media (min-width: 641px) {
  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card-item {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card-item:hover {
  border-color: #d4d4d4;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.card-item-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-item-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -2px;
  border-radius: 12px;
}

.card-item img {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--hover-bg);
}

.card-item .card-info {
  padding: 0.75rem 0.9rem;
}

.card-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text);
  line-height: 1.3;
}

.card-item p {
  font-size: 0.8rem;
  margin: 0;
  color: var(--text-muted);
}

/* شارات الندرة */
.rarity-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  color: #fff;
  margin-left: 0.25rem;
}
.rarity-basic { background: var(--rarity-basic); }
.rarity-common { background: var(--rarity-common); }
.rarity-uncommon { background: var(--rarity-uncommon); }
.rarity-rare { background: var(--rarity-rare); }
.rarity-epic { background: var(--rarity-epic); }
.rarity-legendary { background: var(--rarity-legendary); }

.rarity-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1rem 0 1.5rem;
  padding: 1rem;
  background: var(--hover-bg);
  border-radius: 8px;
}
.rarity-legend span {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.rarity-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.rarity-list {
  margin: 0.5rem 0 1rem;
  padding-right: 1.5rem;
}
.rarity-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.rarity-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rarity-list .dot-common { background: #6b7280; min-width: 14px; min-height: 14px; }
.rarity-list .dot-uncommon { background: #16a34a; min-width: 14px; min-height: 14px; }
.rarity-list .dot-rare { background: #2563eb; min-width: 14px; min-height: 14px; }
.rarity-list .dot-epic { background: #dc2626; min-width: 14px; min-height: 14px; }
.rarity-list .dot-legendary { background: #7c3aed; min-width: 14px; min-height: 14px; }
.rarity-list .rarity-name.common { color: #6b7280 !important; }
.rarity-list .rarity-name.uncommon { color: #16a34a !important; }
.rarity-list .rarity-name.rare { color: #2563eb !important; }
.rarity-list .rarity-name.epic { color: #dc2626 !important; }
.rarity-list .rarity-name.legendary { color: #7c3aed !important; }
.card-stats {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.card-stats .card-stat-row {
  display: block;
}
.card-stats .card-stat-row .val { margin-right: 0.35rem; direction: ltr; unicode-bidi: embed; display: inline-block; }
.card-level {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .cards-grid {
    gap: 0.75rem;
  }
  .card-item {
    width: 100%;
    max-width: none;
  }
  .card-item .card-info {
    padding: 0.6rem 0.75rem;
  }
  .card-item h3 {
    font-size: 0.85rem;
  }
  .card-item p {
    font-size: 0.75rem;
  }
  .card-item .rarity-badge {
    font-size: 0.7rem;
  }
  .card-item .card-stats {
    font-size: 0.72rem;
  }
  .card-item .card-level {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .card-item .card-info {
    padding: 0.5rem 0.65rem;
  }
  .card-item h3 {
    font-size: 0.8rem;
  }
  .card-item p {
    font-size: 0.7rem;
  }
  .card-item .rarity-badge {
    font-size: 0.65rem;
  }
  .card-item .card-stats {
    font-size: 0.68rem;
  }
  .card-item .card-level {
    font-size: 0.65rem;
  }
}

/* —— Contact form —— */
.contact-form {
  max-width: 480px;
  margin-top: 1.5rem;
}

.contact-form label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.contact-form button:hover {
  background: #333;
}

.contact-info {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.contact-info h2 {
  margin-bottom: 0.75rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

/* —— Footer (Cursor-style: tagline + links + CTA) —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
  margin-top: auto;
  background: var(--bg);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-slogan {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.footer-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-cta {
  margin-bottom: 1.5rem;
}

.footer-cta .btn {
  margin: 0 0.25rem;
}

.footer-domain {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* —— Footer & contact social links — تصميم راقي بألوان العلامات —— */
.footer-social,
.contact-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-social a.social-fb,
.footer-social a.social-ig,
.footer-social a.social-tiktok,
.contact-social a.social-fb,
.contact-social a.social-ig,
.contact-social a.social-tiktok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.footer-social a.social-fb:hover,
.footer-social a.social-ig:hover,
.footer-social a.social-tiktok:hover,
.contact-social a.social-fb:hover,
.contact-social a.social-ig:hover,
.contact-social a.social-tiktok:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* فيسبوك — أزرق رسمي */
.footer-social a.social-fb,
.contact-social a.social-fb {
  background-color: #1877f2 !important;
  color: #fff !important;
}

.footer-social a.social-fb:hover,
.contact-social a.social-fb:hover {
  background-color: #0d65d9 !important;
}

/* إنستغرام — لون ثابت (التدرج يسبب تشويش في الرسم) */
.footer-social a.social-ig,
.contact-social a.social-ig {
  background-color: #e4405f !important;
  color: #fff !important;
}

.footer-social a.social-ig:hover,
.contact-social a.social-ig:hover {
  background-color: #d62d4e !important;
}

/* تيك توك — أسود */
.footer-social a.social-tiktok,
.contact-social a.social-tiktok {
  background-color: #000000 !important;
  color: #fff !important;
}

.footer-social a.social-tiktok:hover,
.contact-social a.social-tiktok:hover {
  background-color: #333333 !important;
}

.footer-social a.social-fb svg,
.footer-social a.social-ig svg,
.footer-social a.social-tiktok svg,
.contact-social a.social-fb svg,
.contact-social a.social-ig svg,
.contact-social a.social-tiktok svg {
  width: 22px;
  height: 22px;
  fill: #ffffff !important;
}

.contact-social {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* —— Responsive: mobile menu —— */
@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 0.5rem;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    display: block;
    padding: 0.6rem;
  }

  .hero {
    padding: 3rem 1rem 4rem;
  }

  .section {
    padding: 3rem 1rem;
  }
}

@media (min-width: 641px) {
  .nav-menu {
    display: flex !important;
  }
}

/* Ensure all nav links fit on medium screens */
@media (min-width: 641px) and (max-width: 950px) {
  .nav-menu a {
    font-size: 0.85rem;
    padding: 0.45rem 0.55rem;
  }
}

/* —— Homepage (index.html) — same mobile-first density as locations —— */
@media (max-width: 767.98px) {
  .is-home .hero {
    padding: 1.5rem 0.65rem 1.75rem;
  }

  .is-home .hero-media {
    margin-bottom: 0.85rem;
    border-radius: 8px;
  }

  .is-home .hero .container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .is-home .hero h1 {
    font-size: clamp(1.15rem, 4.8vw, 1.55rem);
    margin-bottom: 0.5rem;
    line-height: 1.22;
    letter-spacing: -0.02em;
  }

  .is-home .hero .hero-tagline {
    font-size: 0.88rem;
    margin: 0 auto 0.85rem;
    line-height: 1.45;
    max-width: 100%;
  }

  .is-home .hero-ctas {
    gap: 0.4rem;
  }

  .is-home .hero-ctas .btn {
    font-size: 0.82rem;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
  }

  .is-home .section {
    padding: 1.35rem 0.65rem;
  }

  .is-home .section .container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .is-home .section-head {
    margin-bottom: 0.85rem;
  }

  .is-home .section-head h2 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
  }

  .is-home .section-head p {
    font-size: 0.85rem;
    line-height: 1.45;
    max-width: 100%;
  }

  .is-home .feature-grid {
    gap: 0.5rem;
    max-width: 100%;
  }

  .is-home .feature-card {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
  }

  .is-home .feature-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .is-home .feature-card h3 {
    font-size: 0.98rem;
    margin-bottom: 0.3rem;
  }

  .is-home .feature-card p {
    font-size: 0.82rem;
    margin-bottom: 0.45rem;
    line-height: 1.5;
  }

  .is-home .link-arrow {
    font-size: 0.82rem;
  }

  .is-home .site-footer,
  .is-cards .site-footer {
    padding: 1.5rem 0.65rem;
  }

  .is-home .footer-tagline,
  .is-cards .footer-tagline {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    max-width: 100%;
  }

  .is-home .footer-social,
  .is-cards .footer-social {
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .is-home .footer-social a.social-fb,
  .is-home .footer-social a.social-ig,
  .is-home .footer-social a.social-tiktok,
  .is-cards .footer-social a.social-fb,
  .is-cards .footer-social a.social-ig,
  .is-cards .footer-social a.social-tiktok {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }

  .is-home .footer-links,
  .is-cards .footer-links {
    gap: 0.45rem 0.75rem;
    margin-bottom: 1.15rem;
  }

  .is-home .footer-links a,
  .is-cards .footer-links a {
    font-size: 0.82rem;
  }

  .is-home .footer-cta,
  .is-cards .footer-cta {
    margin-bottom: 1rem;
  }

  .is-home .footer-cta .btn,
  .is-cards .footer-cta .btn {
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
  }

  .is-home .footer-domain,
  .is-cards .footer-domain {
    font-size: 0.8rem;
  }
}

/* —— Cards page — mobile-first tight spacing —— */
@media (max-width: 767.98px) {
  .is-cards .page-main {
    padding: 0.65rem 0.65rem 1.5rem;
  }

  .is-cards .page-main .container.container--wide {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    max-width: 100%;
  }

  .is-cards .page-main h1 {
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
    line-height: 1.25;
  }

  .is-cards .cards-type-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    gap: 0.25rem;
    margin: 0.4rem 0 0.55rem;
    padding-bottom: 3px;
  }

  .is-cards .cards-type-nav::-webkit-scrollbar {
    height: 4px;
  }

  .is-cards .cards-type-nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
  }

  .is-cards .cards-type-nav a {
    flex: 0 0 auto;
    padding: 0.24rem 0.45rem;
    font-size: 0.7rem;
    border-radius: 5px;
    line-height: 1.25;
  }

  .is-cards .cards-filters {
    gap: 0.5rem;
    margin: 0.65rem 0;
    padding: 0.5rem 0.55rem;
    border-radius: 6px;
  }

  .is-cards .cards-filters .filter-group label {
    font-size: 0.78rem;
  }

  .is-cards .cards-filters input[type="text"],
  .is-cards .cards-filters select {
    padding: 0.3rem 0.4rem;
    font-size: 0.8rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .is-cards .cards-filters .rarity-btns {
    gap: 0.28rem;
  }

  .is-cards .cards-filters .rarity-btn {
    padding: 0.26rem 0.45rem;
    font-size: 0.72rem;
    gap: 0.28rem;
  }

  .is-cards .cards-filters .rarity-btn__dot {
    width: 5px;
    height: 5px;
  }

  .is-cards .cards-filters .btn {
    padding: 0.34rem 0.6rem;
    font-size: 0.78rem;
  }

  .is-cards .cards-grid {
    gap: 0.45rem;
    margin-top: 1rem;
  }

  .is-cards .card-item {
    border-radius: 8px;
  }

  .is-cards .card-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .is-cards .card-item .card-info {
    padding: 0.45rem 0.55rem;
  }

  .is-cards .card-item h3 {
    font-size: 0.82rem;
  }

  .is-cards .card-item p {
    font-size: 0.72rem;
  }

  .is-cards .card-item .rarity-badge {
    font-size: 0.62rem;
    padding: 0.12rem 0.35rem;
  }

  .is-cards .card-item .card-stats {
    font-size: 0.68rem;
    margin-top: 0.25rem;
    gap: 0.1rem;
  }

  .is-cards .card-item .card-level {
    font-size: 0.65rem;
  }

  .is-cards .cards-empty {
    padding: 1rem 0.65rem;
    font-size: 0.88rem;
  }

  .is-cards .pagination {
    margin-top: 1.15rem;
  }

  .is-cards .pagination ul {
    gap: 0.35rem;
  }

  .is-cards .pagination a {
    padding: 0.38rem 0.65rem;
    font-size: 0.82rem;
    border-radius: 6px;
  }

  .is-cards .pagination-info {
    font-size: 0.8rem !important;
    margin-top: 0.35rem !important;
  }
}
