/* ====== FONTS (Sodfa) ====== */
/* حط ملفات الخط داخل مجلد fonts (مثلاً Sodfa.woff2 + Sodfa.otf) */
@font-face {
  font-family: "Sodfa";
  src: url("../fonts/Sodfa.woff2") format("woff2"),
       url("../fonts/Sodfa.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ====== RESET & VARIABLES ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-main: #050816;
  --bg-elevated: #0b1020;
  --bg-soft: #0f172a;
  --accent: #f5c859;
  --accent-soft: rgba(245, 200, 89, 0.16);
  --accent-strong: #f3b428;
  --border-subtle: rgba(148, 163, 184, 0.28);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Sodfa", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Poppins", sans-serif;
  background: radial-gradient(circle at top, #101224 0, #050816 55%, #020617 100%);
  color: var(--text-main);
  line-height: 1.7;
}

/* ====== LAYOUT UTILS ====== */

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ====== TOPBAR ====== */

.topbar {
  background: rgba(2, 6, 23, 0.95);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  z-index: 30;
  position: relative;
}

.topbar-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.topbar-contact span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.topbar a {
  color: var(--accent-strong);
  text-decoration: none;
}

.topbar a:hover {
  text-decoration: underline;
}

.divider {
  opacity: 0.35;
}

.lang-btn {
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: transparent;
  color: var(--text-main);
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
}

/* ====== NAVBAR ====== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.nav-inner {
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(245, 200, 89, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at 30% 20%, #fefce8 0, #fbbf24 35%, #0f172a 80%);
}

.lamp-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle, #fef9c3, #facc15, #f97316);
  box-shadow: 0 0 10px #fed7aa, 0 0 22px rgba(248, 250, 252, 0.8);
}

.brand-text span {
  font-weight: 600;
  font-size: 0.98rem;
}

.brand-text small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.6rem;
}

.nav-link {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-main);
  position: relative;
  padding: 0.3rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.25rem;
}

/* ====== SECTIONS ====== */

.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.4rem;
}

.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ====== HERO ====== */

.hero {
  position: relative;
  min-height: 80vh;
  max-height: 750px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.8) brightness(0.28);
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(245, 200, 89, 0.28), transparent 55%),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.75), rgba(5, 8, 22, 1));
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2.4rem;
  align-items: center;
  padding: 2.6rem 0 3rem;
}

.hero-text h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.hero-text p {
  color: #e5e7eb;
  max-width: 520px;
  margin-bottom: 1.5rem;
  font-size: 0.96rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.3rem;
}

.btn {
  border-radius: 999px;
  padding: 0.6rem 1.5rem;
  font-size: 0.88rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111827;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(245, 200, 89, 0.32);
}

.btn.ghost {
  background: transparent;
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.7);
}

.btn.whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #22c55e;
  color: #f9fafb;
  text-decoration: none;
  margin-top: 0.7rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.78rem;
}

.hero-badges span {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 0.3rem 0.9rem;
  background: rgba(15, 23, 42, 0.8);
}

/* ====== LAMPS (Chandeliers) ====== */

.hero-lamps {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: center;
  justify-content: center;
}

.lamp-cluster {
  position: relative;
  width: 110px;
  height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.lamp-wire {
  width: 2px;
  height: 58px;
  background: rgba(148, 163, 184, 0.7);
}

.lamp-head {
  width: 44px;
  height: 16px;
  background: #020617;
  border-radius: 999px 999px 12px 12px;
  margin-top: -2px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.9);
}

.lamp-head.wide {
  width: 56px;
}

.lamp-head.slim {
  width: 36px;
}

.lamp-bulb {
  width: 34px;
  height: 40px;
  border-radius: 999px;
  margin-top: -4px;
  background: radial-gradient(circle, #fefce8, #fde68a 30%, #fbbf24 60%, #f97316 100%);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.9);
  position: relative;
}

/* أذرع جانبية كأنها ثريا بثلاث لمبات */
.lamp-bulb::before,
.lamp-bulb::after {
  content: "";
  position: absolute;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle, #fefce8, #fde047);
  box-shadow: 0 0 12px rgba(250, 250, 210, 0.9);
}

.lamp-bulb::before {
  right: 130%;
}

.lamp-bulb::after {
  left: 130%;
}

.lamp-glow {
  position: absolute;
  top: 80px;
  width: 190%;
  height: 90px;
  background: radial-gradient(
    ellipse at top,
    rgba(250, 204, 21, 0.38),
    transparent 75%
  );
  filter: blur(3px);
}

.lamp-1 .lamp-bulb.flicker {
  animation: flicker 1.6s infinite ease-in-out;
}

.lamp-2 .lamp-bulb.steady {
  box-shadow: 0 0 20px rgba(250, 204, 21, 1);
}

.lamp-3 .lamp-bulb.pulse {
  animation: pulse 2.4s infinite ease-in-out;
}

.pulse-glow {
  animation: glowPulse 2.4s infinite ease-in-out;
}

@keyframes flicker {
  0%, 18%, 22%, 55%, 100% {
    opacity: 1;
    box-shadow: 0 0 18px rgba(250, 204, 21, 0.95);
  }
  20%, 24%, 52% {
    opacity: 0.45;
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.35);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  48% {
    transform: scale(1.06);
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.35;
  }
  48% {
    opacity: 0.85;
  }
}

/* ====== GRID ====== */

.grid {
  display: grid;
  gap: 2rem;
}

/* ====== ABOUT ====== */

.about-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
}

.about-text p:not(:last-child) {
  margin-bottom: 0.8rem;
}

.about-image img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* ====== PRODUCTS ====== */

.products-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.product-card {
  background: radial-gradient(circle at top, #020617, #020617 55%, #030712);
  border-radius: 18px;
  padding: 1.2rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.product-img {
  width: 100%;
  height: 150px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  margin-bottom: 0.9rem;
}

.product-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.product-card p {
  font-size: 0.86rem;
  color: #d1d5db;
}

/* ====== GALLERY ====== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.gallery-item {
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  filter: brightness(0.92);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8);
  filter: brightness(1);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 92%;
  max-height: 82%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  font-size: 1.8rem;
  cursor: pointer;
}

/* ====== PROJECTS ====== */

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card {
  background: radial-gradient(circle at top, #020617, #020617 55%, #030712);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.project-img {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
}

.project-body {
  padding: 1rem 1.2rem 1.2rem;
}

.project-body h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

/* ====== CONTACT ====== */

.contact-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
  align-items: flex-start;
}

.contact-info p {
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.contact-info i {
  margin-inline-end: 0.35rem;
}

.map-wrapper {
  margin-top: 1rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.map-wrapper iframe {
  width: 100%;
  height: 260px;
  border: 0;
}

/* ====== FOOTER ====== */

.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.9rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: #020617;
}

.footer-inner {
  gap: 1rem;
}

.footer-dev span:last-child {
  font-weight: 500;
}

/* ====== PRELOADER ====== */

#preloader {
  position: fixed;
  inset: 0;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.loader-lamp {
  position: relative;
  width: 90px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-lamp .lamp-wire {
  width: 2px;
  height: 50px;
  background: rgba(148, 163, 184, 0.7);
}

.loader-lamp .lamp-head {
  width: 46px;
  height: 18px;
  background: #020617;
  border-radius: 999px 999px 12px 12px;
}

.loader-lamp .lamp-bulb {
  width: 38px;
  height: 46px;
  margin-top: -2px;
  border-radius: 999px;
  background: radial-gradient(circle, #fefce8, #facc15 50%, #f97316 80%);
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.95);
  animation: loaderPulse 1.3s infinite ease-in-out;
}

.loader-lamp .glow {
  position: absolute;
  top: 80px;
  width: 210%;
  height: 90px;
  background: radial-gradient(
    ellipse at top,
    rgba(250, 204, 21, 0.3),
    transparent 70%
  );
}

@keyframes loaderPulse {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.9;
  }
  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

/* ====== INTRO OVERLAY ====== */

#intro-overlay {
  position: fixed;
  inset: 0;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

#intro-overlay.hidden {
  display: none;
}

.intro-inner {
  position: relative;
  text-align: center;
  color: var(--text-main);
  padding: 1.6rem;
}

.intro-inner h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.intro-inner p {
  margin-bottom: 0.9rem;
  color: var(--text-muted);
}

#intro-btn {
  padding: 0.55rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.92rem;
}

#intro-btn:hover {
  background: var(--accent);
  color: #111827;
}

.intro-light {
  position: absolute;
  inset: 50%;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent), var(--accent-strong));
  box-shadow: 0 0 24px rgba(245, 200, 89, 0.95);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

#intro-overlay.playing .intro-light {
  animation: introExpand 1.3s forwards ease-out;
}

@keyframes introExpand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  60% {
    transform: translate(-50%, -50%) scale(8);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(12);
    opacity: 0;
  }
}

/* ====== LIGHT WIZARD ====== */

.light-wizard {
  padding-bottom: 4rem;
}

.wizard-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.wizard-card {
  background: radial-gradient(circle at top, #020617, #020617 55%, #030712);
  border-radius: 18px;
  padding: 1.25rem 1.3rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
}

.wizard-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
}

.wizard-card p {
  font-size: 0.85rem;
  color: #d1d5db;
  margin-bottom: 0.7rem;
}

.wizard-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wizard-option {
  flex: 1;
  min-width: 110px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  justify-content: center;
}

.wizard-option.active {
  border-color: var(--accent-strong);
  background: radial-gradient(circle at top, var(--accent), var(--accent-strong));
  color: #111827;
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.color-blue {
  background: #3b82f6;
}

.color-red {
  background: #ef4444;
}

.color-grey {
  background: #9ca3af;
}

.wizard-actions {
  text-align: center;
  margin-top: 1.5rem;
}

.wizard-error {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: #f97373;
}

.wizard-result {
  margin-top: 2rem;
  background: rgba(2, 6, 23, 0.96);
  border-radius: 18px;
  padding: 1.5rem 1.3rem;
  border: 1px solid var(--border-subtle);
}

.wizard-result h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.wizard-result p {
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-bottom: 1rem;
}

.wizard-video-wrapper {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.wizard-video-wrapper video {
  width: 100%;
  display: block;
}

/* ====== RESPONSIVE ====== */

@media (max-width: 960px) {
  .hero-content {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 2.4rem;
    row-gap: 2.2rem;
  }

  .hero {
    min-height: auto;
    padding-bottom: 2.6rem;
  }

  .hero-lamps {
    flex-direction: row;
    justify-content: center;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-grid {
    row-gap: 2rem;
  }

  .section {
    padding: 3.2rem 0;
  }
}

@media (max-width: 768px) {
  .topbar {
    display: none;
  }

  .navbar .container {
    padding-inline: 1.2rem;
  }

  .brand-text span {
    font-size: 0.9rem;
  }

  .brand-text small {
    font-size: 0.64rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    background: rgba(2, 6, 23, 0.98);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    padding-bottom: 0.6rem;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    padding-inline: 1.5rem;
  }

  .hero-text h1 {
    font-size: 1.7rem;
  }

  .hero-text p {
    font-size: 0.9rem;
  }

  .hero-badges span {
    font-size: 0.76rem;
  }

  .lamp-cluster {
    transform: scale(0.9);
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .section-header p {
    font-size: 0.85rem;
  }

  .wizard-card p,
  .product-card p,
  .contact-info p {
    font-size: 0.84rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-content {
    padding-top: 2rem;
  }

  .hero-text h1 {
    font-size: 1.55rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .lamp-cluster {
    transform: scale(0.82);
  }

  .section {
    padding: 2.7rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
