/* Home Hero Overlay (only for home page) */
.home-hero-overlay {
  /* gradient from bottom (darker) to top (transparent) to keep text readable */
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.45) 30%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0) 100%);
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
/* Home Hero Slideshow (only for home page) */
.home-hero-slideshow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}
.home-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; /* prefer center, adjust on small screens below */
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.4,0,0.2,1), transform 0.6s ease;
  z-index: 0;
  will-change: opacity, transform;
}
.home-hero-slide.active {
  opacity: 1;
  z-index: 1;
}
/* slight parallax / reveal for the active slide */
.home-hero-slide.active { transform: translateY(0); }
/* Gallery Lightbox Overlay */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.gallery-lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  background: #fff;
  object-fit: contain;
}
.gallery-lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 2rem;
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}
@media (max-width: 768px) {
  .gallery-lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
  }
}
/* Gallery Grid Layout */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.gallery-grid-cell {
  width: 100%;
  aspect-ratio: 4/3;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
  cursor: pointer;
}
.gallery-img:hover {
  transform: scale(1.04);
}
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
  }
  .gallery-grid-cell {
    aspect-ratio: 4/3;
  }
}
/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
  /* fallback simple overlay for non-home heroes */
  background: rgba(0, 0, 0, 0.45);
}

.hero-content {
    position: absolute;
    bottom: 10%;
    inset-inline: 0; /* left:0; right:0 — stretches to viewport */
    max-width: 42rem;
    padding-inline: var(--container-padding-x); /* match site grid */
  opacity: 0;
  transform: translateY(12px);
  animation: heroFadeUp 700ms cubic-bezier(0.2,0.8,0.2,1) 250ms forwards;
}

/* Responsive Hero Text */
@media (max-width: 768px) {
    .hero-content {
        bottom: 15%;
    padding: 0 1.25rem;
    }

  .hero-content h1 {
    font-size: 1.375rem; /* slightly smaller on mobile */
    line-height: 1.2;
    margin-bottom: .5rem;
  }

  .hero-content p {
    font-size: 0.95rem;
    margin-bottom: .75rem;
  }

  .hero-content .btn {
    height: 40px;
    min-width: 96px;
    padding: 0 0.9rem;
    font-size: 0.85rem;
  }
}

/* Animation used for hero content reveal */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content { animation: none; transform: none; }
}

/* Mobile-specific image and layout adjustments */
@media (max-width: 768px) {
  .hero-section { height: 75vh; } /* reduce hero height to show more image on smaller screens */
  .home-hero-slide { object-position: top center; } /* show upper part of image where important content usually sits */
  /* ensure the overlay is slightly stronger at the bottom on mobile */
  .home-hero-overlay { background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0.12) 65%, rgba(0,0,0,0) 100%); }

  /* Mobile: reduce hero heading size for home and other hero sections without using !important */
  section.relative.h-screen > .container .absolute h1.text-5xl,
  .hero-section h1.text-5xl {
    font-size: 1.25rem; /* slightly larger on mobile (~20px) */
    line-height: 1.18;
    margin-bottom: 0.5rem;
  }

  section.relative.h-screen > .container .absolute p,
  .hero-section p {
    font-size: 0.95rem;
  }
}

/* Sticky Filter Bar */
/* Responsive sticky filter bar: always below header */
#offersFilterBar {
    position: sticky;
    top: 5rem; /* header height: 80px */
    margin-top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
@media (max-width: 1024px) {
  #offersFilterBar {
    top: 4rem; /* mobile header height: 64px */
    margin-top: 0;
  }
}
@media (max-width: 768px) {
  #offersFilterBar {
    top: 64px; /* ensure below mobile header */
    margin-top: 0;
  }
}

/* Responsive filter/search bar layout */
#offersFilterBar .container,
#blogsFilterBar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
/* End filter/search bar layout fix */
#offersFilterBar form,
#blogsFilterBar form {
  flex: 2 1 400px;
  min-width: 0;
  max-width: 700px;
}
#offersFilterBar .relative,
#blogsFilterBar .relative {
  flex: 1 1 220px;
  min-width: 150px;
  max-width: 180px;
}
}
#offersFilterBar form,
#blogsFilterBar form {
  flex: 1 1 100%;
  min-width: 0;
}
#offersFilterBar .relative,
#blogsFilterBar .relative {
  flex: 1 1 220px;
  min-width: 150px;
  max-width: 180px;
}
@media (max-width: 768px) {
  #offersFilterBar .container,
  #blogsFilterBar .container {
    flex-direction: column;
    gap: 0.5rem;
  }
  #offersFilterBar form,
  #blogsFilterBar form {
    width: 100%;
    margin-bottom: 0.5rem;
    max-width: 100%;
  }
  #offersFilterBar .relative,
  #blogsFilterBar .relative {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.5rem;
  }
}
.search-suggestions {
  z-index: 30;
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 0.25rem;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-lg);
}
.filter-dropdown-list {
  z-index: 30;
}
.filter-dropdown-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}
.search-btn {
    height: 2rem;
    width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    border: none;
    outline: none;
    cursor: pointer;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
}
#offersSearchInput {
    padding-right: 2.5rem;
}

@media (max-width: 768px) {
    #offersFilterBar {
        top: 4rem; /* mobile header height: 64px */
    }
}

/* Offers Grid */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.offers-grid-cell { min-width: 0; }
@media (max-width: 1024px) {
    .offers-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .offers-grid { grid-template-columns: 1fr; }
}

/* Mobile Utilities */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* Airline Marquee Section */
.airline-marquee-section {
    background: #fff;
    width: 100%;
    overflow: hidden;
    border-top: 1px solid #f2f2f2;
    border-bottom: 1px solid #f2f2f2;
    padding: 2rem 0; /* Increased padding */
}

/* Smooth scroll for anchor navigation */
html {
  scroll-behavior: smooth;
}

.airline-marquee {
    /* Logos only: always scroll left-to-right. On RTL (Arabic) pages scrollLeft can
       only be 0 or negative, which froze the marquee (assets/js/components/marquee.js). */
    direction: ltr;
    display: flex;
    flex-direction: row;
    gap: 4rem; /* Increased gap */
    align-items: center;
    overflow-x: scroll;
    scroll-behavior: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Hide scrollbar for Chrome, Safari and Opera */
}
.airline-marquee::-webkit-scrollbar {
    display: none;
}

.airline-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 32px; /* Minimized logo size */
}

.airline-logo img {
    height: 32px; /* Minimized logo size */
    width: auto;
    object-fit: contain;
    display: block;
    user-select: none;
    pointer-events: none;
}

@media (max-width: 768px) {
    .airline-marquee-section {
        padding: 1.5rem 0; /* Increased mobile padding */
    }
    .airline-marquee {
        gap: 2rem; /* Increased mobile gap */
    }
    .airline-logo {
        height: 24px; /* Smaller on mobile */
    }
    .airline-logo img {
        height: 24px;
    }
}

@media (max-width: 768px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .hero-content {
    bottom: 15%;
    padding-inline: var(--container-padding-x-mobile); /* use mobile container token */
  }
  /* Remove hard-coded font sizes so global responsive tokens apply */
  .hero-content h1 { font-size: var(--fs-h1); line-height: var(--lh-heading); }
  .hero-content p  { font-size: var(--fs-body); }
  .hero-content .btn {
    height: 40px;
    min-width: 100px;
    padding: 0 1rem;
    font-size: 0.875rem; /* keep the control size you already chose */
  }
}

.top-offers__head {
  display:flex;
  flex-direction: column;
  align-items:flex-start; justify-content:space-between; gap: 1.5rem;
  margin-bottom: 1.25rem;
}
.top-offers__titles { max-width: 560px; }
.top-offers__subtitle { color: var(--color-muted); margin: .5rem 0 1rem; }
.top-offers__more { text-decoration: underline; color: var(--color-ink); }
.top-offers__controls { display:flex; gap:.5rem; }
.top-offers__nav {
  width:36px; height:36px; border-radius: var(--radius-full);
  border:1px solid #e5e7eb; background:#fff; cursor:pointer;
}
.top-offers__nav:disabled { opacity:.5; cursor:not-allowed; }
.top-offers__nav-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.25rem;
}
.top-offers__nav i {
  font-size: 1.25rem;
}
@media (max-width:768px){
  .latest-offers { padding-inline: 8px; }
  .top-offers__more-row { gap:0.5rem; }
}

.latest-offers {
  background: #F6F7F9;
  padding-inline: clamp(16px, 5vw, 32px);
  margin-top: 24px;
  padding-top: 16px;
  padding-bottom: 6px;
}
.latest-offers .row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.latest-offers .row::-webkit-scrollbar { display: none; }
.latest-offers .cell { flex: 0 0 300px; scroll-snap-align: start; }
.top-offers__more-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  width: 100%;
  margin-top: 0.5rem;
}

.blog-section {
  background: var(--color-light-bg);
}
.blog-slider__track {
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
  gap: 16px; /* Match offers card gap */
}
@media (max-width:768px){
  .blog-slider__track { gap: 8px; } /* Match mobile offers gap */
}

.blog-slider__track::-webkit-scrollbar { display: none; }
.blog-slider__nav {
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid #e5e7eb; background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.blog-slider__nav:disabled { opacity: .5; cursor: not-allowed; }
.blog-slider__nav-icon { font-size: 1.25rem; color: var(--color-primary); }
.blog-slider__line { position: relative; }
.blog-slider__line-active { left: 0; top: 0; height: 100%; width: 25%; }
@media (max-width:768px){
  .blog-section { padding: 2rem 0; }
  .blog-slider__track { gap: 12px; }
}

.testimonial-slider__track {
  display: flex;
  gap: 16px; /* Match offers/blog card gap */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.testimonial-slider__track::-webkit-scrollbar { display: none; }
.testimonial-slider__track > .blog-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
}
@media (max-width:768px){
  .testimonial-slider__track { gap: 8px; }
  .testimonial-slider__track > .blog-card { min-width: 220px; max-width: 90vw; }
}

.footer a {
  text-decoration: none;
}
.footer a:hover,
.footer a:focus {
  color: var(--color-white) !important;
  text-decoration: underline;
}

/* Gallery Slider Styles */
#gallerySlider {
  width: 100%;
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
#gallerySlider img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16/9;
  background: #fff;
  object-fit: cover;
}
#galleryDotIndicators {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}
#galleryDotIndicators span {
  width: 0.75rem;
  height: 0.75rem;
  background: rgba(0,0,0,0.2);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.3s;
}
#galleryDotIndicators span.bg-black {
  background: #111214;
}
@media (max-width: 768px) {
  #gallerySlider img {
    aspect-ratio: 16/9;
    height: auto;
  }
  .max-w-3xl {
    max-width: 100vw;
  }
}

/* Footer "join" buttons: let them wrap instead of pushing the page wider
   than the screen on tablets (768-1023px), which shifted Arabic pages sideways. */
.footer-join-actions {
  flex-wrap: wrap;
  max-width: 100%;
}
.footer-join-actions .btn { max-width: 100%; }
