/* ══════════════════════════════════════
   Main Styles
══════════════════════════════════════ */

@font-face {
  font-family: "DTHULUTH";
  src: url("../fonts/DTHULUTH-II-1.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  --gold: #c9a84c;
  --gold2: #e8c96a;
  --gold-dark: #8b6914;
  --gold-dim: rgba(201, 168, 76, 0.15);
  --bg: #080604;
  --bg2: #0f0c08;
  --bg3: #161209;
  --text: #f0e6cc;
  --text-dim: rgba(240, 230, 204, 0.45);
  --border: rgba(201, 168, 76, 0.14);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}
body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", "Noto Naskh Arabic", serif;
  overflow-x: hidden;
}

/* ── خلفية هندسية ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(
      ellipse 80% 60% at 50% -10%,
      rgba(201, 168, 76, 0.07) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 40% 40% at 90% 90%,
      rgba(201, 168, 76, 0.04) 0%,
      transparent 60%
    );
  pointer-events: none;
  z-index: 0;
}

/* نقاط هندسية في الخلفية */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(201, 168, 76, 0.08) 1px,
    transparent 1px
  );
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(
    ellipse 70% 70% at 50% 50%,
    black 30%,
    transparent 100%
  );
}

/* ── Navbar ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(8, 6, 4, 0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-logo img,
.nav-logo svg {
  height: 38px;
  width: auto;
  filter: brightness(1.1);
}

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  text-align: center;
}

.hero-title {
  font-family: "Noto Naskh Arabic", serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 16px;
  animation: fadeDown 0.8s 0.1s ease both;
}

.hero-title span {
  background: linear-gradient(
    135deg,
    var(--gold2),
    var(--gold),
    var(--gold-dark)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-dim);
  max-width: 420px;
  line-height: 1.9;
  margin-bottom: 56px;
  animation: fadeDown 0.8s 0.2s ease both;
}

/* ── الفاصل الذهبي ── */
.gold-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 56px;
  animation: fadeDown 0.8s 0.25s ease both;
}

/* ── بطاقات الأدوات ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  animation: fadeUp 0.9s 0.3s ease both;
  position: relative;
}

/* خط ذهبي فاصل بين البطاقتين */
.tools-grid::after {
  content: "";
  position: absolute;
  top: 10%;
  bottom: 10%;
  right: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0.3;
  pointer-events: none;
}

.tool-card {
  background: var(--bg2);
  padding: 52px 44px 44px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.35s;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* تأثير ضوء عند hover */
.tool-card::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(201, 168, 76, 0.12) 0%,
    transparent 70%
  );
  opacity: 0;
  transition:
    opacity 0.4s,
    transform 0.4s;
  pointer-events: none;
  border-radius: 50%;
}
.tool-card:hover {
  background: rgba(201, 168, 76, 0.03);
}
.tool-card:hover::before {
  opacity: 1;
  transform: scale(1.2);
}

/* رقم الأداة */
.tool-num {
  font-family: "Traditional Naskh", "Noto Naskh Arabic", serif;
  font-size: 20px;
  font-weight: 400;
  color: rgba(201, 168, 76, 0.5);
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}

/* أيقونة */
.tool-icon {
  width: 52px;
  height: 52px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 28px;
  border-radius: 12px;
  background: rgba(201, 168, 76, 0.05);
  transition:
    border-color 0.3s,
    background 0.3s;
}
.tool-card:hover .tool-icon {
  border-color: rgba(201, 168, 76, 0.4);
  background: rgba(201, 168, 76, 0.1);
}

.tool-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.4;
  font-family: "Noto Naskh Arabic", serif;
}

.tool-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.9;
  flex: 1;
  margin-bottom: 36px;
}

/* زر الدخول */
.tool-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.5px;
  transition:
    gap 0.25s,
    color 0.25s;
}
.tool-cta .arrow {
  font-size: 16px;
  transition: transform 0.25s;
  display: inline-block;
}
.tool-card:hover .tool-cta {
  color: var(--gold2);
  gap: 14px;
}
.tool-card:hover .tool-cta .arrow {
  transform: translate(-3px, -3px);
}

/* شريط ذهبي علوي للبطاقة */
.tool-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}
.tool-card:hover::after {
  opacity: 1;
}


/* ── Back button ── */
.btn-back {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.88rem;
  font-family: Tajawal, sans-serif;
  cursor: pointer;
  padding: 0.5rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 10px;
  transition:
    color 0.2s,
    background 0.2s;
  line-height: 1;
}
.btn-back::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
  flex-shrink: 0;
}
.btn-back:hover {
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Scrollbar ── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 168, 76, 0.35) transparent;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.3);
  border-radius: 100px;
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 168, 76, 0.65);
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* ── Animations ── */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  nav {
    padding: 0 20px;
  }
  .tools-grid {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }
  .tools-grid::after {
    display: none;
  }
  .tool-card {
    padding: 36px 28px 32px;
  }
  .hero-title {
    font-size: 2rem;
  }
}

/* ══════════════════════════════════════
   Occasion Page Styles
══════════════════════════════════════ */

.occ-step {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-direction: column;
}
.occ-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.3s;
}
.occ-step.active .occ-step-num {
  border-color: rgba(201, 168, 76, 0.8);
  color: rgba(201, 168, 76, 0.9);
  background: rgba(201, 168, 76, 0.1);
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.2);
}
.occ-step.done .occ-step-num {
  background: rgba(201, 168, 76, 0.9);
  color: #0a0806;
  border-color: transparent;
}
.occ-step-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}
.occ-step.active .occ-step-label {
  color: rgba(201, 168, 76, 0.8);
}
.occ-step-line {
  flex: 1;
  height: 1px;
  background: rgba(201, 168, 76, 0.12);
  min-width: 30px;
}

.occ-section {
  display: none;
  animation: occFade 0.3s ease;
}
.occ-section.active {
  display: block;
}
@keyframes occFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.occ-sec-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(201, 168, 76, 0.9);
  margin-bottom: 5px;
}
.occ-sec-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 22px;
}

.occ-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 14px;
  padding: 22px 16px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
}
.occ-card:hover {
  border-color: rgba(201, 168, 76, 0.4);
  background: rgba(201, 168, 76, 0.05);
  transform: translateY(-2px);
}
.occ-card.selected {
  border-color: rgba(201, 168, 76, 0.85);
  background: rgba(201, 168, 76, 0.08);
  box-shadow: 0 0 18px rgba(201, 168, 76, 0.15);
}
.occ-card-icon {
  font-size: 34px;
  margin-bottom: 10px;
  display: block;
}
.occ-card-name {
  font-size: 15px;
  font-weight: 600;
}
.occ-card-en {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 3px;
  letter-spacing: 1px;
}

.occ-tpl {
  border-radius: 12px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.04);
}
.occ-tpl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.occ-tpl:hover {
  border-color: rgba(201, 168, 76, 0.4);
}
.occ-tpl:hover img {
  transform: scale(1.04);
}
.occ-tpl.selected {
  border-color: rgba(201, 168, 76, 0.9);
  box-shadow:
    0 0 0 1px rgba(201, 168, 76, 0.5),
    0 4px 20px rgba(201, 168, 76, 0.25);
}
.occ-tpl-check {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.9);
  color: #0a0806;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
}
.occ-tpl.selected .occ-tpl-check {
  display: flex;
}
.occ-tpl-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 8px 6px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
}

.occ-btn {
  flex: 1;
  min-width: 120px;
  padding: 13px 20px;
  border-radius: 10px;
  font-family: Tajawal, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.occ-btn-pri {
  background: linear-gradient(
    135deg,
    rgba(201, 168, 76, 0.9),
    rgba(140, 105, 25, 0.9)
  );
  color: #0a0806;
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.3);
}
.occ-btn-pri:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.occ-btn-pri:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
.occ-btn-sec {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.occ-btn-sec:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}
.occ-btn-dl {
  background: rgba(201, 168, 76, 0.08);
  color: rgba(201, 168, 76, 0.9);
  border: 1px solid rgba(201, 168, 76, 0.4);
  box-shadow: 0 0 14px rgba(201, 168, 76, 0.12);
}
.occ-btn-dl:hover {
  background: rgba(201, 168, 76, 0.14);
  box-shadow: 0 0 22px rgba(201, 168, 76, 0.22);
}
.occ-card-disabled {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  cursor: not-allowed !important;
  position: relative;
}
.occ-soon-badge {
  margin-top: 10px;
  display: inline-block;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 11px;
  background: rgba(201, 168, 76, 0.12);
  color: rgba(201, 168, 76, 0.7);
  border: 1px solid rgba(201, 168, 76, 0.2);
  letter-spacing: 1px;
}
#occ-name-input:focus {
  border-color: rgba(201, 168, 76, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}
