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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: #f5e6c8;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c9a84c, #a87c20);
  border-radius: 6px;
  border: 2px solid #f5e6c8;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #b8962a, #8a6a1a);
}

::-webkit-scrollbar-corner {
  background: #f5e6c8;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #c9a84c #f5e6c8;
}

body {
  font-family: 'Cairo', sans-serif;
  background: linear-gradient(to left, #ffffff 0%, #fffdf8 55%, #f9eed5 100%);
  color: #111;
  min-height: 100vh;
  direction: rtl;
}

/* ── HEADER ── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 80px;
  background: linear-gradient(to left, rgba(255,255,255,0.45) 0%, rgba(249,238,213,0.45) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,168,76,0.2);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand img {
  width: 40px; height: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}
nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: #444;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #b8860b;
  transition: width 0.3s ease;
}
nav a:hover { color: #b8860b; }
nav a:hover::after { width: 100%; }

/* ── HERO ── */
main {
  padding-top: 7rem;
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  main { padding-top: 9rem; padding-bottom: 6rem; }
}
.glow {
  position: absolute;
  top: 50%; left: 30%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(201,168,76,0.18) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  display: none;
}
@media (min-width: 768px) { .glow { display: block; } }

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}
.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero-grid {
    flex-direction: row-reverse;
    justify-content: space-between;
    gap: 4rem;
  }
}

/* Right column */
.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  width: 100%;
}

.qr-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1rem;
  display: inline-block;
  box-shadow: 0 8px 40px rgba(0,0,0,0.09);
  border: 1px solid rgba(201,168,76,0.3);
  margin-bottom: 1.75rem;
}
.qr-card img {
  width: 240px; height: 240px;
  display: block;
}

h1 {
  font-weight: 800;
  line-height: 1.3;
  color: #111;
  margin-bottom: 1rem;
font-size: clamp(2rem, 4vw, 3.2rem);
  white-space: nowrap;
}
/* ── Continuous Shimmer Effect ── */
h1 .gold, h2 .gold {
  color: #c9a84c;
  background: linear-gradient(
    110deg,
    #5a4515 0%,
    #c9a84c 20%,
    #fff5cc 40%,
    #c9a84c 60%,
    #5a4515 100%
  );
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s linear infinite;
}
.brand img {
  width: 40px; height: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}
nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: #444;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #b8860b;
  transition: width 0.3s ease;
}
nav a:hover { color: #b8860b; }
nav a:hover::after { width: 100%; }

/* ── HERO ── */
main {
  padding-top: 7rem;
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  main { padding-top: 9rem; padding-bottom: 6rem; }
}
.glow {
  position: absolute;
  top: 50%; left: 30%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(201,168,76,0.18) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  display: none;
}
@media (min-width: 768px) { .glow { display: block; } }

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}
.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero-grid {
    flex-direction: row-reverse;
    justify-content: space-between;
    gap: 4rem;
  }
}

/* Right column */
.hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  width: 100%;
}

.qr-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1rem;
  display: inline-block;
  box-shadow: 0 8px 40px rgba(0,0,0,0.09);
  border: 1px solid rgba(201,168,76,0.3);
  margin-bottom: 1.75rem;
}
.qr-card img {
  width: 240px; height: 240px;
  display: block;
}

h1 {
  font-weight: 800;
  line-height: 1.3;
  color: #111;
  margin-bottom: 1rem;
font-size: clamp(2rem, 4vw, 3.2rem);
  white-space: nowrap;
}
h1 .gold, h2 .gold, .gold {
  color: #c9a84c;
  background: linear-gradient(
    110deg,
    #5a4515 0%,
    #c9a84c 20%,
    #fff5cc 40%,
    #c9a84c 60%,
    #5a4515 100%
  );
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  to { background-position: -300% 0; }
}

.hero-desc {
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.85;
  color: #555;
  max-width: 460px;
  margin-bottom: 1.75rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.btn-store {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  text-decoration: none;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.btn-store:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border-color: #b8860b;
  background: #2a2a2a;
}
.btn-store .store-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}
.btn-store .store-text {
  text-align: left;
  line-height: 1.2;
}
.btn-store .store-text small {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #aaa;
}
.btn-store .store-text b {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.btn-primary {
  display: inline-block;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #c9a84c, #a87c20);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(184,134,11,0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 35px rgba(184,134,11,0.5);
}

/* ── Design Studio Button (مميز - فريد) ── */
.design-studio-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 1.05rem 2.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  color: #fff;
  border: 2px solid transparent;
  background-clip: padding-box;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 6px 30px rgba(0,0,0,0.25), 0 0 0 1px rgba(201,168,76,0.4) inset;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease, background 0.4s ease;
}
.design-studio-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #c9a84c, #a87c20, #f4d97a, #c9a84c);
  background-size: 300% 300%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: goldShift 6s ease infinite;
}
.design-studio-cta::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  transform: skewX(-25deg);
  z-index: 0;
  opacity: 0;
  transition: left 0.7s ease, opacity 0.3s ease;
}
.design-studio-cta:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 45px rgba(201,168,76,0.5), 0 0 0 1px rgba(201,168,76,0.7) inset;
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 50%, #2d2d2d 100%);
}
.design-studio-cta:hover::before {
  opacity: 1;
}
.design-studio-cta:hover::after {
  left: 150%;
  opacity: 1;
}
.design-studio-cta .ds-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a84c, #a87c20);
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(201,168,76,0.7);
  transition: transform 0.4s ease;
}
.design-studio-cta:hover .ds-icon {
  transform: rotate(360deg) scale(1.1);
}
.design-studio-cta .ds-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}
.design-studio-cta .ds-text small {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9a84c;
}
.design-studio-cta .ds-text b {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.design-studio-cta .ds-arrow {
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}
.design-studio-cta:hover .ds-arrow {
  transform: translateX(-4px);
}
@keyframes goldShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Studio section wrapper */
.studio-cta-section {
  padding: 3rem 0 5rem;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.08) 0%, transparent 70%);
}
.studio-cta-section .studio-title {
  font-family: 'Cairo', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}
.studio-cta-section .studio-subtitle {
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  color: #6b6b6b;
  margin-bottom: 1.75rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Nav pill link for design studio */
.nav-studio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem !important;
  margin-right: 0.25rem;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  border: 1px solid rgba(201,168,76,0.5) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15), 0 0 0 1px rgba(201,168,76,0.2) inset;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
  text-decoration: none;
}
.nav-studio-link:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #c9a84c, #a87c20) !important;
  box-shadow: 0 6px 20px rgba(201,168,76,0.5);
  color: #fff !important;
}
.nav-studio-link .nav-studio-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9a84c;
  box-shadow: 0 0 8px #c9a84c;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Dark mode tweaks */
body.dark-mode .design-studio-cta {
  background: linear-gradient(135deg, #0d0d0d, #1f1f1f, #0d0d0d);
  box-shadow: 0 6px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,168,76,0.5) inset;
}
body.dark-mode .design-studio-cta:hover {
  background: linear-gradient(135deg, #1f1f1f, #0d0d0d, #1f1f1f);
}
body.dark-mode .studio-cta-section .studio-title {
  color: #f4d97a;
}
body.dark-mode .studio-cta-section .studio-subtitle {
  color: #b0b0b0;
}
body.dark-mode .nav-studio-link {
  background: linear-gradient(135deg, #0d0d0d, #1f1f1f) !important;
}
.btn-secondary {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  background: transparent;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-secondary:hover {
  transform: translateY(-3px);
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* Left column — phone (static, no animation) */
.hero-phone {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
}
@media (min-width: 768px) { .hero-phone { justify-content: flex-start; } }

.phone-wrap {
  position: relative;
}
.phone-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(201,168,76,0.22) 0%, transparent 70%);
  filter: blur(50px);
  border-radius: 50%;
  transform: scale(0.8);
}
.phone-wrap img {
  width: 100%;
  max-width: 580px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,0.18));
}

/* ── STATS SECTION ── */
.stats-section {
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, rgba(201,168,76,0.08) 0%, rgba(249,238,213,0.5) 50%, rgba(201,168,76,0.08) 100%);
  border-top: 1px solid rgba(201,168,76,0.15);
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.stats-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .stats-inner { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: rgba(255,255,255,0.7);
  border-radius: 1rem;
  border: 1px solid rgba(201,168,76,0.2);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #c9a84c;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .stat-number { font-size: 2.5rem; }
}
.stat-label {
  font-size: 0.9rem;
  color: #7a6a40;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* ── SECTION COMMON ── */
.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #111;
  margin-bottom: 0.75rem;
}
.section-desc {
  font-size: 1rem;
  color: #666;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ── CATEGORIES SECTION ── */
.categories-section {
  padding: 5rem 0;
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 576px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .categories-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
}
@media (min-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(6, 1fr); }
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(184,134,11,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  border-color: rgba(184,134,11,0.4);
}
.category-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: #fff;
}
.category-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}
.category-count {
  font-size: 0.75rem;
  color: #999;
}

/* ── FEATURED TEMPLATES ── */
.featured-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.06) 0%, rgba(255,255,255,0.3) 50%, rgba(201,168,76,0.06) 100%);
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (min-width: 576px) {
  .featured-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .featured-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
}
.featured-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(184,134,11,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.featured-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}
.featured-card .card-info {
  padding: 0.85rem 1rem;
}
.featured-card .card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.featured-card .card-cat {
  font-size: 0.75rem;
  color: #c9a84c;
  font-weight: 500;
}

/* ── FONTS PREVIEW ── */
.fonts-section {
  padding: 5rem 0;
}
.fonts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 576px) {
  .fonts-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .fonts-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
}
.font-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid rgba(184,134,11,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.font-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.font-preview {
  font-size: 2rem;
  color: #c9a84c;
  margin-bottom: 0.5rem;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.font-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}
.font-card .font-style {
  font-size: 0.75rem;
  color: #999;
}

/* ── STICKERS SECTION ── */
.stickers-section {
  padding: 5rem 0;
}

/* ── BACKGROUNDS SECTION ── */
.backgrounds-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.06) 0%, rgba(255,255,255,0.3) 50%, rgba(201,168,76,0.06) 100%);
}
.backgrounds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (min-width: 576px) {
  .backgrounds-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .backgrounds-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
}
.bg-card {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(184,134,11,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.bg-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}
.bg-card .bg-preview {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}
.bg-card .bg-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
}
.bg-card .bg-preview span {
  position: relative;
  z-index: 1;
}
.bg-card .bg-info {
  background: #fff;
  padding: 0.85rem 1rem;
}
.bg-card .bg-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a1a;
  display: block;
}
.bg-card .bg-count {
  font-size: 0.75rem;
  color: #c9a84c;
  font-weight: 500;
}
.stickers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (min-width: 576px) {
  .stickers-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
}
@media (min-width: 768px) {
  .stickers-grid { grid-template-columns: repeat(6, 1fr); gap: 1.5rem; }
}
.sticker-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 0.5rem;
  text-align: center;
  border: 1px solid rgba(184,134,11,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sticker-card:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.sticker-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
}
.sticker-card .sticker-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}
.sticker-card .sticker-count {
  font-size: 0.7rem;
  color: #c9a84c;
  font-weight: 500;
}

/* ── TOOLS PREVIEW ── */
.tools-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.06) 0%, rgba(255,255,255,0.3) 50%, rgba(201,168,76,0.06) 100%);
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 576px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .tools-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
}
.tool-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(184,134,11,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}
.tool-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.4rem;
}
.tool-card p {
  font-size: 0.8rem;
  color: #777;
  line-height: 1.6;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid rgba(201,168,76,0.25);
  background: linear-gradient(to left, #fffdf8 0%, #f9eed5 100%);
  padding-top: 4rem;
  padding-bottom: 2rem;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}
.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
}
.footer-brand-row img {
  width: 34px; height: 34px;
  border-radius: 8px;
}
.footer-brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: #1a1a1a;
}
.footer-tagline {
  font-size: 0.875rem;
  color: #7a6a40;
  line-height: 1.75;
  max-width: 220px;
}
.footer-col h4 {
  font-weight: 700;
  font-size: 0.95rem;
  color: #3d2f0f;
  margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.85rem; }
.footer-col a {
  font-weight: 400;
  font-size: 0.875rem;
  color: #7a6a40;
  text-decoration: none;
  transition: color 0.3s ease, padding-right 0.3s ease;
  display: inline-block;
}
.footer-col a:hover { 
  color: #b8860b;
  padding-right: 0.5rem;
}
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(184,134,11,0.3);
  gap: 1rem;
}
.footer-copy {
  font-size: 0.8rem;
  color: #7a6a40;
}
.social-links { display: flex; gap: 0.75rem; }
.social-links a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(184,134,11,0.12);
  border: 1px solid rgba(184,134,11,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a6d20;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.social-links a:hover {
  background: #b8860b;
  color: #fff;
  border-color: #b8860b;
  transform: translateY(-3px);
}
.social-links svg {
  width: 16px;
  height: 16px;
}

/* ── Page Content (for sub-pages) ── */
.page-content {
  padding-top: 7rem;
  padding-bottom: 4rem;
  min-height: calc(100vh - 80px - 200px);
}
@media (min-width: 768px) {
  .page-content { padding-top: 9rem; padding-bottom: 6rem; }
}
.page-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #111;
  margin-bottom: 1rem;
  white-space: normal;
}
.page-desc {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ── Sub-page Template Cards ── */
.template-card, .topic-card, .feature-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(184,134,11,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.template-card:hover, .topic-card:hover, .feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.template-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}
.template-card h3, .topic-card h3, .feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #1a1a1a;
  padding: 0 1rem;
}
.template-card p, .topic-card p, .feature-card p {
  font-size: 0.85rem;
  color: #777;
  padding: 0 1rem 1rem;
}
.template-card .card-tags {
  display: flex;
  gap: 0.4rem;
  padding: 0 1rem 1rem;
  flex-wrap: wrap;
}
.template-card .card-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(201,168,76,0.1);
  color: #a87c20;
  font-weight: 500;
}
.template-preview {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #f9eed5 0%, #fffdf8 100%);
  border-radius: 0;
  margin-bottom: 0;
}
.templates-grid, .help-topics, .community-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* ── Help Topics Cards (lists inside topic-card) ── */
.topic-card {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
}
.topic-card h3 {
  padding: 0 0 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid rgba(201, 168, 76, 0.2);
  font-size: 1.05rem;
  font-weight: 700;
  color: #a87c20;
}
.topic-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.topic-card li {
  padding: 0;
}
.topic-card li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: #444;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1.4;
}
.topic-card li a::before {
  content: '◆';
  color: #c9a84c;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.topic-card li a:hover {
  background: rgba(201, 168, 76, 0.08);
  color: #a87c20;
  transform: translateX(-3px);
}
.topic-card li a:hover::before {
  color: #a87c20;
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-content: flex-start;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 1rem;
  padding: 0.6rem;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.04), rgba(168, 124, 32, 0.02));
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 168, 76, 0.4) transparent;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
/* scroll-mode: تفعيل صريح للسكرول العمودي (يُستخدم في صفحة القوالب) */
.filter-bar.scroll-mode {
  max-height: 220px;
  overflow-y: auto;
  flex-wrap: wrap;
  align-content: flex-start;
}
.filter-bar::-webkit-scrollbar {
  width: 8px;
}
.filter-bar::-webkit-scrollbar-track {
  background: rgba(201, 168, 76, 0.05);
  border-radius: 4px;
}
.filter-bar::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.35);
  border-radius: 4px;
}
.filter-bar::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 168, 76, 0.55);
}

/* أداة البحث في التصنيفات */
.cat-search-wrapper {
  position: relative;
  margin: 1rem 0 0.75rem;
  width: 100%;
  max-width: 480px;
}
.cat-search-input {
  width: 100%;
  padding: 0.75rem 2.75rem 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  border: 1.5px solid rgba(201, 168, 76, 0.3);
  border-radius: 12px;
  color: #2a2a2a;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.cat-search-input:focus {
  outline: none;
  border-color: #c9a84c;
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12);
}
.cat-search-input::placeholder {
  color: #999;
}
.cat-search-clear {
  position: absolute;
  inset-inline-end: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 124, 32, 0.1);
  border: none;
  border-radius: 50%;
  color: #a87c20;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}
.cat-search-clear:hover {
  background: rgba(168, 124, 32, 0.2);
  transform: translateY(-50%) scale(1.1);
}

/* صف معلومات الفلترة (عدّاد التصنيفات + عدّاد القوالب) */
.filter-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filter-counter {
  font-size: 0.85rem;
  color: #7a6a40;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  background: rgba(201, 168, 76, 0.1);
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(201, 168, 76, 0.15);
}
.filter-counter.tpl-count {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.18), rgba(168, 124, 32, 0.12));
  color: #8a6a20;
}
.filter-separator {
  color: rgba(122, 106, 64, 0.4);
  font-weight: 700;
}

/* أزرار التصنيف */
.filter-btn {
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid rgba(184, 134, 11, 0.2);
  background: #fff;
  color: #5a4a20;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  --cat-color: #c9a84c;
  position: relative;
  user-select: none;
}
/* أيقونة التصنيف داخل الزر */
.filter-btn-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(201, 168, 76, 0.08);
}
.filter-btn:has(.filter-btn-icon) {
  padding-inline-start: 0.5rem;
}
/* عدّاد صغير داخل الزر - أخف وأخفي */
.filter-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(201, 168, 76, 0.15);
  color: #8a6a20;
  border-radius: 999px;
  margin-inline-start: 0.15rem;
  transition: all 0.2s ease;
  font-family: 'Cairo', sans-serif;
  letter-spacing: 0;
}
.filter-btn::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cat-color);
  opacity: 0.65;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.filter-btn:has(.filter-btn-icon)::before {
  display: none;
}
.filter-btn:hover {
  border-color: var(--cat-color);
  color: #5a4a20;
  background: #fffdf5;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(201, 168, 76, 0.12);
}
.filter-btn:hover::before {
  opacity: 1;
  transform: scale(1.15);
}
.filter-btn:hover .filter-btn-count {
  background: rgba(201, 168, 76, 0.3);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--cat-color), color-mix(in srgb, var(--cat-color) 70%, #8a6a20));
  color: #fff;
  border-color: var(--cat-color);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--cat-color) 30%, transparent);
  font-weight: 700;
}
.filter-btn.active::before {
  background: #fff;
  opacity: 1;
}
.filter-btn.active .filter-btn-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.filter-btn.active .filter-btn-icon {
  background: rgba(255, 255, 255, 0.15);
}
/* زر "الكل" - لون ذهبي افتراضي */
.filter-btn[data-filter="all"] {
  --cat-color: #c9a84c;
  background: linear-gradient(135deg, #c9a84c, #a87c20);
  color: #fff;
  border-color: #c9a84c;
  font-weight: 700;
}
.filter-btn[data-filter="all"]::before {
  background: #fff;
}
.filter-btn[data-filter="all"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.4);
  background: linear-gradient(135deg, #d4b45e, #b88c30);
}
.filter-btn[data-filter="all"] .filter-btn-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ── شارة التصنيف النشط ── */
.active-cat-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem 0.6rem 0.6rem;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(168, 124, 32, 0.04));
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 12px;
  font-size: 0.85rem;
  animation: badgeSlideIn 0.3s ease;
}
@keyframes badgeSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.active-cat-badge .badge-label {
  color: #7a6a40;
  font-weight: 500;
}
.active-cat-badge .badge-name {
  font-weight: 700;
  color: var(--cat-color, #a87c20);
  padding: 0.25rem 0.7rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--cat-color, #a87c20) 35%, transparent);
}
.active-cat-badge .badge-clear {
  margin-inline-start: auto;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(168, 124, 32, 0.12);
  color: #a87c20;
  font-size: 1rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.active-cat-badge .badge-clear:hover {
  background: #a87c20;
  color: #fff;
  transform: rotate(90deg);
}

/* Plus badge على البطاقات */
.plus-badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  background: linear-gradient(135deg, #b8860b, #8a6a20);
  color: #fff;
  font-size: 0.65rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(184, 134, 11, 0.3);
  z-index: 2;
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
  .filter-bar {
    padding: 0.5rem;
    gap: 0.4rem;
  }
  .filter-bar.scroll-mode {
    max-height: none;
  }
  .filter-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
  }
  .filter-btn-icon {
    width: 16px;
    height: 16px;
  }
  .filter-btn-count {
    min-width: 18px;
    height: 17px;
    font-size: 0.65rem;
    padding: 0 5px;
  }
  .filter-info {
    gap: 0.4rem;
    margin-bottom: 1rem;
  }
  .filter-counter {
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
  }
  .active-cat-badge {
    padding: 0.5rem 0.7rem 0.5rem 0.5rem;
    font-size: 0.78rem;
  }
  .active-cat-badge .badge-clear {
    width: 22px;
    height: 22px;
  }
}

/* استجابة للشاشات الصغيرة جداً */
@media (max-width: 480px) {
  .filter-bar {
    padding: 0.4rem;
    gap: 0.3rem;
    border-radius: 12px;
  }
  .filter-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
  }
  .filter-btn-icon {
    width: 14px;
    height: 14px;
  }
  .filter-btn::before {
    width: 6px;
    height: 6px;
  }
  .cat-search-input {
    font-size: 0.85rem;
    padding: 0.65rem 2.5rem 0.65rem 0.85rem;
  }
}

/* ⚡ تحسين الـ scroll-mode للتعامل مع عدد كبير من الأزرار */
.filter-bar.scroll-mode {
  /* نُبقي السكرول العمودي حتى مع عدد كبير من الأزرار */
  max-height: 220px;
  overflow-y: auto;
  flex-wrap: wrap;
  align-content: flex-start;
}
.filter-bar.scroll-mode .filter-btn {
  /* الأزرار تأخذ حجمها الطبيعي (لا يتمدد كل زر) */
  width: auto;
  flex: 0 0 auto;
}
@media (max-width: 768px) {
  .filter-bar.scroll-mode {
    max-height: 180px;
  }
}

/* ── Font Category Cards ── */
.font-cat-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(184,134,11,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.font-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.font-cat-card .font-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
  color: #fff;
}
.font-cat-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}
.font-cat-card .font-count {
  font-size: 0.8rem;
  color: #999;
}
.font-cat-card .font-sample {
  font-size: 1.4rem;
  color: #c9a84c;
  margin: 0.75rem 0 0;
  min-height: 40px;
}

.faq-item, .policy-content {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(184,134,11,0.15);
}
.faq-item h3, .policy-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
}
.faq-item p, .policy-content p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.8;
}

.contact-form {
  max-width: 500px;
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(184,134,11,0.2);
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #333;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: #b8860b;
}
.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* Contact Page */
.contact-wrapper {
  display: flex;
  justify-content: center;
}
.contact-form {
  width: 100%;
  max-width: 500px;
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(184,134,11,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* ── Count Up Animation ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-number.counting {
  animation: countUp 0.5s ease-out;
}

@media (max-width: 767px) {
  h1  { white-space: normal; font-size: 2.2rem; }
  .qr-card img { width: 180px; height: 180px; }
  .phone-wrap img { max-width: 360px; }
  .section-header h2 { font-size: 1.6rem; }
}

/* ── API-powered thumbnail grid ── */
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}
@media (min-width: 576px) {
  .api-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

.api-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(184,134,11,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.api-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.api-card-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #f9eed5, #fffdf8);
}
.api-card-thumb.square {
  aspect-ratio: 1/1;
}
.api-card-body {
  padding: 0.75rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.api-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.4rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.api-card-link {
  font-size: 0.75rem;
  color: #b8860b;
  text-decoration: none;
  font-weight: 600;
  margin-top: auto;
  padding-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}
.api-card-link:hover {
  color: #8a6d20;
  text-decoration: underline;
}

/* Section title for sticker/bg/font categories */
.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(201,168,76,0.2);
}
.section-title-bar h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
}
.section-title-bar .count-badge {
  background: rgba(201,168,76,0.15);
  color: #a87c20;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Loading spinner */
.loading-spinner {
  text-align: center;
  padding: 3rem;
  color: #999;
  font-size: 1rem;
}
.loading-spinner::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(201,168,76,0.3);
  border-top-color: #c9a84c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Load more button */
.load-more-btn {
  display: block;
  margin: 2rem auto;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  background: #fff;
  color: #b8860b;
  border: 2px solid #c9a84c;
  cursor: pointer;
  transition: all 0.3s ease;
}
.load-more-btn:hover {
  background: linear-gradient(135deg, #c9a84c, #a87c20);
  color: #fff;
  border-color: #c9a84c;
  transform: translateY(-2px);
}

/* Category icon image */
.category-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a1a1a;
  margin: 5px 0;
  transition: 0.3s;
}
@media (max-width: 767px) {
  .nav-toggle { display: block; }
  nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(201,168,76,0.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  nav.open { display: flex; }
}

/* ── زر تسجيل الخروج ── */
.auth-logout-btn {
  background: linear-gradient(135deg, #c9a84c, #a87c20);
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 10px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(168, 124, 32, 0.25);
  margin-right: 0.5rem;
  white-space: nowrap;
}
.auth-logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(168, 124, 32, 0.35);
}
.auth-logout-btn:active { transform: translateY(0); }

@media (max-width: 767px) {
  .auth-logout-btn {
    margin-right: 0;
    margin-top: 0.5rem;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }
}

/* ───────────────────────────────────────────────────────────
   شريط الفلترة للإطارات والخلفيات (filter-bar مع search-box)
   هذا النمط مخصص للأشرطة التي تحتوي على search-box + filter-tabs
   ─────────────────────────────────────────────────────────── */
.filter-bar.has-search {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.06), rgba(168, 124, 32, 0.04));
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 16px;
}
.search-box {
  position: relative;
  width: 100%;
}
.search-box input {
  width: 100%;
  padding: 0.85rem 2.75rem 0.85rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  border: 1.5px solid rgba(201, 168, 76, 0.3);
  border-radius: 12px;
  color: #2a2a2a;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.search-box input:focus {
  outline: none;
  border-color: #c9a84c;
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12);
}
.search-box input::placeholder {
  color: #999;
}
.search-clear {
  position: absolute;
  inset-inline-end: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(168, 124, 32, 0.1);
  border: none;
  border-radius: 50%;
  color: #a87c20;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}
.search-clear:hover {
  background: rgba(168, 124, 32, 0.2);
  transform: translateY(-50%) scale(1.1);
}
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-tab {
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  border: 1.5px solid rgba(201, 168, 76, 0.25);
  border-radius: 999px;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.filter-tab:hover {
  border-color: #c9a84c;
  color: #a87c20;
  transform: translateY(-1px);
}
.filter-tab.active {
  background: linear-gradient(135deg, #c9a84c, #a87c20);
  border-color: #a87c20;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(168, 124, 32, 0.3);
}
.results-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.825rem;
  color: #888;
  padding: 0.5rem 0 1rem;
  border-bottom: 1px dashed rgba(201, 168, 76, 0.2);
  margin-bottom: 1rem;
}
.results-bar span {
  font-weight: 600;
  color: #a87c20;
}
@media (max-width: 576px) {
  .filter-bar.has-search {
    padding: 0.85rem;
    margin: 1rem 0;
  }
  .filter-tab {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   🌙 الوضع المظلم + نظام اللغة
   ═══════════════════════════════════════════════════════════ */

/* ── أزرار التبديل في الـ header ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: 0.5rem;
}
.theme-toggle-btn,
.lang-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 168, 76, 0.3);
  background: rgba(255, 255, 255, 0.7);
  color: #a87c20;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  font-family: 'Cairo', sans-serif;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
  flex-shrink: 0;
}
.theme-toggle-btn:hover,
.lang-toggle-btn:hover {
  background: linear-gradient(135deg, #c9a84c, #a87c20);
  color: #fff;
  border-color: #a87c20;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(168, 124, 32, 0.3);
}
.theme-toggle-btn:active,
.lang-toggle-btn:active {
  transform: translateY(0);
}

/* تكييف الـ header لاستيعاب الأزرار */
.header-inner {
  gap: 1rem;
}
.header-inner nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
@media (max-width: 768px) {
  .theme-toggle-btn,
  .lang-toggle-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .header-actions {
    gap: 0.35rem;
    margin-inline-start: 0.25rem;
  }
}

/* ── متغيرات الوضع المظلم ── */
[data-theme="dark"] {
  --bg-primary: #0f0f12;
  --bg-secondary: #1a1a1f;
  --bg-card: #1f1f25;
  --text-primary: #f5f5f5;
  --text-secondary: #b8b8bd;
  --border-color: rgba(201, 168, 76, 0.25);
  --gold-soft: rgba(201, 168, 76, 0.15);
}

[data-theme="dark"] body {
  background: linear-gradient(to left, #0f0f12 0%, #15151a 55%, #1a1a20 100%);
  color: #f5f5f5;
}

[data-theme="dark"] header {
  background: linear-gradient(to left, rgba(15,15,18,0.85) 0%, rgba(26,26,32,0.85) 100%);
  border-bottom: 1px solid rgba(201, 168, 76, 0.25);
}

[data-theme="dark"] .nav-toggle span {
  background: #f5f5f5;
}

[data-theme="dark"] .brand-name {
  color: #f5f5f5;
}

[data-theme="dark"] header nav a {
  color: #e8e8e8;
}
[data-theme="dark"] header nav a:hover,
[data-theme="dark"] header nav a.active {
  color: #c9a84c;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: #f5f5f5;
}

[data-theme="dark"] .page-desc,
[data-theme="dark"] p {
  color: #b8b8bd;
}

[data-theme="dark"] .api-card {
  background: #1f1f25;
  border: 1px solid rgba(201, 168, 76, 0.15);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
[data-theme="dark"] .api-card:hover {
  border-color: rgba(201, 168, 76, 0.5);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.15);
}

[data-theme="dark"] .api-card-title {
  color: #f5f5f5;
}

[data-theme="dark"] .api-card-link {
  color: #c9a84c;
}

[data-theme="dark"] .filter-bar {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(168, 124, 32, 0.04));
  border: 1px solid rgba(201, 168, 76, 0.25);
}

[data-theme="dark"] .filter-btn {
  background: #1f1f25;
  color: #d8d8dd;
  border-color: rgba(201, 168, 76, 0.25);
}
[data-theme="dark"] .filter-btn:hover {
  background: #25252c;
  border-color: #c9a84c;
  color: #fff;
}
[data-theme="dark"] .filter-btn.active {
  background: linear-gradient(135deg, #c9a84c, #a87c20);
  color: #fff;
}

[data-theme="dark"] .cat-search-input {
  background: #1f1f25;
  color: #f5f5f5;
  border-color: rgba(201, 168, 76, 0.3);
}
[data-theme="dark"] .cat-search-input:focus {
  border-color: #c9a84c;
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.15);
}
[data-theme="dark"] .cat-search-input::placeholder {
  color: #777;
}

[data-theme="dark"] .filter-counter {
  background: rgba(201, 168, 76, 0.1);
  color: #c9a84c;
  border: 1px solid rgba(201, 168, 76, 0.2);
}
[data-theme="dark"] .tpl-count {
  background: rgba(168, 124, 32, 0.15);
  color: #d4a849;
}

[data-theme="dark"] .loading-spinner {
  color: #c9a84c;
}

[data-theme="dark"] .load-more-btn {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), rgba(168, 124, 32, 0.08));
  color: #d4a849;
  border-color: rgba(201, 168, 76, 0.5);
}
[data-theme="dark"] .load-more-btn:hover {
  background: linear-gradient(135deg, #c9a84c, #a87c20);
  color: #fff;
  border-color: #a87c20;
}

[data-theme="dark"] footer {
  background: linear-gradient(to left, #0a0a0d 0%, #15151a 100%);
  border-top: 1px solid rgba(201, 168, 76, 0.2);
}
[data-theme="dark"] .footer-brand-name,
[data-theme="dark"] footer h4 {
  color: #f5f5f5;
}
[data-theme="dark"] footer a {
  color: #b8b8bd;
}
[data-theme="dark"] footer a:hover {
  color: #c9a84c;
}
[data-theme="dark"] .footer-tagline,
[data-theme="dark"] .footer-copy {
  color: #888;
}
[data-theme="dark"] .footer-bar {
  border-top: 1px solid rgba(201, 168, 76, 0.15);
}
[data-theme="dark"] .social-links a {
  color: #b8b8bd;
}
[data-theme="dark"] .social-links a:hover {
  color: #c9a84c;
}

[data-theme="dark"] .section-title-bar {
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}
[data-theme="dark"] .section-title-bar h3 {
  color: #f5f5f5;
}
[data-theme="dark"] .count-badge {
  background: rgba(201, 168, 76, 0.2);
  color: #d4a849;
}

[data-theme="dark"] .results-bar span {
  color: #c9a84c;
}

[data-theme="dark"] .active-cat-badge {
  background: rgba(201, 168, 76, 0.12);
  border-color: rgba(201, 168, 76, 0.3);
  color: #f5f5f5;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #1a1a1f;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c9a84c, #a87c20);
  border-color: #1a1a1f;
}
[data-theme="dark"] * {
  scrollbar-color: #c9a84c #1a1a1f;
}

/* ── وضع اللغة الإنجليزية (LTR) ── */
[data-lang="en"] body {
  font-family: 'Inter', 'Cairo', sans-serif;
  direction: ltr;
}
[data-lang="en"] .header-inner {
  flex-direction: row;
}
[data-lang="en"] header nav {
  direction: ltr;
}

/* عند الإنجليزية في الوضع المظلم */
[data-theme="dark"][data-lang="en"] body {
  background: linear-gradient(to right, #0f0f12 0%, #15151a 55%, #1a1a20 100%);
}
