/* ==========================================================================
   MARHABA TOURS & TRAVELS
   Structural design system, typography, layout, cards, animations, 
   responsive behavior, modal structure, and PDF presentation.
   File: src/css/style.css
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS & DIMENSIONS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  --content-width: 1200px;
  --nav-height: 76px;
  --transition: 0.25s ease;
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 25px 50px rgba(15, 23, 42, 0.14);
  --modal-shadow: 0 25px 70px rgba(2, 6, 23, 0.25);
}

/* ==========================================================================
   2. GLOBAL RESET & BASE STYLES
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

[x-cloak] {
  display: none !important;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
}

svg {
  flex-shrink: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  max-width: 100%;
}

button,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed !important;
  opacity: 0.6;
}

a {
  color: inherit;
}

section[id] {
  scroll-margin-top: 6rem;
}

.font-serif-title {
  font-family: 'Playfair Display', Georgia, serif;
}

:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary, #0284c7);
  outline-offset: 3px;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
}

h1, h2 {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Hero Typography Enhancements */
#main-hero .font-serif-title {
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif !important;
}

#main-hero h1 span.italic {
  font-style: italic !important;
}

/* ==========================================================================
   4. LOGO ASSETS & VISUAL TOGGLES
   ========================================================================== */

.site-logo {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  background: transparent;
}

.site-logo-sm {
  height: 2rem;
  width: auto;
  object-fit: contain;
}

.site-logo-lg {
  height: 3.5rem;
  width: auto;
  object-fit: contain;
}

.logo-on-dark,
.img-on-dark {
  display: none;
}

html.dark .logo-on-light,
html.dark .img-on-light {
  display: none;
}

html.dark .logo-on-dark {
  display: inline-block;
}

html.dark .img-on-dark {
  display: block;
}

html.dark .card-img:not(.img-on-dark) {
  filter: brightness(0.9) saturate(0.95);
}

/* ==========================================================================
   5. CONTAINERS & PAGE LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-wrapper {
  min-height: 85vh;
  padding-top: 6.5rem;
  padding-bottom: 4rem;
}

/* ==========================================================================
   6. NAVIGATION STRUCTURE
   ========================================================================== */

.glass-nav {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.glass-nav nav a {
  transition: color var(--transition);
}

.glass-nav .theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  transition: var(--transition);
}

.glass-nav .theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--primary);
  color: #ffffff !important;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.25);
}

/* ==========================================================================
   8. CARDS & INTERACTION EFFECTS
   ========================================================================== */

:root {
  --hover-gold: #d69e36;
  --hover-gold-glow: rgba(214, 158, 54, 0.24);
  --hover-gold-border: rgba(214, 158, 54, 0.85);
}

html.dark {
  --hover-gold: #fbbf24;
  --hover-gold-glow: rgba(251, 191, 36, 0.25);
  --hover-gold-border: rgba(251, 191, 36, 0.9);
}

/* Shared transition */
.svc-card,
.tour-card,
.package-card,
.hotel-card,
.testimonial-card,
.contact-card,
.contact-item-card,
.airline-logo-card,
.modal-card-accent,
.modal-item-card,
.modal-pricing-strip,
.modal-price-box-enhanced {
  position: relative;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease;
}

/* Gold outline and glow */
.svc-card:hover,
.tour-card:hover,
.package-card:hover,
.hotel-card:hover,
.testimonial-card:hover,
.contact-card:hover,
.contact-item-card:hover,
.airline-logo-card:hover,
.modal-card-accent:hover,
.modal-item-card:hover,
.modal-pricing-strip:hover,
.modal-price-box-enhanced:hover {
  border-color: var(--hover-gold-border) !important;

  box-shadow:
    0 0 0 1px var(--hover-gold-border),
    0 8px 24px var(--hover-gold-glow) !important;
}

/* Main website card lift */
.svc-card:hover,
.tour-card:hover,
.package-card:hover,
.hotel-card:hover,
.testimonial-card:hover,
.contact-card:hover,
.contact-item-card:hover,
.airline-logo-card:hover {
  transform: translateY(-4px);
}

/* Top Accent Line on Hover */
.svc-card::before,
.tour-card::before,
.package-card::before,
.hotel-card::before,
.testimonial-card::before,
.contact-card::before,
.contact-item-card::before,
.airline-logo-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent, #fbbf24), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 30;
  pointer-events: none;
}

.svc-card:hover::before,
.tour-card:hover::before,
.package-card:hover::before,
.hotel-card:hover::before,
.testimonial-card:hover::before,
.contact-card:hover::before,
.airline-logo-card:hover::before {
  opacity: 1;
}

/* Base Card Shell for Airline Logos (High-contrast surface fills + Logo expansion) */
.airline-logo-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
}

html.dark .airline-logo-card {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.airline-logo-card:hover {
  background-color: #ffffff !important;
}

.airline-logo-img {
  filter: none !important;
  opacity: 0.95;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.airline-logo-card:hover .airline-logo-img {
  opacity: 1;
  transform: scale(1.08);
}

/* ==========================================================================
   9. CARD GRIDS & LAYOUT MATRIX (CENTERED & UNIFORM)
   ========================================================================== */

/* Universal Scroll Track Buffer Padding (Prevents Hover Top Clipping) */
#service-cards,
#tour-cards,
#package-cards,
#hotel-cards,
#airline-cards,
#testimonials .relative {
  padding-top: 0.75rem !important;
  margin-top: -0.75rem !important;
  padding-bottom: 0.75rem !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#service-cards::-webkit-scrollbar,
#tour-cards::-webkit-scrollbar,
#package-cards::-webkit-scrollbar,
#hotel-cards::-webkit-scrollbar,
#airline-cards::-webkit-scrollbar {
  display: none;
}

/* Centered Row Matrix for < 4 Cards */
.card-row-centered {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 1.5rem !important;
  width: 100% !important;
}

.card-row-centered > * {
  flex: 0 0 280px !important;
  width: 280px !important;
}

@media (min-width: 640px) {
  .card-row-centered {
    justify-content: center !important;
  }

  .card-row-centered > * {
    flex: 0 1 320px !important;
    width: 320px !important;
    max-width: 340px !important;
  }
}

@media (min-width: 1024px) {
  .card-row-centered > * {
    width: calc(33.333% - 1rem) !important;
    max-width: 340px !important;
  }
}

/* Standard Grids for Exactly 3 or 4 Cards */
.card-grid-3,
.card-grid-4 {
  display: grid !important;
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  gap: 1.5rem !important;
  width: 100% !important;
}

@media (min-width: 640px) {
  .card-grid-3, .card-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1024px) {
  .card-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .card-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Horizontal Track for Overflow (> 4 Items) */
.carousel-track {
  display: flex !important;
  gap: 1.5rem !important;
  overflow-x: auto !important;
  scroll-behavior: smooth !important;
  scroll-snap-type: x mandatory;
}

.carousel-track > * {
  scroll-snap-align: start;
}

/* ==========================================================================
   10. CARD IMAGES & OVERLAYS
   ========================================================================== */

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.tour-card:hover .card-img,
.package-card:hover .card-img,
.hotel-card:hover .card-img {
  transform: scale(1.06);
}

.card-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.55) 65%, transparent);
  z-index: 10;
}

/* ==========================================================================
   11. SERVICE CARDS & GEOMETRIC PATTERN
   ========================================================================== */

.svc-card {
  position: relative;
  border-radius: 1.5rem !important;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.svc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  background-image: url('../images/bg/mtt-card-bg.png');
  background-position: center center;
  background-repeat: repeat;
  background-size: 130px auto;
  opacity: 0.45;
  filter: blur(0.5px);
  -webkit-filter: blur(0.5px);
  pointer-events: none;
  z-index: 1;
}

html.dark .svc-card::after {
  opacity: 0.25;
}

.svc-card > * {
  position: relative;
  z-index: 2;
}

/* SVG Badge Shell & Ring */
.svc-badge {
  position: relative;
  z-index: 2;
  width: 5.5rem !important;
  height: 5.5rem !important;
  margin: 0 auto 1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 9999px !important;
  background: radial-gradient(circle at 35% 28%, var(--ic-badge-1), var(--ic-badge-2)) !important;
  box-shadow: 0 0 0 1px var(--ic-ring), inset 0 0 12px var(--ic-ring) !important;
}

.svc-badge svg {
  width: 3.9rem !important;
  height: 3.9rem !important;
  display: block !important;
  overflow: visible !important;
}

/* SVG Color Mappings */
.svc-g1 { stop-color: var(--ic-g1); }
.svc-g2 { stop-color: var(--ic-g2); }
.svc-ink { stroke: var(--ic-line); }
.svc-fillc { fill: var(--ic-fill); }

.svc-fillink {
  fill: var(--ic-line);
  fill-opacity: 0.8;
}

/* Service Icon Animations */
.svc-fly { animation: svcFly 3.4s ease-in-out infinite; }
.svc-trail path { stroke-dasharray: 5 6; animation: svcDash 1.1s linear infinite; }
.svc-swoosh { stroke-dasharray: 110 50; animation: svcDash 5s linear infinite; }
.svc-orbit { opacity: 0.6; stroke-dasharray: 7 9; animation: svcDash 7s linear infinite reverse; }

.svc-needle {
  transform-origin: 48px 54px;
  animation: svcSwing 6s ease-in-out infinite;
}

.svc-crescent { animation: svcGlow 3.8s ease-in-out infinite; }

.svc-star {
  transform-box: fill-box;
  transform-origin: center;
  animation: svcTwinkle 2.6s ease-in-out infinite;
}

.svc-star.s2 { animation-delay: 1.1s; }

.svc-wins rect { animation: svcWindow 4.2s ease-in-out infinite; }
.svc-wins rect:nth-child(odd) { animation-delay: 0.7s; }
.svc-wins rect:nth-child(3n) { animation-delay: 1.9s; }
.svc-wins rect:nth-child(4n+1) { animation-delay: 2.8s; }

@keyframes svcFly {
  0%, 100% { transform: translate(-2px, 2px); }
  50% { transform: translate(3px, -3px); }
}

@keyframes svcDash {
  to { stroke-dashoffset: -160; }
}

@keyframes svcSwing {
  0%, 100% { transform: rotate(-16deg); }
  30% { transform: rotate(22deg); }
  55% { transform: rotate(-8deg); }
  80% { transform: rotate(10deg); }
}

@keyframes svcGlow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 5px rgba(2, 132, 199, 0.4)); }
}

@keyframes svcTwinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes svcWindow {
  0%, 100% { opacity: 0.25; }
  45%, 60% { opacity: 1; }
}

/* ==========================================================================
   12. MARKDOWN CONTENT RENDERER
   ========================================================================== */

.markdown-body {
  max-width: 850px;
  margin: 0 auto;
  padding: 1.75rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.markdown-body h1,
.markdown-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
}

.markdown-body h1 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

.markdown-body h2 {
  font-size: 1.4rem;
  margin-top: 1.75rem;
  margin-bottom: 0.85rem;
  border-bottom: 2px solid var(--line-soft);
  padding-bottom: 0.5rem;
}

.markdown-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.markdown-body p {
  line-height: 1.85;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.markdown-body li {
  margin-bottom: 0.6rem;
  line-height: 1.7;
}

.markdown-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 0.85rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.markdown-body th,
.markdown-body td {
  padding: 0.75rem;
  text-align: left;
}

/* ==========================================================================
   13. MODALS & DIALOG STYLES
   ========================================================================== */

.package-modal-overlay,
.tour-modal-overlay,
.modal-backdrop {
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.package-modal-card,
.tour-modal-card {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  border-radius: var(--radius-xl);
  box-shadow: var(--modal-shadow);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.tour-modal-card button,
.package-modal-card button {
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

.tour-modal-card button:active,
.package-modal-card button:active {
  transform: scale(0.98);
}

.modal-prose {
  line-height: 1.75;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.modal-prose h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.modal-prose h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
}

.modal-prose h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
}

.modal-prose h4,
.modal-prose h5,
.modal-prose h6 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.modal-prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.modal-prose strong,
.modal-prose b {
  font-weight: 700;
}

.modal-prose a {
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
  transition: color var(--transition);
}

.modal-prose ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0.75rem 0 1.25rem;
}

.modal-prose ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin: 0.75rem 0 1.25rem;
}

.modal-prose li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.modal-prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-prose th,
.modal-prose td {
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  text-align: left;
  border: 1px solid var(--line);
}

.modal-prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.modal-prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin: 1rem 0;
}

.modal-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
}

.modal-prose pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

/* ==========================================================================
   14. FORM FOCUS & VALIDATION POLISH
   ========================================================================== */

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  opacity: 0.7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

/* ==========================================================================
   15. PDF PREVIEW PRESENTATION & PRINT OVERRIDES (THEME ISOLATED)
   ========================================================================== */

#flyer-preview-scroll-container,
#welcome-preview-scroll-container,
html.dark #flyer-preview-scroll-container,
html.dark #welcome-preview-scroll-container {
  background-color: #f1f5f9 !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  overflow-x: hidden !important;
}

/* Outer Card Container */
#flyer-preview-scroll-container > div,
#welcome-preview-scroll-container > div {
  width: 100% !important;
  max-width: 816px !important;
  margin: 0 auto !important;
  background-color: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* PDF / Flyer Preview Presentation
   Keep the flyer at its native design dimensions. The preview shell applies
   responsive scaling; changing the capture target itself to width:100% or
   height:auto causes a second scale and breaks the two flyer aspect ratios. */
.pdf-flyer-template,
#pdf-flyer-capture-target {
  flex: 0 0 auto !important;
  max-width: none !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

#pdf-flyer-capture-target {
  display: block !important;
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
}

/* Welcome packet remains fluid; flyer capture dimensions are intentionally fixed. */
#pdf-welcome-capture-target {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  transform: none !important;
}

#pdf-flyer-capture-target *,
#pdf-welcome-capture-target * {
  box-sizing: border-box;
}

@media (max-width: 640px) {
  #flyer-preview-scroll-container,
  #welcome-preview-scroll-container {
    padding: 0.5rem !important;
  }

  #pdf-welcome-capture-target {
    padding: 20px 14px !important;
  }

  .flyer-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

/* SVG Scroll Progress Ring Integration */
#flyer-preview-scroll-container .scroll-progress-svg,
#welcome-preview-scroll-container .scroll-progress-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

#flyer-preview-scroll-container .scroll-progress-track,
#welcome-preview-scroll-container .scroll-progress-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 3;
}

#flyer-preview-scroll-container .scroll-progress-ring,
#welcome-preview-scroll-container .scroll-progress-ring {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 131.95; /* 2 * PI * 21 */
  stroke-dashoffset: 131.95;
  transition: stroke-dashoffset 100ms linear;
}

/* Print Overrides */
@media print {
  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
  }

  .glass-nav,
  footer,
  .scroll-to-top-btn,
  .theme-toggle,
  button {
    display: none !important;
  }

  .pdf-flyer-template,
  #pdf-flyer-capture-target,
  #pdf-welcome-capture-target {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }
}

/* ==========================================================================
   16. SCROLL-TO-TOP BUTTON
   ========================================================================== */

.scroll-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;
  padding: 0;

  border-radius: 9999px !important; /* Circular shell */
  aspect-ratio: 1 / 1;
  cursor: pointer;

  transition:
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    color 0.3s ease !important;
}

/* Hover Lift Effect */
.scroll-to-top-btn:hover {
  transform: translateY(-4px) scale(1.06) !important;
}

/* Progress SVG fills container */
.scroll-progress-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
  overflow: visible;
}

.scroll-progress-track {
  fill: none;
  stroke-width: 2;
  transition: stroke 0.3s ease;
}

/* Progress indicator ring */
.scroll-progress-ring {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 131.95;
  stroke-dashoffset: 131.95;
  transition: stroke-dashoffset 150ms linear, stroke 0.3s ease;
}

/* Centered icon */
.scroll-to-top-icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  pointer-events: none;
  transition: transform 0.25s ease, color 0.3s ease;
}

.scroll-to-top-btn:hover .scroll-to-top-icon {
  transform: translateY(-2px);
}

/* ==========================================================================
   17. THEME-AWARE SCROLLBARS
   ========================================================================== */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line, #cbd5e1) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--line, #cbd5e1);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--primary, #0284c7);
}

/* ==========================================================================
   18. RESPONSIVE BREAKPOINTS & MEDIA QUERIES
   ========================================================================== */

@media (max-width: 767px) {
  .glass-nav {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .glass-nav nav {
    gap: 0.75rem;
  }

  .glass-nav button {
    min-width: 40px;
    min-height: 40px;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .page-wrapper {
    padding-top: 5.5rem;
    padding-bottom: 3rem;
  }

  .tour-modal-card,
  .package-modal-card {
    padding: 1.25rem;
    border-radius: 1.25rem;
  }

  .card-grid-4,
  .card-grid-3 {
    gap: 1rem;
  }

  .scroll-to-top-btn {
    width: 44px;
    height: 44px;
    bottom: 1rem;
    right: 1rem;
  }

  #pdf-welcome-capture-target {
    padding: 20px !important;
    font-size: 12px;
  }

  #pdf-welcome-capture-target h1 {
    font-size: 20px !important;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .tour-modal-card,
  .package-modal-card {
    max-height: 88dvh;
  }
}

/* ==========================================================================
   19. ACCESSIBILITY & REDUCED MOTION OVERRIDES
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-to-top-btn,
  .svc-card,
  .tour-card,
  .package-card,
  .hotel-card,
  .testimonial-card,
  .contact-card {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   20. CAROUSEL CONTROLS
   ========================================================================== */

.carousel-btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.5rem !important;
  height: 2.5rem !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  border-radius: 9999px !important; /* Circular shape */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              color 0.3s ease !important;
  cursor: pointer !important;
  z-index: 20;
}

.carousel-btn svg,
.carousel-btn i {
  width: 1.25rem !important;
  height: 1.25rem !important;
  pointer-events: none !important;
  stroke-width: 2.25;
}