/* ==========================================================================
   RESERVAS MACHUPICCHU - MEGA-BUSCADOR MULTIPRODUCTO (5 PRODUCTOS)
   1. Bus a Machu Picchu
   2. Trenes (PeruRail & Inca Rail)
   3. Traslados Privados & Compartidos
   4. Guías Oficiales de Turismo
   5. Entradas Oficiales Machu Picchu (MinCul 2026)
   ========================================================================== */

/* Main Container Card */
.mega-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 1340px;
  margin: -40px auto 40px auto;
  z-index: 30;
}

.mega-search-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.9);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.mega-search-card:hover {
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.12);
}

/* Tabs Bar */
.mega-tabs-header {
  display: flex;
  background: #f1f5f9;
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mega-tabs-header::-webkit-scrollbar {
  display: none;
}

.mega-tab-btn {
  flex: 1;
  min-width: 170px;
  padding: 1.15rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #475569;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 0.98rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
}

.mega-tab-btn i {
  font-size: 1.15rem;
  color: #64748b;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mega-tab-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #1e6964;
}

.mega-tab-btn:hover i {
  transform: translateY(-2px);
  color: #1e6964;
}

.mega-tab-btn.active {
  background: #ffffff;
  color: #1e6964;
  border-bottom-color: #f69c0f;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
}

.mega-tab-btn.active i {
  color: #1e6964;
}

.mega-tab-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mega-tab-badge.badge-discount {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  animation: pulseBadge 2.2s infinite;
}

.mega-tab-badge.badge-official {
  background: #e8f3f2;
  color: #1e6964;
  border: 1px solid #bce1dd;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Tab Panels Container */
.mega-tabs-body {
  padding: 1.75rem 2rem 2rem;
}

.mega-tab-panel {
  display: none;
  animation: megaFadeIn 0.28s ease-out;
}

.mega-tab-panel.active {
  display: block;
}

@keyframes megaFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Panel Header Info Strip */
.panel-top-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.panel-title-area h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title-area p {
  font-size: 0.88rem;
  color: #64748b;
  margin: 2px 0 0;
}

.panel-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

/* Trip Type Selector (Trains & Transfers) */
.trip-type-selector {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.trip-type-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  user-select: none;
}

.trip-type-label input[type="radio"] {
  accent-color: #1e6964;
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.trip-type-label .badge-mini-discount {
  background: #f69c0f;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Grid Layouts */
.mega-grid-form {
  display: grid;
  gap: 1rem;
  align-items: end;
}

.mega-grid-bus {
  grid-template-columns: 1.3fr 1fr 1.1fr 170px;
}

.mega-grid-trains {
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr 1.25fr 175px;
}

.mega-grid-transfers {
  grid-template-columns: 1.2fr 48px 1.2fr 1fr 1fr 170px;
}

.mega-grid-guides {
  grid-template-columns: 1.1fr 1.1fr 1.1fr 1fr 1fr 170px;
}

.mega-grid-tickets {
  grid-template-columns: 1.6fr 1.2fr 1fr 1.1fr 170px;
}

/* Responsive Grid Breakpoints */
@media (max-width: 1080px) {
  .mega-grid-trains,
  .mega-grid-transfers,
  .mega-grid-guides,
  .mega-grid-tickets,
  .mega-grid-bus {
    grid-template-columns: repeat(2, 1fr);
  }
  .mega-grid-transfers .swap-btn-col {
    display: none;
  }
}

@media (max-width: 640px) {
  .mega-tabs-body {
    padding: 1.25rem 1rem 1.5rem;
  }
  .mega-grid-trains,
  .mega-grid-transfers,
  .mega-grid-guides,
  .mega-grid-tickets,
  .mega-grid-bus {
    grid-template-columns: 1fr;
  }
  .mega-tab-btn {
    min-width: 140px;
    padding: 0.9rem 0.6rem;
    font-size: 0.88rem;
  }
}

/* Input Fields & Wrappers */
.mega-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mega-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mega-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.mega-input-wrap:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.mega-input-wrap:focus-within {
  border-color: #1e6964;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(30, 105, 100, 0.15);
}

.mega-input-icon {
  position: absolute;
  left: 0.75rem;
  color: #64748b;
  font-size: 0.95rem;
  pointer-events: none;
}

.mega-input-chevron {
  position: absolute;
  right: 0.65rem;
  color: #94a3b8;
  font-size: 0.8rem;
  pointer-events: none;
}

.mega-input {
  width: 100%;
  height: 50px;
  padding: 0 1.6rem 0 2.2rem;
  border: none;
  background: transparent;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  outline: none;
}

.mega-input.select-custom {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.mega-input.select-custom optgroup {
  font-weight: 700;
  color: #1e6964;
  background: #f1f5f9;
}

.mega-input.select-custom option {
  font-weight: 500;
  color: #1e293b;
  background: #ffffff;
}

/* Swap Button for Transfers */
.swap-btn-col {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
}

.swap-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #1e6964;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.swap-btn:hover {
  background: #1e6964;
  color: #ffffff;
  border-color: #1e6964;
  transform: rotate(180deg);
}

/* Action Buttons */
.mega-btn-submit {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: #1e6964;
  color: #ffffff;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(30, 105, 100, 0.3);
}

.mega-btn-submit:hover {
  background: #144e4a;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 105, 100, 0.45);
}

.mega-btn-submit.btn-accent {
  background: #f69c0f;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(246, 156, 15, 0.35);
}

.mega-btn-submit.btn-accent:hover {
  background: #e08906;
  box-shadow: 0 8px 20px rgba(246, 156, 15, 0.5);
}

/* Price Preview Bar in Tickets & Services */
.ticket-pricing-preview {
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ticket-pricing-preview .preview-left {
  font-size: 0.88rem;
  color: #475569;
}

.ticket-pricing-preview .preview-left strong {
  color: #0f172a;
}

.ticket-pricing-preview .preview-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.preview-price-tag {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e6964;
}

/* Notice & Error Box */
.mega-notice {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  align-items: center;
  gap: 0.5rem;
}

.mega-notice.error {
  display: flex;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ==========================================================================
   RESULTS DRAWER / MODAL STYLES (Trains, Transfers, Guides, Tickets)
   ========================================================================== */
.mega-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.25s ease-out;
}

.mega-modal-overlay.open {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mega-modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.mega-modal-header {
  padding: 1.25rem 1.75rem;
  background: #1e6964;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mega-modal-header h3 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mega-modal-close {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mega-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.mega-modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}

/* Train Card in Results */
.train-result-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  transition: all 0.2s ease;
  background: #ffffff;
}

.train-result-card:hover {
  border-color: #1e6964;
  box-shadow: 0 4px 16px rgba(30, 105, 100, 0.08);
}

.train-company-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.train-company-badge.perurail {
  background: #dbeafe;
  color: #1e40af;
}

.train-company-badge.incarail {
  background: #fef3c7;
  color: #92400e;
}

.train-service-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
}

.train-time-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-heading, 'Outfit', sans-serif);
}

.train-time-node {
  text-align: center;
}

.train-time-node .time {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.train-time-node .station {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
}

.train-duration-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #94a3b8;
  font-size: 0.75rem;
}

.train-duration-line {
  width: 70px;
  height: 2px;
  background: #cbd5e1;
  position: relative;
  margin: 3px 0;
}

.train-duration-line::after {
  content: '🚆';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
}

.train-price-select {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.train-price-amount {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e6964;
}

/* Guide Card in Results */
.guide-card-result {
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #ffffff;
  transition: all 0.2s ease;
}

.guide-card-result:hover {
  border-color: #1e6964;
  box-shadow: 0 6px 18px rgba(30, 105, 100, 0.1);
}

.guide-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #1e6964;
}

.guide-info {
  flex: 1;
}

.guide-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.guide-rating {
  color: #f69c0f;
  font-size: 0.85rem;
  font-weight: 700;
}

.guide-languages {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.lang-pill {
  font-size: 0.72rem;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  color: #475569;
}

/* Passenger Checkout Form in Modal */
.passenger-form-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.passenger-form-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e6964;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.passenger-inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .passenger-inputs-grid {
    grid-template-columns: 1fr;
  }
}

.pass-field input,
.pass-field select {
  width: 100%;
  height: 42px;
  padding: 0 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.88rem;
  background: #ffffff;
}

.pass-field input:focus,
.pass-field select:focus {
  border-color: #1e6964;
  outline: none;
}

.pass-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.25rem;
}

/* Checkout Summary Strip */
.checkout-summary-box {
  background: #e8f3f2;
  border: 1px solid #bce1dd;
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  margin-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.summary-details h4 {
  font-size: 1.1rem;
  color: #0f172a;
  margin: 0;
}

.summary-details p {
  font-size: 0.85rem;
  color: #475569;
  margin: 2px 0 0;
}

.summary-price-zone {
  text-align: right;
}

.summary-total-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.summary-total-val {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.7rem;
  font-weight: 800;
  color: #1e6964;
}

