/* ================= CSS VARIABLES & PALETTE ================= */
:root {
  /* Core Colors */
  --bg-dark: #061329;
  --bg-surface: #0d2145;
  --bg-surface-soft: #112956;
  --brand-blue: #1a50c0;
  --brand-blue-light: #3f70d6;
  --brand-blue-dark: #123b92;
  
  /* Typography */
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  
  /* Transitions & UI */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Hierarchy */
  --z-base: 1;
  --z-header: 100;
  --z-floating: 500;
  --z-loader: 9999;
  --z-lightbox: 99999;
}

/* ================= RESET & GLOBAL ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Font updated to use Tajawal as the fallback for Arabic */
body {
  font-family: 'Inter', 'Tajawal', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { text-decoration: none; color: inherit; }

/* Accessibility Focus States */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .gallery-item:focus-visible {
  outline: 2px solid var(--brand-blue-light);
  outline-offset: 4px;
  border-radius: 4px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* Headings updated to use Cairo as the fallback for Arabic */
h1, h2, h3, .logo-text strong { 
  font-family: 'Fraunces', 'Cairo', serif; 
}

.eyebrow { color: var(--brand-blue); text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; font-weight: 700; margin-bottom: 15px; }
p { color: var(--text-muted); margin-bottom: 15px; }

/* ================= BRAND LOGO ================= */
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; line-height: 0; }
.brand-logo { width: clamp(132px, 11vw, 168px); height: auto; border-radius: 9px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); }
.footer-logo .brand-logo { width: 160px; }
.loader-logo { width: min(300px, 74vw); height: auto; border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3); }
.loader-line {
  display: block; width: 0; height: 3px; margin: 18px auto 0; border-radius: 99px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: loaderSweep 1.1s ease-in-out infinite;
}
@keyframes loaderSweep {
  0% { width: 0; opacity: 0.4; }
  50% { width: min(220px, 56vw); opacity: 1; }
  100% { width: 0; opacity: 0.4; }
}

/* ================= PRELOADER ================= */
#preloader { position: fixed; inset: 0; background: radial-gradient(circle at 50% 45%, #123b92 0%, var(--bg-dark) 58%); z-index: var(--z-loader); display: flex; align-items: center; justify-content: center; transition: opacity 0.5s ease, visibility 0.5s ease; }
.loader-content { text-align: center; }
.bearing-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue-light)); z-index: var(--z-floating); width: 0; transition: width 0.1s; }

/* ================= HEADER & NAV ================= */
.site-header { position: fixed; width: 100%; top: 0; z-index: var(--z-header); padding: 16px 0; transition: var(--transition); border-bottom: 1px solid transparent; }
.site-header.scrolled { background: rgba(6, 19, 41, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.05); padding: 15px 0; }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.nav { display: flex; gap: 30px; }
.nav a { font-weight: 500; font-size: 0.95rem; transition: var(--transition); }
.nav a:hover { color: var(--brand-blue); }
.header-actions { display: flex; gap: 15px; align-items: center; }
.lang-btn { border: 1px solid rgba(255,255,255,0.2); padding: 8px 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; }
.header-book-btn, .btn-primary { background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light)); padding: 10px 24px; border-radius: 8px; font-weight: 600; color: #fff; transition: var(--transition); border: none; cursor: pointer; display: inline-block; }
.header-book-btn:hover, .btn-primary:hover { background: linear-gradient(135deg, var(--brand-blue-light), var(--brand-blue)); transform: translateY(-2px); }
.menu-btn { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* ================= HERO SECTION ================= */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding-top: 80px; }
.hero-bg { position: absolute; inset: 0; background: url('https://images.unsplash.com/photo-1520106212299-d99c443e4568?auto=format&fit=crop&w=1920&q=80') center/cover; opacity: 0.3; z-index: -2; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(6,19,41,0.96) 0%, rgba(6,19,41,0.72) 48%, rgba(26,80,192,0.2) 100%), linear-gradient(to bottom, transparent 58%, var(--bg-dark) 100%); z-index: -1; }
.hero-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: center; }
.hero-content h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); line-height: 1.1; margin-bottom: 20px; }
.hero-description { font-size: 1.1rem; max-width: 500px; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 20px; margin-bottom: 50px; flex-wrap: wrap; }
.btn-glass { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); padding: 10px 24px; border-radius: 8px; backdrop-filter: blur(5px); transition: var(--transition); }
.btn-glass:hover { background: rgba(255,255,255,0.2); }
.trust-row { display: flex; gap: 40px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px; flex-wrap: wrap; }
.trust-row div strong { display: block; font-size: 2rem; color: var(--brand-blue); }
.trust-row div span { font-size: 0.85rem; color: var(--text-muted); }
.hero-card { background: linear-gradient(145deg, rgba(17,41,86,0.94), rgba(13,33,69,0.92)); padding: 30px; border-radius: 18px; border: 1px solid rgba(85,130,225,0.25); position: relative; box-shadow: 0 30px 80px rgba(0,0,0,0.28); }
.hero-card h3 { font-size: 1.8rem; margin: 10px 0; }
.hero-geo { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--brand-blue); }
.mini-info { display: flex; gap: 15px; font-size: 0.85rem; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; }
.compass { width: 60px; height: 60px; margin-bottom: 20px; }
.compass-ring, .compass-core { fill: none; stroke: var(--brand-blue); stroke-width: 2; }
.compass-tick { stroke: var(--text-muted); stroke-width: 1.5; }
.compass-n { fill: var(--brand-blue); font-size: 14px; font-weight: bold; text-anchor: middle; font-family: sans-serif; }
.compass-needle-shape { fill: #fff; }

/* ================= SECTIONS & GRIDS ================= */
.experience-section { padding: 100px 0; background: linear-gradient(180deg, var(--bg-dark), rgba(13,33,69,0.68), var(--bg-dark)); }
.why-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 70px; align-items: start; }
.why-card { position: sticky; top: 130px; padding: 38px; border: 1px solid rgba(85,130,225,0.18); border-radius: 18px; background: linear-gradient(145deg, rgba(17,41,86,0.82), rgba(13,33,69,0.8)); }
.section { padding: 100px 0; }
.section-heading { max-width: 600px; margin-bottom: 60px; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 20px; }
.trust-section { background: linear-gradient(90deg, var(--bg-surface), var(--bg-surface-soft), var(--bg-surface)); padding: 40px 0; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); }
.trust-content p { text-align: center; margin-bottom: 20px; font-size: 0.9rem; }
.trust-points { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px; color: var(--text-main); font-weight: 500; }

.destination-grid, .package-grid, .features-grid { display: grid; gap: 30px; }
.destination-grid { grid-template-columns: repeat(3, 1fr); }
.destination-card { position: relative; border-radius: 18px; overflow: hidden; min-height: 400px; border: 1px solid rgba(85,130,225,0.16); }
.destination-card.large { grid-column: span 2; }
.destination-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; opacity: 0.6; transition: var(--transition); }
.destination-card:hover img, .destination-card:focus-within img { transform: scale(1.05); opacity: 0.4; }
.destination-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px; background: linear-gradient(to top, var(--bg-dark), transparent); }
.destination-overlay h3 { font-size: 1.8rem; margin: 10px 0; }
.geo-tag { position: absolute; top: 20px; right: 20px; background: rgba(0,0,0,0.5); padding: 5px 10px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; backdrop-filter: blur(4px); z-index: var(--z-base); }

.package-grid { grid-template-columns: repeat(3, 1fr); }
.package-card { background: linear-gradient(155deg, var(--bg-surface-soft), var(--bg-surface)); border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); position: relative; transition: var(--transition); display: flex; flex-direction: column; }
.package-card:hover, .package-card:focus-within { transform: translateY(-5px); border-color: rgba(255,255,255,0.15); }
.package-image { height: 200px; position: relative; }
.package-image img { width: 100%; height: 100%; object-fit: cover; }
.package-image span { position: absolute; bottom: 15px; left: 15px; background: var(--brand-blue); padding: 5px 12px; border-radius: 7px; font-size: 0.8rem; font-weight: bold; }
.popular-badge { position: absolute; top: 15px; right: 15px; background: #ffffff; color: var(--brand-blue-dark); padding: 5px 10px; border-radius: 7px; font-size: 0.75rem; font-weight: bold; z-index: var(--z-base); }
.package-body { padding: 30px; display: flex; flex-direction: column; flex-grow: 1; }
.package-city { color: var(--brand-blue); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; margin-bottom: 10px; }
.package-body h3 { font-size: 1.5rem; margin-bottom: 20px; }
.package-body ul { list-style: none; margin-bottom: 30px; }
.package-body li { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 10px; position: relative; padding-left: 20px; }
.package-body li::before { content: '→'; position: absolute; left: 0; color: var(--brand-blue); }
.package-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: auto; }
.package-footer a { color: var(--brand-blue); font-weight: 600; }

.features-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; margin-top: 50px; }
.feature span { color: var(--brand-blue); font-size: 1.5rem; margin-bottom: 15px; display: block; }
.experience-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.experience-list div { margin-bottom: 30px; border-left: 2px solid var(--brand-blue); padding-left: 20px; }
.experience-list span { font-family: 'JetBrains Mono', monospace; color: var(--brand-blue); font-size: 0.9rem; }
.experience-list strong { display: block; font-size: 1.2rem; margin: 5px 0; }
.experience-image img { border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,0.28); }

/* ================= MASONRY GALLERY ================= */
.gallery-masonry { column-count: 3; column-gap: 20px; }
.gallery-item { margin-bottom: 20px; break-inside: avoid; overflow: hidden; border-radius: 8px; cursor: zoom-in; }
.gallery-item img { transition: var(--transition); }
.gallery-item:hover img, .gallery-item:focus img { transform: scale(1.05); }

/* ================= FAQ & CONTACT ================= */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
.faq-question { width: 100%; background: none; border: none; color: var(--text-main); font-size: 1.1rem; font-weight: 600; text-align: left; padding: 25px 0; display: flex; justify-content: space-between; cursor: pointer; font-family: inherit; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-answer-inner { padding-bottom: 25px; color: var(--text-muted); }
.faq-item.active .faq-answer { max-height: 500px; }
.faq-item.active .faq-question span { transform: rotate(45deg); color: var(--brand-blue); }

.contact-section { background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-soft) 100%); padding: 100px 0; }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info { margin-top: 40px; }
.contact-info p { margin-bottom: 10px; color: var(--text-main); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
input, select, textarea { width: 100%; padding: 15px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: var(--text-main); font-family: inherit; font-size: 1rem; margin-bottom: 20px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-blue-light); box-shadow: 0 0 0 3px rgba(26,80,192,0.16); }
select option { background: var(--bg-surface); color: var(--text-main); }
button[type="submit"] { background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light)); color: #fff; border: none; padding: 15px 30px; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: var(--transition); width: 100%; }
button[type="submit"]:hover { background: linear-gradient(135deg, var(--brand-blue-light), var(--brand-blue)); }

/* ================= FOOTER & WHATSAPP ================= */
.footer { padding: 60px 0 30px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; flex-wrap: wrap; gap: 20px;}
.footer-links { display: flex; gap: 30px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--brand-blue); }
.footer-bottom { text-align: center; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px; }

.floating-whatsapp { position: fixed; bottom: 30px; right: 30px; background: #25D366; color: #fff; padding: 15px 25px; border-radius: 999px; font-weight: 600; z-index: var(--z-floating); box-shadow: 0 10px 20px rgba(0,0,0,0.2); transition: var(--transition); }
.floating-whatsapp:hover, .floating-whatsapp:focus-visible { transform: translateY(-5px); }

/* ================= RTL OVERRIDES (For ar.html) ================= */
[dir="rtl"] .nav, [dir="rtl"] .header-actions, [dir="rtl"] .footer-links { gap: 30px; }
[dir="rtl"] .package-body li::before { left: auto; right: 0; content: '←'; }
[dir="rtl"] .package-body li { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .experience-list div { border-left: none; border-right: 2px solid var(--brand-blue); padding-left: 0; padding-right: 20px; }
[dir="rtl"] .faq-question { text-align: right; }
[dir="rtl"] .floating-whatsapp { right: auto; left: 30px; }

/* ================= ARABIC TYPOGRAPHY BOOST ================= */
[dir="rtl"] body {
  font-size: 1.05rem; 
}
[dir="rtl"] h1 {
  line-height: 1.3; 
}

/* ================= ANIMATIONS & RESPONSIVE ================= */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.show { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

.lightbox-overlay { position: fixed; inset: 0; background: rgba(9, 21, 36, 0.95); z-index: var(--z-lightbox); display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: var(--transition); }
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-overlay img { max-height: 90vh; max-width: 90vw; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 30px; right: 30px; background: none; border: none; color: #fff; font-size: 3rem; cursor: pointer; line-height: 1; transition: color 0.2s; }
.lightbox-close:hover, .lightbox-close:focus-visible { color: var(--brand-blue-light); }

@media (max-width: 992px) {
  .hero-layout, .contact-layout, .experience-layout, .why-layout { grid-template-columns: 1fr; }
  .why-card { position: static; }
  .destination-grid, .package-grid { grid-template-columns: 1fr; }
  .destination-card.large { grid-column: span 1; }
  .gallery-masonry { column-count: 2; }
}
@media (max-width: 768px) {
  .brand-logo { width: 122px; border-radius: 7px; }
  .site-header { padding: 12px 0; }
  .nav { position: fixed; top: 70px; left: 0; width: 100%; background: var(--bg-surface); flex-direction: column; padding: 20px; gap: 15px; transform: translateY(-100%); opacity: 0; pointer-events: none; transition: var(--transition); }
  .nav.active { transform: translateY(0); opacity: 1; pointer-events: all; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
  .menu-btn { display: block; }
  .header-actions { gap: 10px; }
  .header-book-btn { display: none; }
  .form-row, .features-grid { grid-template-columns: 1fr; }
  .gallery-masonry { column-count: 1; }
  .footer-content { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}