/* ===== HEADER STYLE for Packages Page ===== */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 20px rgba(0, 188, 212, 0.2);
  transition: all 0.4s ease;
}

/* ... (keep header.scrolled etc identical to your CSS) ... */

/* (full CSS as previously provided) */

/* I'll include the full CSS exactly as in the previous final solution to ensure consistency: */

/* Navigation Bar */
nav {
  max-width: 1200px;
  margin: auto;
  padding: 12px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-wrapper {
  display: flex;
  align-items: center;
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  transition: transform 0.4s ease;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.nav-menu ul {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav-menu ul li a {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.nav-menu ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #00bcd4, #0097a7);
  transition: width 0.3s ease;
}

.nav-menu ul li a:hover::after,
.nav-menu ul li a.active::after {
  width: 100%;
}

.nav-menu ul li a:hover {
  color: #00e5ff;
}

/* Sticky Scroll Animation */
@keyframes fadeDown {
  from {
    transform: translateY(-40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

header.scrolled {
  animation: fadeDown 0.5s ease;
}

/* ===== Mobile View ===== */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    text-align: center;
  }
  .nav-menu ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  .logo {
    width: 50px;
    height: 50px;
  }
}

/* 🎬 Hero 3D Parallax */
.hero-3d {
  position: relative;
  height: 480px;
  background: radial-gradient(circle at center, #0097a7 0%, #002f4b 100%);
  color: white; overflow: hidden; text-align: center;
  perspective: 1000px;
}
.aurora {
  position: absolute; width: 200%; height: 200%;
  background: conic-gradient(from 45deg, #00bcd4, #ff4081, #4caf50, #00bcd4);
  animation: aurora 12s linear infinite;
  opacity: 0.2; filter: blur(120px);
}
@keyframes aurora { to { transform: rotate(360deg); } }
.hero-text { position: relative; top: 150px; z-index: 3; }
.hero-text h1 { font-size: 3rem; letter-spacing: 2px; }
.hero-text span { background: linear-gradient(90deg, #ffeb3b, #ff5722); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
}
.hero-text p { font-size: 1.2rem; opacity: .9; }

.plane { font-size: 3rem; position: absolute; top: 60%; left: -10%; animation: flyAcross 10s linear infinite; }
@keyframes flyAcross {
  0% { left: -10%; top: 55%; transform: rotate(-10deg); }
  50% { left: 55%; top: 35%; transform: rotate(10deg); }
  100% { left: 110%; top: 55%; transform: rotate(-10deg); }
}
.cloud { position: absolute; background: #fff; opacity: 0.12; border-radius: 50%; animation: moveCloud 40s linear infinite; }
.cloud1 { width: 200px; height: 80px; top: 70px; left: 15%; }
.cloud2 { width: 250px; height: 100px; bottom: 60px; right: 10%; }
@keyframes moveCloud { from{transform:translateX(0);} to{transform:translateX(-100vw);} }

/* 🌈 Filter */
.filter-bar { text-align:center; padding:15px; position:sticky; top:0; z-index:50; background:rgba(255,255,255,0.1); backdrop-filter:blur(10px); }
.filter-btn {
  margin:5px; padding:10px 20px; border-radius:30px;
  border:2px solid #00acc1; background:white; color:#007c91;
  font-weight:600; transition:.3s; cursor:pointer;
}
.filter-btn.active, .filter-btn:hover {
  background:linear-gradient(90deg,#00bcd4,#0097a7); color:white;
  box-shadow:0 0 12px rgba(0,188,212,0.6); transform:scale(1.05);
}

/* 💎 Cards 3D */
.packages-3d { padding:60px 20px; background:#f0f8ff; }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:30px; max-width:1150px; margin:auto; }
.card-3d {
  position:relative; border-radius:18px; overflow:hidden;
  background:rgba(255,255,255,0.8); backdrop-filter:blur(10px);
  transform-style:preserve-3d; transition:transform 0.4s ease, box-shadow 0.4s;
  box-shadow:0 10px 20px rgba(0,0,0,0.15);
}
.card-3d:hover { transform:rotateY(8deg) scale(1.05); box-shadow:0 20px 35px rgba(0,188,212,0.3); }
.card-3d img { width:100%; height:200px; object-fit:cover; transition:transform 0.5s; }
.card-3d:hover img { transform:scale(1.1); }
.info { padding:18px; text-align:left; }
.info h3 { color:#007c91; margin-bottom:6px; }
.info p { color:#555; margin-bottom:8px; }
.info span { font-weight:600; color:#333; display:block; margin-bottom:10px; }
.book-btn {
  background:linear-gradient(90deg,#00bcd4,#0097a7);
  color:white; padding:8px 20px; border:none;
  border-radius:25px; cursor:pointer; transition:.3s;
}
.book-btn:hover { transform:scale(1.1); }

/* 💫 Shine */
.shine {
  position:absolute; top:-100%; left:-50%; width:80%; height:250%;
  background:linear-gradient(120deg,rgba(255,255,255,.2),rgba(255,255,255,.6),rgba(255,255,255,.2));
  transform:rotate(45deg); transition:.8s;
}
.card-3d:hover .shine { top:-20%; left:120%; }

/* 💬 Popup (existing booking popup) */
.popup-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.7);
  display:none; align-items:center; justify-content:center; z-index:1000;
}
.popup-box {
  background:white; border-radius:15px; padding:25px; text-align:center;
  width:90%; max-width:400px; animation:pop 0.5s ease; box-shadow:0 0 25px rgba(0,188,212,0.6);
}
.popup-box input { width:100%; margin:8px 0; padding:10px; border-radius:6px; border:1px solid #ccc; }
.popup-box button { margin:8px; padding:10px 22px; border:none; border-radius:25px; cursor:pointer; background:linear-gradient(90deg,#00bcd4,#0097a7); color:white; font-weight:600; }
@keyframes pop { from{transform:scale(0.7);opacity:0;} to{transform:scale(1);opacity:1;} }

/* 🌟 Scroll Reveal */
.card-3d { opacity:0; transform:translateY(40px); }
.card-3d.show { opacity:1; transform:translateY(0); transition:all 1s ease; }

.hero {
  padding-top: 100px; /* ताकि header के नीचे content छुपे नहीं */
}

/* --- Fix for header overlap --- */
.hero, .home-hero, .banner, .main-hero {
  margin-top: 100px; /* Header height के बराबर space */
  position: relative;
  z-index: 1;
}

/* ===========================
   PACKAGE DETAILS EMPTY MODAL + SCROLL & ACTIONS (Option 1)
   =========================== */

/* Backdrop covering viewport and centering the modal */
.package-modal-backdrop{
  position: fixed !important;
  inset: 0;
  display: none;                 /* shown by JS as 'flex' */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  z-index: 99999;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

/* Modal box: narrower and more square with fixed layout */
/* --- Modal size & internal scrolling fix --- */

/* Constrain modal overall size so it never exceeds viewport height */
.package-modal {
  /* keep width rules from before, but constrain height */
  width: min(560px, 90%);
  max-width: 560px;

  /* Prevent modal from growing past 80% of the viewport height */
  max-height: calc(80vh - 40px); /* leaves some gap top/bottom */
  height: auto;            /* allow it to shrink if content is small */
  display: flex;
  flex-direction: column;

  overflow: hidden;        /* important: page shouldn't scroll here */
  box-sizing: border-box;
}

/* Make the content area scrollable inside the modal */
.package-modal .modal-content {
  overflow: auto;          /* THIS allows internal scrolling */
  -webkit-overflow-scrolling: touch;
  padding-right: 8px;      /* space for scrollbar so text doesn't touch edge */

  /* ensure modal-content doesn't exceed the modal height:
     subtract space taken by header / close button / action area */
  max-height: calc(80vh - 140px); /* adjust 140px if your header/actions are taller */
}

/* Fullscreen mode: allow bigger height but still constrained */
.package-modal.fullscreen {
  width: 96vw !important;
  max-width: 1400px !important;
  max-height: calc(94vh - 20px) !important;
  min-height: unset;
  padding: 18px;
}

.package-modal.fullscreen .modal-content {
  max-height: calc(94vh - 140px) !important;
}

/* small screen tweak */
@media (max-width: 420px) {
  .package-modal {
    width: 92%;
    max-width: none;
    max-height: calc(92vh - 24px);
  }
  .package-modal .modal-content {
    max-height: calc(92vh - 120px);
  }
}


/* action/footer area (created by JS) */
.package-modal .modal-actions {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-top:8px;
}

/* Expand/fullscreen mode */
.package-modal.fullscreen {
  width: 96vw !important;
  max-width: 1400px !important;
  min-height: 76vh !important;
  border-radius: 10px;
  padding: 18px;
}
.package-modal-backdrop.fullscreen {
  align-items: flex-start;
  padding-top: 18px;
}

/* Close button top-right */
.package-modal .modal-close{
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: #444;
  cursor: pointer;
  align-self: flex-end;
  padding: 6px;
}

/* Prevent background scroll when modal open */
body.modal-open { overflow: hidden; touch-action: none; }

/* responsive tweaks */
@media (max-width: 420px) {
  .package-modal { width: min(92%, 420px); min-height: 380px; padding: 12px; }
  .package-modal .modal-close { font-size: 20px; }
}

/* hide card details blocks (if you used inline style earlier you can remove it) */
.card-3d .details { display: none; }

/* Prevent modal/backdrop transforms from being affected by parent's transform */
.package-modal-backdrop, .package-modal { will-change: transform; }


/* === FIX: make modal background solid white (no transparency) === */
.package-modal {
  background: #ffffff !important; /* solid white */
  color: #111 !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

/* Make sure text inside is clearly visible */
.package-modal .modal-content {
  background: #ffffff !important;
  color: #111 !important;
}

/* Optional: slight border for better separation from backdrop */
.package-modal {
  border: 2px solid rgba(0, 0, 0, 0.1);
}

/* Optional tweak: backdrop stays dim, modal stays opaque */
.package-modal-backdrop {
  background: rgba(0, 0, 0, 0.65); /* darker backdrop for contrast */
}

/* ===========================
   End of CSS
   =========================== */
