/* ==========================================================================
   VIA URBANA - RECONHECIMENTO DE LINHAS - DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

/* --- CSS Variables & Theme Tokens --- */
:root {
  /* Brand Palette */
  --brand-primary: #f39c12;
  --brand-primary-hover: #e67e22;
  --brand-gradient-start: #ffb703;
  --brand-gradient-end: #fb8500;

  --accent-blue: #004ecc;
  --accent-blue-hover: #003da6;
  --accent-blue-glow: rgba(0, 78, 204, 0.4);

  --accent-green: #10b981;
  --accent-green-hover: #059669;
  --accent-purple: #8b5cf6;

  /* Dark Theme Default */
  --bg-main: #0b0f19;
  --bg-card: rgba(23, 31, 51, 0.75);
  --bg-card-hover: rgba(28, 39, 64, 0.96);
  --bg-subcard: rgba(15, 23, 42, 0.65);
  --bg-subcard-hover: rgba(243, 156, 18, 0.12);
  --card-banner-bg: linear-gradient(135deg, #131d33 0%, #0d1220 100%);
  --pill-bg: rgba(11, 15, 25, 0.85);
  --pill-border: rgba(255, 255, 255, 0.15);
  --pill-text: #ffffff;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-hover: rgba(243, 156, 18, 0.45);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --input-bg: rgba(15, 23, 42, 0.85);
  --input-border: rgba(255, 255, 255, 0.15);
  --input-focus: #f39c12;

  --nav-bg: rgba(11, 15, 25, 0.88);
  --modal-bg: #111827;
  --modal-header-bg: #162033;
  --modal-backdrop: rgba(3, 7, 18, 0.82);

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(243, 156, 18, 0.22);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.75);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-main: #f4f6f9;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: #ffffff;
  --bg-subcard: rgba(241, 245, 249, 0.9);
  --bg-subcard-hover: rgba(243, 156, 18, 0.15);
  --card-banner-bg: linear-gradient(135deg, #fff7ed 0%, #f1f5f9 100%);
  --pill-bg: rgba(255, 255, 255, 0.92);
  --pill-border: rgba(243, 156, 18, 0.35);
  --pill-text: #0f172a;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(243, 156, 18, 0.6);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --input-bg: rgba(255, 255, 255, 0.95);
  --input-border: rgba(0, 0, 0, 0.15);
  --input-focus: #f39c12;

  --nav-bg: rgba(244, 246, 249, 0.92);
  --modal-bg: #ffffff;
  --modal-header-bg: #f8fafc;
  --modal-backdrop: rgba(15, 23, 42, 0.65);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(243, 156, 18, 0.2);
  --shadow-modal: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1,
h2,
h3,
h4,
.brand-title,
.modal-title {
  font-family: 'Outfit', sans-serif;
}

button,
input {
  font-family: inherit;
}

/* Background Blur Orbs */
.bg-blur-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blur-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.32;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  top: -10%;
  left: 20%;
  width: 520px;
  height: 520px;
  background: var(--brand-gradient-start);
}

.orb-2 {
  bottom: -15%;
  right: 10%;
  width: 620px;
  height: 620px;
  background: var(--accent-blue);
}

.orb-3 {
  top: 45%;
  left: -8%;
  width: 420px;
  height: 420px;
  background: var(--brand-primary);
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(45px, -55px) scale(1.08);
  }

  100% {
    transform: translate(-35px, 35px) scale(0.96);
  }
}

/* App Layout */
.app-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px 48px 24px;
}

/* Header & Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  margin-top: 16px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 16px;
  z-index: 100;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-wrapper {
  width: 64px;
  height: 64px;
  background: #0b0f19;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 2px solid rgba(243, 156, 18, 0.85);
  box-shadow: 0 0 15px rgba(243, 156, 18, 0.35);
  flex-shrink: 0;
}

.brand-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 0.88rem;
  color: var(--brand-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-drive-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.header-drive-btn:hover {
  background: var(--accent-green);
  color: #ffffff;
  border-color: var(--accent-green);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(243, 156, 18, 0.12);
  border: 1px solid rgba(243, 156, 18, 0.3);
  color: var(--brand-primary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
}

.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: rotate(15deg);
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: block;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin: 40px auto 32px auto;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(243, 156, 18, 0.14);
  border: 1px solid rgba(243, 156, 18, 0.35);
  color: var(--brand-primary);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--text-main) 25%, var(--brand-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.18;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* Category Tabs Navigation */
.tabs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.35);
}

.tab-btn:hover:not(.active) {
  border-color: var(--brand-primary);
  color: var(--text-main);
  transform: translateY(-1px);
}

/* Controls Wrapper */
.controls-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin-top: 6px;
}

/* Search Box */
.search-box {
  position: relative;
  width: 100%;
  max-width: 680px;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.15rem;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 15px 48px 15px 52px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.22);
}

.clear-search-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.15rem;
  padding: 6px;
  display: none;
  transition: color var(--transition-fast);
}

.clear-search-btn:hover {
  color: var(--brand-primary);
}

.clear-search-btn.visible {
  display: block;
}

.results-meta {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   CARDS GRID VIEW (ROOT CARD PER LINE)
   ========================================================================== */
.cards-grid-section {
  margin-top: 24px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 26px;
}

/* Root Line Card */
.line-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.line-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-gradient-end));
  opacity: 0.8;
  transition: opacity var(--transition-fast);
  z-index: 2;
}

.line-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.line-card:hover::before {
  opacity: 1;
}

/* Card Header Banner */
.card-header-banner {
  position: relative;
  width: 100%;
  height: 110px;
  background: var(--card-banner-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-end;
  padding: 16px 20px;
  overflow: hidden;
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.card-header-bg { display: none; }

.line-card:hover .card-header-bg {
  transform: scale(1.08);
  opacity: 0.36;
}

.card-header-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

.line-badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.line-code-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.95), rgba(251, 133, 0, 0.95));
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.line-category-pill {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(11, 15, 25, 0.85);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.line-category-pill.alimentadora {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}

.line-category-pill.troncal {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.4);
}

.line-category-pill.circular {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.4);
}

.line-options-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--pill-bg);
  backdrop-filter: blur(4px);
  border: 1px solid var(--pill-border);
  color: var(--pill-text);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
}

.line-options-count i {
  color: var(--brand-primary);
}

/* Card Body Content */
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-itinerary {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.card-itinerary i {
  color: var(--brand-primary);
  margin-top: 3px;
  flex-shrink: 0;
}

/* Section Divider */
.options-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.options-divider-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Inner Video Options List */
.video-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.video-option-row {
  background: var(--bg-subcard);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--transition-fast);
}

.video-option-row:hover {
  background: var(--bg-subcard-hover);
  border-color: var(--border-color-hover);
  transform: translateX(3px);
}

.option-left-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-grow: 1;
}

.option-icon-indicator {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(243, 156, 18, 0.15);
  border: 1px solid rgba(243, 156, 18, 0.35);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.option-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.option-title {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.option-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.option-filename {
  font-family: 'Inter', monospace;
  font-size: 0.74rem;
  color: var(--brand-primary);
  opacity: 0.95;
  font-weight: 500;
}

.option-meta i {
  color: var(--brand-primary);
}

/* Option Action Buttons */
.option-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-option-watch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-option-watch:hover {
  background: var(--brand-primary-hover);
  box-shadow: 0 2px 10px rgba(243, 156, 18, 0.4);
  transform: translateY(-1px);
}

.btn-option-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-option-icon:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

.btn-option-icon.drive:hover {
  border-color: var(--accent-green);
  color: #34d399;
}

/* No Results State */
.no-results-container {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-top: 20px;
}

.no-results-icon {
  font-size: 3.2rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.6;
}

.no-results-container h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.no-results-container p {
  color: var(--text-muted);
  margin-bottom: 22px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.btn-secondary {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   VIDEO MODAL (LIGHTBOX PLAYER)
   ========================================================================== */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.video-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-backdrop);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 980px;
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  z-index: 10;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.video-modal.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 18px 24px;
  background: var(--modal-header-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-line-badge {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.9), rgba(251, 133, 0, 0.9));
  color: #ffffff;
  letter-spacing: 0.5px;
}

.modal-title {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.modal-tags {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  align-items: center;
}

.modal-badge-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.modal-badge-tag.duration {
  color: var(--brand-primary);
  background: rgba(243, 156, 18, 0.12);
}

.modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
  transform: rotate(90deg);
}

/* Modal Options Switcher */
.modal-options-switcher {
  display: flex;
  gap: 8px;
  padding: 10px 24px;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.modal-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.modal-switch-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.modal-switch-btn:hover:not(.active) {
  border-color: var(--brand-primary);
  color: var(--text-main);
}

.modal-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Video Player Container */
.video-player-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  background: #000000;
  overflow: hidden;
}

.video-player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 2;
}

.video-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
  z-index: 1;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modal Details Bar */
.modal-details-bar {
  padding: 16px 24px;
  background: var(--modal-header-bg);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.modal-route-itinerary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 550px;
}

.modal-route-itinerary i {
  color: var(--brand-primary);
}

.modal-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-action {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-modal-action:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-modal-primary {
  padding: 8px 18px;
  background: var(--brand-primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-modal-primary:hover {
  background: var(--brand-primary-hover);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.35);
}

.small-icon {
  font-size: 0.75rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-logo-text {
  font-size: 0.95rem;
  color: var(--text-main);
}

.footer-logo-text strong {
  color: var(--brand-primary);
}

.footer-small {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--modal-bg);
  border: 1px solid var(--brand-primary);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideToast 0.3s ease-out forwards;
}

.toast i {
  color: var(--brand-primary);
}

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

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Utility */
.hidden {
  display: none !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Large screens (1200px+) */
@media (min-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

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

/* Tablet landscape (769px - 1199px) */
@media (max-width: 1199px) and (min-width: 769px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

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

/* Tablet portrait and below (768px) */
@media (max-width: 768px) {
  .app-container {
    padding: 0 16px 36px 16px;
  }

  .navbar {
    padding: 12px 18px;
    margin-top: 10px;
    top: 10px;
  }

  .brand-title {
    font-size: 1.25rem;
  }

  .brand-subtitle {
    font-size: 0.75rem;
  }

  .logo-wrapper {
    width: 48px;
    height: 48px;
  }

  .header-badge {
    display: none;
  }

  .hero-section {
    margin: 28px auto 24px auto;
  }

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

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .modal-dialog {
    max-height: 94vh;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-details-bar {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-actions-group {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
  .app-container {
    padding: 0 10px 24px 10px;
  }

  .navbar {
    padding: 10px 14px;
    gap: 10px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-drive-btn span {
    display: none;
  }

  .header-drive-btn {
    padding: 8px 10px;
  }

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

  .card-body {
    padding: 16px 14px;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .video-option-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .option-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }
}
