@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,500&family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  --gold: #b08d3b;
  --gold-light: #d1b266;
  --gold-dark: #8c6d27;
  --black: #111111;
  --dark: #1a1a1a;
  --charcoal: #262626;
  --ivory: #faf8f5;
  --white: #ffffff;
  --gray: #6b6e72;
  --border: rgba(176, 141, 59, 0.22);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.16);
  --radius: 14px;
  --transition: all 0.32s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--ivory);
  color: var(--black);
  line-height: 1.7;
  direction: rtl;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

.container { width: 92%; max-width: 1240px; margin: 0 auto; }

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-logo img { height: 48px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-weight: 500;
  font-size: 1rem;
  color: var(--dark);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--black);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  box-shadow: 0 8px 22px rgba(176, 141, 59, 0.28);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(176, 141, 59, 0.42);
}
.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--white); }
.btn-dark {
  background: var(--black);
  color: var(--white);
}
.btn-dark:hover { background: var(--gold); }
.btn-sm { padding: 8px 18px; font-size: 0.88rem; }

/* Hero */
.hero {
  position: relative;
  background: radial-gradient(circle at 20% 20%, #241e14 0%, #111111 65%);
  color: var(--white);
  padding: 90px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(176, 141, 59, 0.22);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid rgba(176, 141, 59, 0.5);
  border-radius: 50px;
  color: var(--gold-light);
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  margin-bottom: 22px;
  background: rgba(176, 141, 59, 0.08);
}
.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  line-height: 1.28;
  font-weight: 800;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--gold-light); }
.hero p {
  font-size: 1.12rem;
  color: #d4d4d4;
  max-width: 590px;
  margin-bottom: 32px;
}
.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 42px; }
.hero-stats {
  display: flex;
  gap: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 26px;
}
.stat-item strong {
  display: block;
  font-size: 1.7rem;
  color: var(--gold-light);
  line-height: 1.2;
}
.stat-item span { font-size: 0.9rem; color: #b5b5b5; }

.hero-showcase {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-card-frame {
  width: 310px;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid rgba(176, 141, 59, 0.55);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  transform: rotate(-2deg);
  transition: var(--transition);
  background: #1a1a1a;
}
.hero-card-frame:hover { transform: rotate(0deg) scale(1.02); }

/* Section Headers */
.section { padding: 84px 0; }
.section-dark { background: var(--black); color: var(--white); }
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 52px;
}
.section-tag {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 8px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.section-head p { color: var(--gray); font-size: 1.05rem; }
.section-dark .section-head p { color: #b8b8b8; }
.gold-divider {
  width: 68px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto 0;
}

/* Slideshow Gallery */
.slideshow-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: var(--black);
}
.slideshow-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  min-height: 340px;
  max-height: 540px;
  overflow: hidden;
}
.slide-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 0.8s ease;
  pointer-events: none;
}
.slide-item.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.88) 0%, rgba(10, 10, 10, 0.28) 55%, rgba(10, 10, 10, 0.15) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 42px 48px;
  color: var(--white);
}
.slide-cat {
  align-self: flex-start;
  background: var(--gold);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.slide-overlay h3 { font-size: clamp(1.4rem, 2.6vw, 2.2rem); margin-bottom: 8px; }
.slide-overlay p { color: #e2e2e2; max-width: 650px; font-size: 1.02rem; }

.slide-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.72);
  border: 1px solid rgba(176, 141, 59, 0.6);
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-nav-btn:hover { background: var(--gold); }
.slide-prev { right: 20px; }
.slide-next { left: 20px; }

.slide-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #141414;
  border-top: 1px solid rgba(176, 141, 59, 0.2);
}
.slide-dots { display: flex; gap: 8px; }
.slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.slide-dot.active { width: 30px; border-radius: 10px; background: var(--gold); }
.slide-autoplay-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  cursor: pointer;
}
.slide-autoplay-btn:hover { border-color: var(--gold); color: var(--gold-light); }

/* Templates Filter & Grid */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 38px;
}
.filter-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-btn {
  padding: 9px 22px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--dark);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.search-box {
  position: relative;
  min-width: 260px;
}
.search-box input {
  width: 100%;
  padding: 10px 18px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--white);
  outline: none;
  font-size: 0.95rem;
}
.search-box input:focus { border-color: var(--gold); }

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 28px;
}
.template-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.template-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}
.tpl-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #141414;
}
.tpl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.template-card:hover .tpl-thumb img { transform: scale(1.05); }
.tpl-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(17, 17, 17, 0.85);
  color: var(--gold-light);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(176, 141, 59, 0.45);
}
.tpl-price {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: var(--gold);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 700;
}
.tpl-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tpl-body h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--black); }
.tpl-body p { font-size: 0.94rem; color: var(--gray); margin-bottom: 18px; flex: 1; }
.tpl-actions { display: flex; gap: 10px; }
.tpl-actions .btn { flex: 1; padding: 9px 12px; font-size: 0.88rem; }

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(176, 141, 59, 0.25);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--gold);
  background: rgba(176, 141, 59, 0.08);
  transform: translateY(-4px);
}
.feature-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(176, 141, 59, 0.16);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 18px;
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--white); }
.feature-card p { font-size: 0.94rem; color: #bdbdbd; }

/* CTA Banner */
.cta-box {
  background: linear-gradient(135deg, #161616, #261e12);
  border: 1px solid rgba(176, 141, 59, 0.45);
  border-radius: 22px;
  padding: 56px 40px;
  text-align: center;
  color: var(--white);
}
.cta-box h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 14px; }
.cta-box p { color: #d0d0d0; max-width: 600px; margin: 0 auto 28px; }

/* Contact Page */
.page-hero {
  background: linear-gradient(135deg, #111111, #221b11);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
  border-bottom: 2px solid var(--gold);
}
.page-hero h1 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin-bottom: 10px; }
.page-hero p { color: #cccccc; max-width: 600px; margin: 0 auto; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 36px;
  align-items: start;
}
.contact-info-card, .contact-form-card {
  background: var(--white);
  border-radius: 18px;
  padding: 36px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.contact-info-card {
  background: var(--black);
  color: var(--white);
}
.contact-info-card h3 { color: var(--gold-light); font-size: 1.35rem; margin-bottom: 14px; }
.info-list { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.info-list li { display: flex; align-items: flex-start; gap: 14px; }
.info-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(176, 141, 59, 0.16);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.info-list strong { display: block; font-size: 0.92rem; color: var(--gold-light); }
.info-list span { color: #d8d8d8; font-size: 0.98rem; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-weight: 600; font-size: 0.94rem; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea {
  padding: 12px 15px;
  border: 1px solid #d9d4c7;
  border-radius: 10px;
  background: #fdfcfa;
  font-size: 0.98rem;
  outline: none;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(176, 141, 59, 0.12);
}
.alert-box {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 600;
  display: none;
}
.alert-success { background: #e8f6ee; color: #166534; border: 1px solid #bbf7d0; display: block; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; display: block; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: var(--white);
  border-radius: 18px;
  max-width: 860px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  border: 1px solid var(--gold);
}
.modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(17, 17, 17, 0.8);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 5;
}
.modal-media { background: #121212; display: flex; align-items: center; justify-content: center; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-details { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.modal-details h3 { font-size: 1.6rem; margin: 10px 0; }
.modal-price { font-size: 1.35rem; color: var(--gold-dark); font-weight: 800; margin-bottom: 14px; }
.modal-features { list-style: none; margin: 16px 0 24px; display: flex; flex-direction: column; gap: 8px; }
.modal-features li::before { content: '✦ '; color: var(--gold); font-weight: bold; }

/* Footer */
.footer {
  background: #0d0d0d;
  color: #cccccc;
  padding: 60px 0 28px;
  border-top: 2px solid var(--gold);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo img { height: 48px; margin-bottom: 16px; }
.footer h4 { color: var(--gold-light); margin-bottom: 16px; font-size: 1.1rem; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: #8f8f8f;
}

@media (max-width: 920px) {
  .hero-grid, .contact-grid, .modal-card, .footer-grid { grid-template-columns: 1fr; }
  .hero-showcase { order: -1; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .slide-overlay { padding: 24px; }
}
