/* ==========================================================================
   TIMEBUS — Premium Travel Design System & Stylesheet
   Brand: TIMEBUS ("Your Time. Your Journey.")
   ========================================================================== */

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

:root {
  --primary: #0f172a;
  /* Deep slate navy */
  --primary-light: #1e293b;
  --brand-blue: #2563eb;
  /* Electric blue */
  --brand-blue-hover: #1d4ed8;
  --secondary: #0d9488;
  /* Teal */
  --secondary-light: #14b8a6;
  --accent: #f97316;
  /* Energetic travel orange */
  --accent-hover: #ea580c;
  --accent-light: #fff7ed;
  --background: #f8fafc;
  /* Light neutral canvas */
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --info: #0ea5e9;
  --info-bg: #f0f9ff;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Resets */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#root,
main {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Global Container */
.container {
  width: 100% !important;
  max-width: 1240px !important;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  box-sizing: border-box;
}

.site-header .container {
  width: 100% !important;
  max-width: none !important;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.98);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 40px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.brand-logo:hover .brand-logo-img {
  transform: translateY(-1px);
}

.brand-logo-img.footer-logo {
  height: 44px;
  max-width: 185px;
}

@media (max-width: 768px) {
  .brand-logo-img {
    height: 32px;
    max-width: 135px;
  }
}

@media (max-width: 360px) {
  .brand-logo-img {
    height: 28px;
    max-width: 120px;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
  padding: 0.35rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-blue);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--brand-blue);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--primary);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 99;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Drawer Auth Navigation Items */
.mobile-nav-auth-item {
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

.mobile-auth-link {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  min-height: 44px;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}

.mobile-auth-link.login-state {
  color: var(--brand-blue) !important;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.mobile-auth-link.login-state:hover,
.mobile-auth-link.login-state:active {
  background: rgba(37, 99, 235, 0.12);
  transform: translateX(2px);
}

.mobile-auth-link.account-state {
  color: var(--primary) !important;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.mobile-auth-link.account-state:hover,
.mobile-auth-link.account-state:active {
  background: #ffffff;
  border-color: var(--brand-blue);
  transform: translateX(2px);
}

.mobile-drawer-auth-bottom {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Buttons & UI Elements
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-blue) 0%, #1e40af 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #c2410c 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #ea580c 0%, #9a3412 100%);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: #cbd5e1;
}

.btn-outline {
  background: transparent;
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.btn-outline:hover {
  background: rgba(37, 99, 235, 0.06);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success {
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-warning {
  background: var(--warning-bg);
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-danger {
  background: var(--danger-bg);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-primary {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-rating {
  background: #059669;
  color: #ffffff;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

/* ==========================================================================
   Hero & Search Card
   ========================================================================== */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #0b1329 0%, #1e293b 50%, #0f172a 100%);
  color: #ffffff;
  padding: 5rem 0 6.5rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -15%;
  right: 0;
  width: 500px;
  max-width: 100%;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, rgba(13, 148, 136, 0.15) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(50px);
}

.hero-title {
  color: #ffffff;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: #94a3b8;
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.search-box-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 10;
  color: var(--text);
}

.search-fields-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr auto;
  align-items: center;
  gap: 1rem;
}

.field-group {
  position: relative;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  transition: var(--transition);
}

.field-group:focus-within {
  border-color: var(--brand-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.field-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  outline: none;
}

.swap-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--brand-blue);
  transition: var(--transition);
  margin-top: 0.2rem;
}

.swap-btn:hover {
  background: var(--brand-blue);
  color: #ffffff;
  transform: rotate(180deg);
}

/* City / Administrative Hierarchy Autocomplete Dropdown */
.autocomplete-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-height: 320px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  list-style: none;
  padding: 0.25rem 0;
  min-width: 280px;
}

.autocomplete-list.open {
  display: block;
}

.autocomplete-item {
  padding: 0.65rem 1rem;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  font-size: 0.925rem;
  color: var(--text);
  border-bottom: 1px solid #f1f5f9;
  box-sizing: border-box;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: #eff6ff;
}

.autocomplete-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  display: inline-block;
}

.autocomplete-badge.sub-district {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.autocomplete-badge.village {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.autocomplete-badge.city {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.autocomplete-badge.district {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.autocomplete-hierarchy {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.3;
  word-break: break-word;
}

/* ==========================================================================
   Full-Screen Location & Bus Stop Search Modal (Mobile-First)
   ========================================================================== */
.location-search-modal {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.loc-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.loc-modal-back-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  min-width: 44px;
  min-height: 44px;
}

.loc-modal-back-btn:hover {
  background: var(--surface-alt);
}

.loc-modal-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.loc-search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.loc-modal-input {
  width: 100%;
  height: 48px;
  padding: 0.5rem 2.5rem 0.5rem 2.6rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  outline: none;
  box-sizing: border-box;
}

.loc-modal-input:focus {
  border-color: var(--brand-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.loc-modal-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loc-filter-chips {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  overflow-x: auto;
  scrollbar-width: none;
}

.loc-filter-chips::-webkit-scrollbar {
  display: none;
}

.loc-chip {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.loc-chip.active {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

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

.loc-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 1rem 0 0.5rem;
}

.loc-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.loc-result-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  border-radius: var(--radius-md);
  min-height: 52px;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.loc-result-row:hover,
.loc-result-row:active {
  background: #eff6ff;
}

.loc-icon-bubble {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.15rem;
}

.loc-icon-bubble.transport {
  background: #eff6ff;
  color: var(--brand-blue);
}

.loc-icon-bubble.location {
  background: #f1f5f9;
  color: #475569;
}

.loc-row-info {
  flex: 1;
  min-width: 0;
}

.loc-row-name-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.loc-row-name {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
}

.loc-row-hierarchy {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.3;
}

.loc-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: capitalize;
  display: inline-block;
}

.loc-badge.bus_terminal {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.loc-badge.bus_station {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.loc-badge.bus_stop {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.loc-badge.city {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.loc-badge.town {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.loc-badge.village {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.loc-badge.locality {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.loc-badge.subdistrict {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.loc-badge.district {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.loc-badge.landmark {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ==========================================================================
   Home Page Grids & Content Cards
   ========================================================================== */
.popular-routes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.route-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.route-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.route-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.route-card-info {
  min-width: 0;
  flex: 1;
}

.route-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
  word-break: break-word;
}

.route-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

.route-card-rating {
  flex-shrink: 0;
}

.route-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px dashed var(--border);
  padding-top: 1rem;
  margin-top: auto;
}

.route-card-price-wrap {
  min-width: 0;
}

.route-card-price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.route-card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.route-card-footer .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.destinations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  width: 100%;
}

/* Destination Cards Real Photography */
.destination-card {
  height: 280px;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background-size: cover;
  background-repeat: no-repeat;
  width: 100%;
  box-sizing: border-box;
}

.destination-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.destination-card-goa {
  background: linear-gradient(to top,
      rgba(15, 23, 42, 0.85) 0%,
      rgba(15, 23, 42, 0.35) 50%,
      rgba(15, 23, 42, 0.15) 100%),
    url('../images/goa-beach.jpg');
  background-size: cover;
  background-position: center center;
}

.destination-card-manali {
  background: linear-gradient(to top,
      rgba(15, 23, 42, 0.85) 0%,
      rgba(15, 23, 42, 0.35) 50%,
      rgba(15, 23, 42, 0.15) 100%),
    url('../images/manali-mountains.jpg');
  background-size: cover;
  background-position: center 30%;
}

.destination-card-jaipur {
  background: linear-gradient(to top,
      rgba(15, 23, 42, 0.85) 0%,
      rgba(15, 23, 42, 0.35) 50%,
      rgba(15, 23, 42, 0.15) 100%),
    url('../images/jaipur-hawa-mahal.jpg');
  background-size: cover;
  background-position: center 20%;
}

.destination-card-mysore {
  background: linear-gradient(to top,
      rgba(15, 23, 42, 0.85) 0%,
      rgba(15, 23, 42, 0.35) 50%,
      rgba(15, 23, 42, 0.15) 100%),
    url('../images/mysore-palace.jpg');
  background-size: cover;
  background-position: center center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.chips-carousel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.chips-carousel::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   Bus Cards & Listings
   ========================================================================== */
.bus-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.bus-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.bus-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.operator-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.bus-type-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.journey-timeline {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  margin: 1.25rem 0;
  padding: 1rem 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.time-point {
  text-align: left;
}

.time-point.arrival {
  text-align: right;
}

.time-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

.city-value {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-track {
  position: relative;
  text-align: center;
}

.timeline-line {
  height: 2px;
  background: #cbd5e1;
  position: relative;
  margin-bottom: 0.4rem;
}

.timeline-line::after {
  content: '';
  position: absolute;
  right: 0;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-blue);
}

.duration-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.bus-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.amenities-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.amenity-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.price-cta-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.fare-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.original-price {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: 0.35rem;
}

/* ==========================================================================
   Seat Selection Page Layout & Components
   ========================================================================== */
.booking-step-bar {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  width: 100%;
}

.step-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  width: 100%;
}

.step-bar-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}

.step-bar-back:hover {
  color: var(--brand-blue);
}

.step-bar-steps {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.step-bar-step-active {
  font-weight: 700;
  color: var(--brand-blue);
}

.step-bar-step-muted {
  color: var(--text-muted);
}

.step-bar-arrow {
  color: var(--text-light);
}

.step-bar-step-done {
  font-weight: 600;
  color: var(--success);
}

/* ==========================================================================
   Passenger Details Page Layout & Responsive Grid
   ========================================================================== */
.passenger-main-container {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  width: 100%;
  box-sizing: border-box;
}

.passenger-layout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.passenger-forms-col {
  min-width: 0;
  width: 100%;
}

.passenger-sidebar-col {
  min-width: 0;
  width: 100%;
}

.passenger-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.passenger-fields-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Payment Page Layout & Responsive Single-Column Flow
   ========================================================================== */
.header-security-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.payment-main-container {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  width: 100%;
  box-sizing: border-box;
}

.payment-wrapper {
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.payment-demo-alert {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.payment-demo-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-demo-text {
  flex: 1;
  min-width: 0;
}

.payment-layout-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.payment-methods-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.payment-methods-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
}

.payment-method-tab {
  justify-content: flex-start !important;
  text-align: left !important;
  font-size: 0.9rem !important;
  width: 100% !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.payment-details-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.payment-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.payment-banks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Booking Confirmation Page & Responsive Action Buttons
   ========================================================================== */
.confirmation-main-container {
  padding-top: 3rem;
  padding-bottom: 4rem;
  width: 100%;
  box-sizing: border-box;
}

.confirmation-wrapper {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.confirmation-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.confirmation-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.confirmation-action-btn {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.confirmation-dashboard-btn {
  width: 100%;
  text-align: center;
  min-height: 44px;
  box-sizing: border-box;
}

.confirmation-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  font-size: 0.925rem;
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Mobile Home Page Components: Promo, Offer, Ask RAY, Bottom Nav
   ========================================================================== */
.mobile-promo-banner {
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.promo-banner-card {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.promo-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ea580c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promo-text-wrap {
  flex: 1;
  min-width: 0;
}

.promo-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #9a3412;
  line-height: 1.3;
}

.promo-subtitle {
  font-size: 0.8rem;
  color: #c2410c;
  margin-top: 0.15rem;
  line-height: 1.3;
}

.promo-arrow {
  color: #ea580c;
  flex-shrink: 0;
}

.mobile-offer-banner {
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.offer-banner-card {
  background: #ffffff;
  border: 1.5px dashed #2563eb;
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

.offer-badge-tag {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}

.offer-content-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.offer-icon-tag {
  color: #2563eb;
  flex-shrink: 0;
}

.offer-text-block {
  flex: 1;
  min-width: 0;
}

.offer-headline {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.offer-code-highlight {
  color: #dc2626;
  font-weight: 800;
  background: #fee2e2;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.offer-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.btn-copy-code {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-blue);
  cursor: pointer;
  flex-shrink: 0;
}

.floating-ray-assistant {
  display: none;
}

.ray-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(30, 58, 138, 0.35);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
  box-sizing: border-box;
}

.ray-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
}

.mobile-bottom-nav {
  display: none;
}

.bus-overview-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  width: 100%;
}

.bus-overview-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.bus-overview-info h1 {
  font-size: 1.4rem;
  margin: 0 0 0.25rem;
}

.bus-overview-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.bus-overview-meta {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.seats-main {
  width: 100%;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.seats-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
  width: 100%;
}

.booking-summary-sidebar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: sticky;
  top: 90px;
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
  width: 100%;
}

/* ==========================================================================
   Seat Selection Matrix
   ========================================================================== */
.seat-bus-container {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 36px 36px 16px 16px;
  padding: 2rem 1.5rem;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  box-shadow: var(--shadow-md);
}

.driver-cabin {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px dashed var(--border);
}

.driver-wheel {
  width: 42px;
  height: 42px;
  border: 3px solid #64748b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.seat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.seat-grid.sleeper {
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.aisle-gap {
  margin-right: 1.5rem;
}

.seat-unit {
  position: relative;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: var(--transition);
  user-select: none;
}

/* Seater format */
.seat-unit.seater {
  height: 48px;
  border: 2px solid #94a3b8;
  background: #ffffff;
  color: #475569;
}

/* Sleeper berth format */
.seat-unit.sleeper-berth {
  height: 84px;
  border: 2px solid #94a3b8;
  background: #ffffff;
  color: #475569;
  border-radius: 8px;
}

.seat-unit.available:hover {
  border-color: var(--brand-blue);
  background: #eff6ff;
  transform: scale(1.04);
}

.seat-unit.selected {
  background: var(--brand-blue) !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

.seat-unit.booked {
  background: #cbd5e1 !important;
  border-color: #94a3b8 !important;
  color: #64748b !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

.seat-unit.ladies {
  background: #fdf2f8;
  border-color: #f472b6;
  color: #db2777;
}

.seat-unit.ladies:hover {
  background: #fce7f3;
  border-color: #ec4899;
}

/* Seat Legend */
.seat-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.legend-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #94a3b8;
  background: #ffffff;
}

.legend-box.selected {
  background: var(--brand-blue);
  border-color: #1d4ed8;
}

.legend-box.booked {
  background: #cbd5e1;
  border-color: #94a3b8;
}

.legend-box.ladies {
  background: #fdf2f8;
  border-color: #f472b6;
}

/* ==========================================================================
   Digital Ticket (Boarding Pass Aesthetic)
   ========================================================================== */
.digital-ticket-card {
  max-width: 680px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.ticket-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-notch-divider {
  position: relative;
  height: 24px;
  background: #ffffff;
  display: flex;
  align-items: center;
}

.ticket-notch-left,
.ticket-notch-right {
  position: absolute;
  width: 28px;
  height: 28px;
  background: var(--background);
  border-radius: 50%;
  top: -2px;
}

.ticket-notch-left {
  left: -14px;
}

.ticket-notch-right {
  right: -14px;
}

.ticket-dashed-line {
  width: 100%;
  border-top: 2px dashed #cbd5e1;
}

.ticket-body {
  padding: 2rem;
}

.qr-code-placeholder {
  width: 110px;
  height: 110px;
  background: repeating-linear-gradient(45deg,
      #0f172a,
      #0f172a 8px,
      #ffffff 8px,
      #ffffff 16px);
  border: 3px solid #0f172a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Live Tracking Simulation UI
   ========================================================================== */
.map-canvas-mock {
  position: relative;
  width: 100%;
  height: 380px;
  background: #e2e8f0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background-image:
    linear-gradient(#d1d5db 1px, transparent 1px),
    linear-gradient(90deg, #d1d5db 1px, transparent 1px);
  background-size: 32px 32px;
}

.mock-highway-line {
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 8px;
  background: #94a3b8;
  border-radius: 4px;
  transform: translateY(-50%);
}

.mock-progress-line {
  position: absolute;
  top: 50%;
  left: 10%;
  width: 45%;
  height: 8px;
  background: var(--brand-blue);
  border-radius: 4px;
  transform: translateY(-50%);
  transition: width 1s linear;
}

.bus-moving-marker {
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: var(--brand-blue);
  color: #ffffff;
  border: 4px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-ring 2s infinite ease-in-out;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(37, 99, 235, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* ==========================================================================
   Toasts & Notifications
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 360px;
}

.toast.toast-success {
  background: #065f46;
  border-left: 4px solid #10b981;
}

.toast.toast-error {
  background: #991b1b;
  border-left: 4px solid #ef4444;
}

.toast.toast-info {
  background: #1e3a8a;
  border-left: 4px solid #3b82f6;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--surface-alt);
  color: var(--primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0b1120;
  color: #94a3b8;
  margin-top: auto;
  border-top: 1px solid #1e293b;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-heading {
  color: #ffffff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* ==========================================================================
   Search Page & Modification Bar
   ========================================================================== */
.search-hero-strip {
  background: linear-gradient(135deg, #0b1329 0%, #1e293b 100%);
  color: #ffffff;
  padding: 1.75rem 0;
  width: 100%;
}

.search-route-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

#search-route-title {
  color: #ffffff;
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  margin: 0.15rem 0;
  word-break: break-word;
  line-height: 1.25;
}

.modify-search-form {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr 1.1fr auto;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.modify-search-form .field-group {
  padding: 0.4rem 0.75rem;
  margin-bottom: 0;
  min-width: 0;
}

.modify-search-form .field-input {
  width: 100%;
  font-size: 0.925rem;
  min-width: 0;
}

.modify-swap-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
  transition: var(--transition);
  flex-shrink: 0;
}

.modify-swap-btn:hover {
  background: #e2e8f0;
  color: var(--brand-blue);
  transform: rotate(180deg);
}

.modify-submit-btn {
  height: 48px;
  padding: 0 1.5rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Search Results Layout Grid */
.search-results-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  width: 100%;
}

.desktop-filter-sidebar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
  box-shadow: var(--shadow-sm);
}

.desktop-sort-tabs {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.desktop-sort-tabs .sort-tabs-list {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Mobile Results Bar */
.mobile-results-bar {
  display: none;
}

.mobile-action-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.6rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  min-height: 44px;
}

.mobile-action-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-action-btn:active {
  background: var(--surface-alt);
  border-color: var(--brand-blue);
}

/* Mobile Bottom Sheets */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.bottom-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  z-index: 999;
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
  visibility: hidden;
}

.bottom-sheet.active {
  transform: translateY(0);
  visibility: visible;
}

.bottom-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #cbd5e1;
  margin: 0.75rem auto 0.25rem;
  flex-shrink: 0;
}

.bottom-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.bottom-sheet-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.bottom-sheet-close {
  background: none;
  border: none;
  padding: 0.4rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.bottom-sheet-close:hover {
  background: var(--surface-alt);
  color: var(--primary);
}

.bottom-sheet-body {
  padding: 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.bottom-sheet-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #ffffff;
  flex-shrink: 0;
}

/* ==========================================================================
   Responsive Adaptations - Tablet & iPad (max-width: 1023px)
   ========================================================================== */
@media (max-width: 1023px) {
  /* Header & Navigation on Tablet/iPad */
  .nav-menu,
  .nav-actions {
    display: none;
  }

  .site-header .nav-wrapper {
    position: relative;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-header .brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 0.45rem 1.15rem;
    border-radius: var(--radius-lg, 16px);
    border: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    width: auto;
    min-width: 170px;
    max-width: 60%;
    margin: 0 auto;
    box-sizing: border-box;
    z-index: 1;
  }

  .site-header .brand-logo-img {
    height: 32px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }

  .site-header .menu-toggle,
  .menu-toggle {
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
  }

  /* Bus Search Form: Clean 2-Row Layout on Tablet */
  .search-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
  }

  .swap-btn-container,
  .swap-btn {
    display: none !important;
  }

  .search-submit-cta {
    width: 100%;
    height: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* 2-Column Responsive Card Grids on Tablet */
  .popular-routes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .destinations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .offers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }

  /* Profile Layout on Tablet (240px Sidebar + 1fr Content) */
  .profile-layout-grid {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.5rem;
    width: 100%;
  }

  /* Sidebars & Layout Grids on Tablet */
  .passenger-layout-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .passenger-sidebar-col {
    max-width: 100%;
  }

  .seats-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .booking-summary-sidebar {
    position: static !important;
    top: auto !important;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }

  .search-results-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .desktop-filter-sidebar {
    display: none !important;
  }

  .mobile-results-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    width: 100%;
  }

  .modify-search-form {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .modify-swap-btn {
    display: none;
  }

  .modify-submit-btn {
    grid-column: span 2;
    width: 100%;
  }
}

/* Large Tablet / iPad Landscape (1024px to 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
  .site-header .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .nav-menu {
    gap: 1.15rem;
  }

  .nav-link {
    font-size: 0.92rem;
  }

  .brand-logo-img {
    height: 36px;
    max-width: 155px;
  }

  .destinations-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }

  .popular-routes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .site-header .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .passenger-fields-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .passenger-fields-grid>div:first-child {
    grid-column: span 2;
  }

  .desktop-sort-tabs {
    display: none !important;
  }

  .search-hero-strip {
    padding: 1.25rem 0;
  }

  .search-route-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  #search-route-title {
    font-size: 1.35rem;
  }

  .modify-search-form {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.75rem;
  }

  .modify-search-form .field-group {
    padding: 0.5rem 0.75rem;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .modify-swap-btn {
    display: none;
  }

  .modify-submit-btn {
    grid-column: 1;
    width: 100%;
    height: 48px;
    font-size: 1rem;
    margin-top: 0.25rem;
  }

  .hero-title {
    font-size: 2.15rem;
  }

  .bus-card {
    padding: 1.15rem 1rem;
  }

  .bus-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .bus-card-header>div:last-child {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    width: 100%;
  }

  .journey-timeline {
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem;
    padding: 0.75rem 0;
    min-width: 0;
  }

  .time-point {
    min-width: 0;
  }

  .timeline-track {
    min-width: 24px;
  }

  .time-value {
    font-size: 1.2rem;
  }

  .city-value {
    font-size: 0.8rem;
  }

  .duration-text {
    font-size: 0.75rem;
  }

  .bus-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .price-cta-block {
    justify-content: space-between;
    width: 100%;
  }

  .price-cta-block .btn {
    padding: 0.6rem 1.25rem;
    min-height: 44px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .seat-grid {
    gap: 0.5rem;
  }

  .seat-grid.sleeper {
    gap: 0.5rem;
  }

  .step-bar-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .step-bar-steps {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .bus-overview-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .bus-overview-meta {
    gap: 1.5rem;
  }

  .popular-routes-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .destinations-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .offers-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .route-card {
    padding: 1.25rem 1rem;
  }
}

@media (max-width: 767px) {
  .payment-main-container {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
  }

  .payment-wrapper {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .payment-demo-alert {
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
  }

  .payment-layout-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1.5rem;
    box-sizing: border-box;
  }

  .payment-methods-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .payment-details-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 1.5rem 1.25rem;
  }

  .payment-card-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .payment-banks-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  /* Confirmation Page Mobile Action Buttons */
  .confirmation-btn-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 0.75rem;
    box-sizing: border-box;
  }

  .confirmation-action-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 48px !important;
    flex: none !important;
    box-sizing: border-box !important;
    white-space: normal !important;
  }

  .confirmation-actions {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .confirmation-main-container {
    padding-top: 1.75rem !important;
    padding-bottom: 3rem !important;
    width: 100%;
    box-sizing: border-box;
  }

  .confirmation-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Mobile Home Page: Promo, Offer, Ray, Bottom Nav */
  body.has-bottom-nav {
    padding-bottom: 84px !important;
  }

  .mobile-promo-banner {
    display: block;
    padding: 0 1rem;
    margin-top: 1.25rem;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-offer-banner {
    display: block;
    padding: 0 1rem;
    margin-top: 0.85rem;
    margin-bottom: 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }

  .floating-ray-assistant {
    display: block;
    position: fixed;
    right: 16px;
    bottom: 82px;
    z-index: 990;
  }

  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    z-index: 1000;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-around;
    padding: 0;
    margin: 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  .bottom-nav-item {
    flex: 1;
    width: 25%;
    height: 100%;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav-item.active {
    color: var(--brand-blue);
    font-weight: 700;
  }

  .bottom-nav-item:active {
    background: rgba(37, 99, 235, 0.05);
  }

  .search-submit-cta {
    width: 100% !important;
    max-width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 24px !important;
    background: #d92d20 !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    box-shadow: 0 4px 14px rgba(217, 45, 32, 0.35) !important;
    border: none !important;
    margin-top: 0.5rem !important;
    box-sizing: border-box !important;
  }

  body.has-bottom-nav .menu-toggle {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .passenger-contact-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

@media (max-width: 480px) {
  .confirmation-details-card {
    padding: 1.25rem 1rem !important;
  }

  .confirmation-info-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .payment-details-card {
    padding: 1.25rem 1rem !important;
  }

  .payment-methods-card {
    padding: 0.85rem 0.75rem !important;
  }

  .header-security-badge {
    font-size: 0.75rem;
    gap: 0.35rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-header .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .passenger-main-container {
    padding-top: 1.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .passenger-layout-grid {
    gap: 1.5rem;
  }

  .passenger-fields-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .passenger-fields-grid>div:first-child {
    grid-column: span 1;
  }

  .card {
    padding: 1.15rem 1rem !important;
  }

  .seats-main {
    padding-top: 1.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .seat-bus-container {
    padding: 1.25rem 0.75rem;
    border-radius: 24px 24px 12px 12px;
  }

  .seat-legend {
    gap: 0.6rem 0.9rem;
    padding: 0.75rem 0.5rem;
  }

  .step-bar-steps {
    font-size: 0.75rem;
    gap: 0.35rem 0.5rem;
  }

  .booking-summary-sidebar {
    padding: 1.25rem !important;
  }

  .search-route-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  #search-route-title {
    font-size: 1.25rem;
  }

  .bus-card {
    padding: 1rem 0.75rem;
  }

  .journey-timeline {
    gap: 0.35rem;
  }

  .time-value {
    font-size: 1.05rem;
  }

  .city-value {
    font-size: 0.75rem;
  }

  .duration-text {
    font-size: 0.7rem;
  }

  .amenity-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }

  .fare-price {
    font-size: 1.3rem;
  }

  .price-cta-block .btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }

  .route-card {
    padding: 1.15rem 0.85rem;
  }

  .route-card-title {
    font-size: 1.05rem;
  }

  .route-card-price {
    font-size: 1.15rem;
  }

  .route-card-footer .btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.825rem;
  }
}

@media (max-width: 360px) {
  .header-security-text {
    display: none;
  }

  .site-header .brand-logo {
    min-width: 145px;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-md, 10px);
  }

  .site-header .brand-logo-img {
    height: 28px;
  }
}

/* Print Rules for Ticket */
@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }

  .digital-ticket-card {
    box-shadow: none;
    border: 1px solid #000000;
    max-width: 100%;
    margin: 0;
  }
}

/* ==========================================================================
   Responsive Profile Layout & Sidebar Navigation
   ========================================================================== */
.profile-layout-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.profile-sidebar-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.profile-sidebar-header {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--surface-alt);
  width: 100%;
  box-sizing: border-box;
}

.profile-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.profile-sidebar-nav .btn {
  width: 100%;
  justify-content: flex-start;
  box-sizing: border-box;
  text-align: left;
}

.profile-form-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.profile-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.profile-fields-grid > div {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.profile-submit-btn {
  width: auto;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .profile-layout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .profile-sidebar-card {
    padding: 1.25rem 1rem;
  }

  .profile-sidebar-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  .profile-form-card {
    padding: 1.25rem 1rem !important;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 639px) {
  .search-fields-grid {
    grid-template-columns: 1fr;
  }

  .profile-fields-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .profile-submit-btn {
    width: 100% !important;
    justify-content: center;
  }
}

/* ==========================================================================
   Responsive Help Center Layout & Topics
   ========================================================================== */
.help-layout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.help-topics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.help-topic-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.help-chat-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1023px) {
  .help-layout-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 639px) {
  .help-topics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .help-topic-card {
    padding: 1.25rem 1rem;
  }

  .help-chat-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }
}

/* Universal Child Overflow Prevention */
input, textarea, select {
  max-width: 100%;
  box-sizing: border-box;
}