:root {
  /* Colors from the visual identity */
  --primary-blue: #242059;
  --accent-red: #ed1e24;
  --neutral-white: #ffffff;
  --text-gray: #4a5568;
  --light-gray: #f7fafc;
  --medium-gray: #e2e8f0;

  /* Fonts */
  --font-arabic: "Bahij Janna", sans-serif;
  --font-english: "Montserrat", sans-serif;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-english);
  color: var(--text-gray);
  background-color: var(--neutral-white);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary-blue);
  font-family: var(--font-english);
}

/* ======== Modern Header & Navigation ======== */
#main-header {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100vw;
}

#main-header.scrolled {
  padding: 0.5rem 0;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
  position: relative;
  color: var(--primary-blue);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  overflow: hidden;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--accent-red);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover {
  color: var(--accent-red);
}

.nav-link:hover::after {
  width: 80%;
}

.contact-btn {
  background-color: var(--accent-red);
  color: white !important;
  border-radius: 30px;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(237, 30, 36, 0.2);
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(237, 30, 36, 0.3);
}

.contact-btn::after {
  display: none;
}

/* Menu Toggle Button */
.menu-btn {
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 50;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

.menu-btn span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--primary-blue);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.menu-btn span:nth-child(1) {
  top: 0px;
}

.menu-btn span:nth-child(2) {
  top: 10px;
}

.menu-btn span:nth-child(3) {
  top: 20px;
}

.menu-btn.open span:nth-child(1) {
  top: 10px;
  transform: rotate(135deg);
  background: white;
}

.menu-btn.open span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.menu-btn.open span:nth-child(3) {
  top: 10px;
  transform: rotate(-135deg);
  background: white;
}

/* FIXED: Mobile Menu - Proper Contrast */
#mobile-menu {
  transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  background-color: var(--primary-blue) !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  z-index: 49;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

#mobile-menu.active {
  display: flex;
}

.mobile-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 4rem 1rem;
}

.mobile-link {
  font-size: 2rem;
  color: white !important;
  margin: 1rem 0;
  display: block;
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.5s ease;
}

#mobile-menu.active .mobile-link {
  transform: translateY(0);
  opacity: 1;
}

/* ======== Hero Section ======== */
.hero-section {
  background-color: var(--neutral-white);
  position: relative;
  overflow: hidden;
}

/* Pure CSS wave effect */
.ocean-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  overflow: hidden;
}

.wave {
  position: absolute;
  width: 100%;
  height: 100%;
  bottom: 0;
  left: 0;
  transform-origin: bottom center;
}

.wave1 {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 Q150,60 300,0 Q450,60 600,0 Q750,60 900,0 Q1050,60 1200,0 V120 H0 V0 Z' fill='%23242059' opacity='0.2'%3E%3C/path%3E%3C/svg%3E");
  background-size: 1200px 60px;
  animation: waveAnimation 12s linear infinite;
  opacity: 0.3;
}

.wave2 {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 Q150,0 300,60 Q450,0 600,60 Q750,0 900,60 Q1050,0 1200,60 V120 H0 V60 Z' fill='%23242059' opacity='0.2'%3E%3C/path%3E%3C/svg%3E");
  background-size: 1200px 60px;
  animation: waveAnimation 8s linear infinite;
  animation-delay: -3s;
  opacity: 0.2;
}

@keyframes waveAnimation {
  0% {
    background-position-x: 0;
  }
  100% {
    background-position-x: 1200px;
  }
}

/* Hero Buttons */
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin: 0.5rem;
}

.hero-btn.primary {
  background-color: var(--accent-red);
  color: white;
  box-shadow: 0 4px 15px rgba(237, 30, 36, 0.2);
}

.hero-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(237, 30, 36, 0.3);
}

.hero-btn.secondary {
  background-color: transparent;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.hero-btn.secondary:hover {
  background-color: var(--primary-blue);
  color: white;
}

/* Container Grid */
.container-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 15px;
  height: 450px;
  position: relative;
  perspective: 1000px;
}

.container-box {
  background-color: var(--primary-blue);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.container-box:hover {
  transform: translateZ(20px);
  box-shadow: 0 30px 40px rgba(0, 0, 0, 0.2);
}

.box1 {
  grid-column: 1 / 5;
  grid-row: 1 / 4;
  animation: float 6s ease-in-out infinite;
}

.box2 {
  grid-column: 5 / 7;
  grid-row: 1 / 3;
  animation: float 8s ease-in-out infinite 1s;
}

.box3 {
  grid-column: 1 / 3;
  grid-row: 4 / 7;
  animation: float 7s ease-in-out infinite 0.5s;
}

.box4 {
  grid-column: 3 / 5;
  grid-row: 4 / 7;
  animation: float 9s ease-in-out infinite 1.5s;
}

.box5 {
  grid-column: 5 / 7;
  grid-row: 3 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-red);
  animation: float 7.5s ease-in-out infinite 2s;
}

.box6 {
  grid-column: 5 / 7;
  grid-row: 5 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-blue);
  animation: float 8.5s ease-in-out infinite 0.75s;
}

@keyframes float {
  0% {
    transform: translateZ(0);
  }
  50% {
    transform: translateZ(15px);
  }
  100% {
    transform: translateZ(0);
  }
}

.counter-box,
.stat-box {
  text-align: center;
  color: white;
  padding: 0.5rem;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.counter-box span {
  font-size: 2rem;
  font-weight: 700;
  display: block;
  line-height: 1.2;
}

.counter-box p,
.stat-box p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.2;
  padding: 0 5px;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--primary-blue);
  opacity: 0.7;
  transition: opacity 0.3s ease;
  margin-top: 3rem;
}

.scroll-indicator:hover {
  opacity: 1;
}

.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--primary-blue);
  border-radius: 20px;
  position: relative;
  margin-bottom: 10px;
}

.mouse::before {
  content: "";
  width: 6px;
  height: 6px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-blue);
  border-radius: 50%;
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(15px);
  }
}

.scroll-indicator p {
  font-size: 0.8rem;
  font-weight: 500;
}

/* ======== Timeline Section ======== */
.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  width: 4px;
  background-color: var(--primary-blue);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  opacity: 0.5;
  z-index: 0;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
  margin-bottom: 3rem;
}

.timeline-item::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: white;
  border: 4px solid var(--accent-red);
  border-radius: 50%;
  top: 0;
  z-index: 1;
  transform: translateY(20px);
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item.left::after {
  right: -10px;
}

.timeline-item.right::after {
  left: -10px;
}

.timeline-content {
  padding: 30px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.timeline-date {
  display: inline-block;
  padding: 0.3rem 1rem;
  background-color: var(--primary-blue);
  color: white;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-title {
  color: var(--primary-blue);
  margin: 0.5rem 0;
  font-size: 1.25rem;
}

.timeline-text {
  color: var(--text-gray);
  margin: 0;
}

/* ======== Services Section ======== */
/* Services grid layout - 3x2 on desktop */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  overflow: visible; /* Fix for nested scrolling */
}

.service-card {
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  height: 100%;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: var(--accent-red);
  z-index: -1;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-card:hover::before {
  height: 100%;
  opacity: 0.05;
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-blue);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background-color: var(--accent-red);
  color: white;
  transform: scale(1.1);
}

.service-card h3 {
  margin: 0 0 10px 0;
  color: var(--primary-blue);
  font-size: 1.25rem;
}

.service-card p {
  margin: 0;
  color: var(--text-gray);
}

/* ======== Map Section ======== */
.map-container {
  position: relative;
  height: 500px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.world-map {
  height: 100%;
  z-index: 1;
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(36, 32, 89, 0.7),
    rgba(237, 30, 36, 0.5)
  );
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.map-container:hover .map-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.5s ease;
}

.map-container:hover .overlay-content {
  transform: translateY(0);
}

.overlay-content h3 {
  color: white;
  font-size: 2.5rem;
  margin: 0 0 10px 0;
}

.overlay-content p {
  font-size: 1.2rem;
  margin: 0;
}

.map-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: white;
  padding: 10px 15px;
  border-radius: 5px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

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

.red-dot {
  background-color: var(--accent-red);
}

.legend-item p {
  margin: 0;
  font-size: 0.85rem;
}

/* ======== Contact Section ======== */
/* FIXED: Contact form for mobile */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

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

.info-card {
  background-color: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.info-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.info-header i {
  font-size: 1.5rem;
  color: var(--accent-red);
}

.info-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.info-card p {
  margin: 0;
  color: var(--text-gray);
}

.info-card a {
  color: var(--text-gray);
  text-decoration: none;
  transition: color 0.3s ease;
}

.info-card a:hover {
  color: var(--accent-red);
}

/* FIXED: Completely revised contact form styling */
.contact-form-container {
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 100%;
}

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

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

.form-group label {
  font-weight: 500;
  color: var(--primary-blue);
}

.form-group input,
.form-group textarea {
  padding: 12px;
  border: 2px solid var(--medium-gray);
  border-radius: 8px;
  font-family: var(--font-english);
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(36, 32, 89, 0.1);
}

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

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--accent-red);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.submit-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.7s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(237, 30, 36, 0.3);
}

.submit-btn:hover::before {
  left: 100%;
}

/* ======== Footer ======== */
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-logo p {
  margin-top: 15px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.link-group h4 {
  color: var(--primary-blue);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.link-group a {
  display: block;
  color: var(--text-gray);
  text-decoration: none;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.link-group a:hover {
  color: var(--accent-red);
  transform: translateX(5px);
}

.footer-bottom {
  border-top: 1px solid var(--medium-gray);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.copyright {
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* Developer Credit */
.developer-credit {
  margin-top: 0;
}

.developer-credit a {
  color: #4a5568;
  text-decoration: none;
  position: relative;
  display: inline-block;
  padding: 0.3rem 0.8rem;
  transition: color 0.3s ease;
}

.developer-credit a::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: #ed1e24;
  transition: width 0.3s ease;
}

.developer-credit a:hover::before {
  width: 80%;
}

.developer-credit a:hover {
  color: #ed1e24;
}

.developer-credit a span {
  position: relative;
  z-index: 1;
}

/* Simple color transitions between sections */
#our-story {
  background-color: white;
  padding-bottom: 80px;
}

#services {
  background-color: var(--light-gray);
  padding-top: 80px;
  padding-bottom: 80px;
}

#destinations {
  background-color: white;
  padding-top: 80px;
  padding-bottom: 80px;
}

#contact {
  background-color: var(--light-gray);
  padding-top: 80px;
  padding-bottom: 80px;
}

/* ======== Responsive Adjustments ======== */
@media (max-width: 768px) {
  /* Fix for container width issues */
  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }

  .hero-section {
    text-align: center;
    padding-bottom: 4rem;
  }

  .hero-content {
    text-align: center;
    order: 2;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-content .flex.flex-wrap {
    justify-content: center;
    width: 100%;
  }

  .hero-content .flex.flex-wrap a {
    margin: 0.5rem auto;
    width: 80%;
    max-width: 250px;
    justify-content: center;
  }

  .hero-visual {
    order: 1;
    margin-bottom: 2rem;
  }

  /* Fix for container grid on mobile */
  .container-grid {
    height: 400px;
    gap: 10px;
  }

  /* Ensure counter box text fits */
  .counter-box span {
    font-size: 1.6rem;
  }

  .counter-box p,
  .stat-box p {
    font-size: 0.75rem;
    word-wrap: break-word;
  }

  /* Fix for scroll indicator */
  .scroll-indicator {
    margin-top: 2rem;
    position: absolute;
    bottom: 2rem;
  }

  /* Fix services grid for mobile - 1 column */
  .services-grid {
    grid-template-columns: 1fr;
    overflow: visible;
    max-height: none;
  }

  /* Timeline mobile fixes */
  .timeline-line {
    left: 40px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 0;
    margin-left: 0;
  }

  .timeline-item::after {
    left: 30px !important;
    transform: translateY(11px);
  }

  .timeline-item.right {
    left: 0;
  }

  .timeline-item.left::after,
  .timeline-item.right::after {
    left: 30px;
  }

  /* FIXED: Contact form for mobile */
  .contact-container {
    grid-template-columns: 1fr;
  }

  .contact-form-container {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
  }

  .form-group input,
  .form-group textarea {
    width: 100%;
    box-sizing: border-box;
  }

  .submit-btn {
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
  }

  /* Fix mobile menu toggle positioning */
  #menu-toggle {
    right: 0;
    position: relative;
  }
}
