/* === MYTRIV BOOK DESIGN SYSTEM (MATCHING EDU.MYTRIV.COM BRANDING) === */
:root {
  --primary-blue: #2563EB;
  --primary-indigo: #3730A3;
  --brand-gradient: linear-gradient(135deg, #2563EB 0%, #3730A3 100%);
  --accent-amber: #F59E0B;
  --accent-amber-hover: #D97706;
  --cta-gradient: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  
  --bg-dark: #070D19;
  --bg-surface: #0F172A;
  --bg-card: #1E293B;
  --bg-card-hover: #26334D;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(37, 99, 235, 0.4);

  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --text-sub: #CBD5E1;
  --font-family: -apple-system, BlinkMacSystemFont, 'Geist', 'Segoe UI', Roboto, sans-serif;
}

body.light-theme {
  --bg-dark: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --border-color: #E2E8F0;
  --border-highlight: rgba(37, 99, 235, 0.25);

  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-sub: #334155;
}

body.light-theme .book-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: #E2E8F0;
}

body.light-theme .hero-title {
  background: linear-gradient(90deg, #0F172A, #1E40AF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .search-card {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body.light-theme .search-input-group {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

body.light-theme .search-input-group input,
body.light-theme .search-input-group select {
  color: #0F172A;
}

body.light-theme .section-title {
  color: #0F172A;
}

body.light-theme .hotel-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .hotel-title {
  color: #0F172A;
}

body.light-theme .amenity-pill {
  background: #F1F5F9;
  color: #475569;
}

body.light-theme .compare-modal-content {
  background: #FFFFFF;
}

body.light-theme .ota-row {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

body.light-theme .ota-row strong {
  color: #0F172A !important;
}

body.light-theme details summary {
  color: #0F172A !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* HEADER */
.book-header {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}
.logo-box {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-badge {
  background: var(--brand-gradient);
  color: #FFF;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 16px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}
.logo-title {
  color: var(--text-main);
  font-weight: 800;
  font-size: 18px;
}
.logo-title span {
  color: #60A5FA;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}
.nav-item a {
  color: var(--text-sub);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s;
}
.nav-item a:hover, .nav-item a.active {
  color: #60A5FA;
}
.btn-cta-amber {
  background: var(--cta-gradient);
  color: #000;
  font-weight: 800;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-cta-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.theme-toggle-btn:hover {
  border-color: var(--primary-blue);
}

/* HERO SEARCH SECTION */
.hero-section {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.15) 0%, rgba(7, 13, 25, 0) 100%);
  padding: 50px 0 30px;
  text-align: center;
}
.hero-title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #FFFFFF, #93C5FD);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 620px;
  margin: 0 auto 24px;
}

/* SEARCH CARD */
.search-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: 16px;
  padding: 24px;
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.search-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 15px;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.tab-btn.active {
  background: var(--brand-gradient);
  color: #FFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.search-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}
.search-input-group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: left;
  position: relative;
}
.search-input-group label {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.search-input-group input, .search-input-group select {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 14px;
  outline: none;
}

/* AUTOCOMPLETE DROPDOWN */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  margin-top: 6px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 500;
  display: none;
}
.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}
.autocomplete-item:hover {
  background: var(--bg-card-hover);
}
.autocomplete-item strong {
  color: var(--text-main);
  font-size: 14px;
}
.autocomplete-item small {
  color: var(--text-muted);
  font-size: 12px;
}

/* SECTION TITLES */
.section-title-box {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 30px 0 20px;
}
.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* FULLSCREEN MAP OVERRIDES */
.map-wrapper {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-highlight);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
}
.map-wrapper.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  border-radius: 0 !important;
  border: none !important;
}
.map-fullscreen-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  color: #FFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}
.map-fullscreen-btn:hover {
  transform: scale(1.05);
  border-color: var(--primary-blue);
}

/* CUSTOM GLOWING HOTEL PINS */
.hotel-pin-badge {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 14px;
  border: 2px solid #FFFFFF;
  font-weight: 900;
  font-size: 11px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}
.hotel-pin-badge:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #000;
}

/* QUICK FILTER PILLS */
.filter-pills-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.filter-pill:hover, .filter-pill.active {
  background: var(--brand-gradient);
  color: #FFF;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* POPULAR DESTINATIONS GRID */
.destinations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.dest-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  height: 190px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
}
.dest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}
.dest-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dest-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(7, 13, 25, 0.9) 100%);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.dest-name {
  color: #FFF;
  font-weight: 800;
  font-size: 18px;
}
.dest-info {
  color: #93C5FD;
  font-size: 12px;
  margin-top: 2px;
}

/* HOTEL CARDS GRID */
.hotels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.hotel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
}
.hotel-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-blue);
}
.hotel-img-box {
  position: relative;
  height: 190px;
}
.hotel-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hotel-badge-rating {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #34D399;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
}
.hotel-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.hotel-title {
  color: var(--text-main);
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 4px;
}
.hotel-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.hotel-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.amenity-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-sub);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
}
.hotel-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.price-label {
  color: var(--text-muted);
  font-size: 11px;
}
.price-val {
  color: #34D399;
  font-weight: 900;
  font-size: 18px;
}

/* COMPARE DRAWER MODAL */
.compare-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 25, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.compare-modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.compare-header {
  background: var(--brand-gradient);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.compare-title {
  color: #FFF;
  font-weight: 900;
  font-size: 18px;
}
.compare-body {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.ota-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .compare-body {
    grid-template-columns: 1fr;
  }
  .search-form-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 28px;
  }
  .nav-menu {
    display: none;
  }
}


/* === LEAFLET CUSTOM PIN FIX & FLOATING MAP SEARCH BAR === */
.custom-pin-wrapper {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
  width: auto !important;
  height: auto !important;
}

.map-floating-search {
  position: absolute;
  top: 12px;
  left: 56px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 240, 255, 0.4);
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  max-width: 420px;
  width: calc(100% - 120px);
}
.map-select-row {
  display: flex;
  gap: 6px;
}
.map-select-row .map-select {
  flex: 1;
  min-width: 0;
}
.map-search-row {
  display: flex;
  gap: 6px;
}
.map-search-row .map-text-input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #FFF;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  outline: none;
  min-width: 0;
}
.map-search-row .map-text-input::placeholder {
  color: rgba(255,255,255,0.45);
  font-weight: 400;
}
.map-search-row .map-search-btn {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFF;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.map-search-row .map-search-btn:hover {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #000;
}
.map-floating-search .map-select {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: #FFF;
  font-weight: 700;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.map-floating-search .map-select option {
  background: #1e293b;
  color: #FFF;
  font-weight: 400;
  font-size: 12px;
  padding: 4px;
}

/* === BATCH 1: CAR RENTAL, TRANSFER, ACTIVITIES STYLES === */

/* Tab responsive overflow for 5 tabs */
.search-tabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.search-tabs::-webkit-scrollbar {
  display: none;
}
.tab-btn {
  flex-shrink: 0;
}

/* Service result embed sections */
#car-results-wrap,
#transfer-results-wrap,
#activities-results-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Service tab icons on mobile */
@media (max-width: 640px) {
  .tab-btn {
    font-size: 12px;
    padding: 6px 10px;
    gap: 4px;
  }
  .search-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Service-specific search form two-column layout */
.search-form-grid.transfer-grid {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* Transfer from/to paired inputs */
.transfer-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Service badge/header for result wraps */
.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.service-header-title {
  color: var(--text-main);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-partner-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

/* Loading spinner for service searches */
.service-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
  gap: 12px;
}
.service-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
