/* ===== ZIRYAB - Global Styles ===== */
:root {
  /* Deep navy foundation — sophistication & cultural depth */
  --black: #0d0b1a;
  --dark: #161230;
  --dark-2: #1c1740;
  --dark-3: #2a2455;
  /* Warm gold — Arabian heritage & luxury */
  --gold: #FED172;
  --gold-light: #ffe0a0;
  --gold-dark: #e5b85a;
  /* Vibrant orange — creative energy & action */
  --orange: #F3742B;
  --orange-light: #f58d4f;
  /* Burnt warmth — depth & richness */
  --rust: #B83A14;
  --burgundy: #612E37;
  /* Neutrals */
  --white: #f5f2ed;
  --gray: #9590a8;
  --gray-light: #b5b0c4;
  --gray-dark: #4a4565;
  --font-ar: 'Tajawal', sans-serif;
  --font-en: 'Inter', sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-ar);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.7;
}

body.en {
  font-family: var(--font-en);
  direction: ltr;
}

body.en .container,
body.en .nav-container {
  direction: ltr;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(13, 11, 26, 0.95);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(254, 209, 114, 0.12);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  flex-shrink: 0;
}

.logo-img {
  height: 36px;
  max-width: 140px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--gray-light);
  transition: var(--transition);
  position: relative;
  font-weight: 400;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: var(--transition);
}

body.en .nav-links a::after {
  right: auto;
  left: 0;
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  background: transparent;
  border: 1px solid var(--gray-dark);
  color: var(--gray-light);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-en);
  transition: var(--transition);
  letter-spacing: 1px;
}

.lang-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.nav-cta {
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--orange-light);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 32px 80px;
}

.hero-bg-lines {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 100%;
  display: flex;
  justify-content: center;
  gap: 24px;
  opacity: 0.07;
  pointer-events: none;
}

.oud-string {
  width: 1.5px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--gold), var(--orange), transparent);
  position: relative;
}

.oud-string::after {
  content: '';
  position: absolute;
  bottom: 40%;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--orange);
}

.s1 { animation: stringPulse 4s ease-in-out infinite; }
.s2 { animation: stringPulse 4s ease-in-out 0.5s infinite; }
.s3 { animation: stringPulse 4s ease-in-out 1s infinite; }
.s4 { animation: stringPulse 4s ease-in-out 1.5s infinite; }
.s5 { animation: stringPulse 4s ease-in-out 2s infinite; }

@keyframes stringPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 28px;
  letter-spacing: -0.5px;
  word-break: keep-all;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--gray-light);
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.9;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--orange-light);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--gray-dark);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--orange), transparent);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.5); }
  100% { opacity: 1; transform: scaleY(1); }
}

/* ===== SECTIONS ===== */
.section {
  padding: 120px 0;
  position: relative;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 500;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 60px;
  line-height: 1.3;
}

/* ===== ABOUT ===== */
.about {
  background: var(--dark);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 24px;
  line-height: 1.4;
}

.about-text p {
  color: var(--gray-light);
  font-size: 1.05rem;
  line-height: 1.9;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  border-bottom: 1px solid var(--dark-3);
}

.stat-num {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-en);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--gray);
}

/* ===== SECTORS ===== */
.sectors {
  background: var(--black);
}

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sector-card {
  background: var(--dark);
  border: 1px solid var(--dark-3);
  border-radius: 8px;
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.sector-card::before {
  content: attr(data-index);
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 0.75rem;
  color: var(--gray-dark);
  font-family: var(--font-en);
  letter-spacing: 1px;
}

body.en .sector-card::before {
  left: auto;
  right: 16px;
}

[dir="rtl"] .sector-card::before {
  left: auto;
  right: 16px;
}

.sector-card:hover {
  border-color: var(--burgundy);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(97, 46, 55, 0.15);
}

.sector-card:hover .sector-icon {
  color: var(--gold);
}

.sector-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--gray);
  transition: var(--transition);
}

.sector-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.sector-card p {
  font-size: 0.95rem;
  color: var(--gray-light);
  line-height: 1.7;
  margin-bottom: 20px;
}

.sector-link {
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 500;
  transition: var(--transition);
}

.sector-link:hover {
  color: var(--gold-light);
}

/* ===== SERVICES ===== */
.services {
  background: var(--dark);
}

.services-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--dark-3);
  color: var(--gray);
  padding: 12px 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}

.tab-btn:hover {
  border-color: var(--gray-dark);
  color: var(--white);
}

.tab-btn.active {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
  font-weight: 600;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.service-detail {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
}

.service-info h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.service-info p {
  color: var(--gray-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-list li {
  padding-right: 20px;
  position: relative;
  color: var(--gray-light);
  font-size: 0.95rem;
}

body.en .service-list li {
  padding-right: 0;
  padding-left: 20px;
}

.service-list li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

body.en .service-list li::before {
  right: auto;
  left: 0;
}

.service-steps {
  background: var(--dark-2);
  border-radius: 8px;
  padding: 36px;
  border: 1px solid var(--dark-3);
}

.service-steps h4 {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 28px;
  font-weight: 500;
  letter-spacing: 1px;
}

.step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--dark-3);
}

.step:last-child {
  border-bottom: none;
}

.step-num {
  font-family: var(--font-en);
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  min-width: 32px;
}

.step span:last-child {
  color: var(--gray-light);
  font-size: 0.95rem;
}

/* ===== WHY ZIRYAB ===== */
.why-section {
  background: var(--black);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.why-card {
  background: var(--dark);
  border: 1px solid var(--dark-3);
  border-radius: 8px;
  padding: 40px;
  transition: var(--transition);
}

.why-card:hover {
  border-color: var(--burgundy);
  box-shadow: 0 8px 32px rgba(97, 46, 55, 0.12);
}

.why-num {
  font-family: var(--font-en);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-3);
  margin-bottom: 16px;
  line-height: 1;
}

.why-card:hover .why-num {
  color: var(--gold);
  transition: var(--transition);
}

.why-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.why-card p {
  color: var(--gray-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== WORK/PORTFOLIO ===== */
.work {
  background: var(--dark);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  aspect-ratio: 4/5;
  background: var(--dark-2);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--dark-3);
  display: flex;
  align-items: flex-end;
  transition: var(--transition);
}

.work-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.3) 50%, transparent 100%);
  z-index: 1;
}

.work-card:hover {
  border-color: var(--burgundy);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(97, 46, 55, 0.15);
}

.work-overlay {
  position: relative;
  z-index: 2;
  padding: 32px;
}

.work-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--orange);
  border: 1px solid var(--rust);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.work-overlay h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.work-overlay p {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ===== CTA ===== */
.cta-section {
  background: var(--black);
  padding: 80px 0;
}

.cta-box {
  background: linear-gradient(135deg, var(--dark-2), var(--burgundy) 180%);
  border: 1px solid var(--dark-3);
  border-radius: 12px;
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), var(--gold), transparent);
}

.cta-box h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 16px;
}

.cta-box p {
  color: var(--gray-light);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== CONTACT ===== */
.contact {
  background: var(--dark);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 400;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: 6px;
  padding: 14px 16px;
  color: var(--white);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  padding-left: 40px;
}

body.en .form-group select {
  background-position: right 16px center;
  padding-left: 16px;
  padding-right: 40px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-top: 20px;
}

.contact-item h4 {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: 1px;
}

.contact-item p {
  color: var(--gray-light);
  font-size: 1rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  padding: 60px 0 30px;
  border-top: 1px solid var(--dark-3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-logo {
  height: 32px;
  max-width: 130px;
  object-fit: contain;
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links h4 {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: 1px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--gray);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--dark-3);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--gray-dark);
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 998;
  }

  body.en .nav-links {
    right: auto;
    left: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .hamburger {
    display: flex;
    z-index: 999;
  }

  .hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 4px);
  }

  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -4px);
  }

  .nav-cta {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-stats {
    flex-direction: row;
    gap: 24px;
  }

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

  .service-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 80px 0;
  }

  .sectors-grid {
    grid-template-columns: 1fr;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: column;
  }

  .cta-box {
    padding: 48px 24px;
  }

  .services-tabs {
    gap: 6px;
  }

  .tab-btn {
    padding: 10px 18px;
    font-size: 0.85rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}
