@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #071f3d;
  --navy-soft: #123b66;
  --gold: #d9b36a;
  --gold-soft: #f4d28d;
  --light: #fff8f1;
  --white: #fffdfb;
  --page-bg-1: #fff9f3;
  --page-bg-2: #f8dfc4;
  --page-bg-3: #f2c79a;
  --text: #1d2b3a;
  --muted: #5c6671;
  --border: rgba(7, 31, 61, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(180deg, var(--page-bg-1) 0%, var(--page-bg-2) 45%, var(--page-bg-3) 100%);
  color: var(--text);
  direction: rtl;
  line-height: 1.7;
  opacity: 0;
  transition: opacity 0.45s ease;
}

body.page-loaded {
  opacity: 1;
}

body.page-transitioning {
  opacity: 0;
}

.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(7,31,61,0.96), rgba(18,59,102,0.92));
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.35s ease;
}

.page-transition-overlay.show {
  opacity: 1;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

@keyframes pageReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white);
  box-shadow: 0 8px 30px rgba(7, 31, 61, 0.16);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 90px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand img {
  width: 72px;
  height: 72px;
  border-radius: 0;
  background: transparent;
  padding: 0;
  border: none;
  object-fit: contain;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.main-nav a {
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 100%);
  color: var(--navy);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(217, 179, 106, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 12px 22px rgba(217, 179, 106, 0.4);
  filter: brightness(1.02);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #24d366 0%, #1ebc5d 100%);
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(30, 188, 93, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-whatsapp:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 22px rgba(30, 188, 93, 0.34);
}

.hero {
  padding: 80px 0 40px;
  background: linear-gradient(180deg, rgba(7,31,61,0.96) 0%, rgba(18,59,102,0.96) 100%);
  color: var(--white);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 3vw, 4rem);
  line-height: 1.2;
  margin-bottom: 18px;
  animation: fadeUp 0.7s ease both;
}

.hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1.08rem;
  max-width: 620px;
  margin-bottom: 26px;
  animation: fadeUp 0.8s ease 0.1s both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn.secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: none;
}

.hero-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 26px;
  backdrop-filter: blur(8px);
  animation: fadeUp 0.8s ease 0.15s both;
}

.hero-card .mini-box {
  background: rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 18px;
  margin-top: 18px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.hero-card .mini-box:hover {
  transform: translateX(-4px);
  background: rgba(255,255,255,0.12);
}

.section {
  padding: 80px 0;
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 42px;
}

.section-head h2 {
  font-size: clamp(2rem, 2.5vw, 2.8rem);
  margin-bottom: 12px;
  color: var(--navy);
}

.section-head p {
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px 24px;
  box-shadow: 0 20px 45px rgba(19, 36, 61, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: fadeUp 0.6s ease both;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 55px rgba(19, 36, 61, 0.1);
  border-color: rgba(18, 59, 102, 0.18);
}

.icon {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  background: linear-gradient(135deg, rgba(217,179,106,0.15), rgba(18,59,102,0.1));
  margin-bottom: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover .icon {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 12px 22px rgba(18,59,102,0.08);
}

.card h3 {
  margin-bottom: 10px;
  color: var(--navy);
}

.card p {
  color: var(--muted);
}

.stats {
  background: var(--navy);
  color: var(--white);
  padding: 50px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.stat-box {
  text-align: center;
  padding: 18px;
}

.stat-box strong {
  display: block;
  font-size: 2.3rem;
  margin-bottom: 8px;
  color: var(--gold-soft);
}

.page-banner {
  padding: 70px 0 30px;
  background: linear-gradient(180deg, rgba(7,31,61,0.95) 0%, rgba(18,59,102,0.92) 100%);
  color: var(--white);
}

.page-banner h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  animation: fadeUp 0.7s ease both;
}

.content-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(19,36,61,0.06);
  padding: 32px;
  animation: fadeUp 0.7s ease both;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(19,36,61,0.09);
}

.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.list-check {
  list-style: none;
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.list-check li {
  padding: 12px 16px 12px 18px;
  border-radius: 12px;
  background: rgba(18, 59, 102, 0.04);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.list-check li:hover {
  transform: translateX(-4px);
  background: rgba(18, 59, 102, 0.07);
  border-color: rgba(18, 59, 102, 0.14);
}

.tabs {
  margin-top: 26px;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.tab-btn {
  border: 1px solid var(--border);
  background: #f4f7fb;
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 100%);
  color: var(--navy);
  box-shadow: 0 10px 18px rgba(217, 179, 106, 0.28);
  transform: translateY(-2px);
}

.tab-panels {
  position: relative;
}

.tab-panel {
  display: none;
  animation: fadeUp 0.4s ease;
}

.tab-panel.active {
  display: block;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f9fafb;
  font: inherit;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(18,59,102,0.45);
  box-shadow: 0 0 0 4px rgba(18,59,102,0.08);
  transform: translateY(-1px);
}

.contact-form button {
  border: none;
  cursor: pointer;
}

.footer {
  background: #071f3d;
  color: rgba(255,255,255,0.8);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 30px;
}

.footer h3, .footer h4 {
  color: var(--white);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer a:hover {
  color: var(--gold-soft);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 30px;
  padding-top: 22px;
  text-align: center;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .nav-wrap,
  .main-nav ul,
  .hero-grid,
  .two-col,
  .grid-3,
  .stats-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .nav-wrap {
    justify-items: center;
    padding: 18px 0;
  }

  .main-nav ul {
    justify-content: center;
    flex-wrap: wrap;
  }

  .brand {
    justify-content: center;
  }

  .hero {
    padding-top: 60px;
  }
}

/* Hamburger / mobile nav */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--white);
  width: 48px;
  height: 48px;
  cursor: pointer;
}
.nav-toggle .hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
  position: relative;
}
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
}
.nav-toggle .hamburger::before { top: -7px; }
.nav-toggle .hamburger::after { top: 7px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: linear-gradient(180deg, rgba(7,31,61,0.98), rgba(18,59,102,0.98));
    padding: 18px 16px 28px;
    display: none;
    z-index: 20;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
  }
  .main-nav a {
    display: block;
    padding: 10px 12px;
    background: transparent;
    width: 100%;
    text-align: right;
    border-radius: 8px;
  }
}


/* --- التحديثات التفاعلية الجديدة --- */

/* 1. تأثير الرأس الزجاجي عند التمرير */
.topbar {
  transition: padding 0.4s ease, background 0.4s ease, backdrop-filter 0.4s ease;
}
.topbar.scrolled {
  padding: -5px 0;
  background: rgba(7, 31, 61, 0.85); /* شفافية أغمق */
  backdrop-filter: blur(12px); /* تأثير الزجاج */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 2. تأثيرات الظهور عند التمرير (Scroll Reveal) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.5, 0, 0, 1), transform 0.7s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* تعطيل الحركات القديمة التي كانت تعمل فوراً لتجنب التداخل */
.card, .content-box, .hero h1, .hero p, .hero-card {
  animation: none !important; 
}

/* --- أنماط معرض الصور --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.gallery-item img:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 18px 40px rgba(7,31,61,0.18);
}

/* --- لايتبوكس --- */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7,31,61,0.92);
  z-index: 200;
  padding: 28px;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 92%;
  max-height: 92%;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(7,31,61,0.6);
}

.lightbox-close {
  position: absolute;
  left: 22px;
  top: 18px;
  background: transparent;
  color: var(--white);
  border: none;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-item img { height: 160px; }
}

@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item img { height: 220px; }
}

