/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Modo Diurno */
  --bg-primary: rgba(255, 255, 255, 0.95);
  --bg-secondary: rgba(248, 250, 252, 0.9);
  --bg-tertiary: rgba(255, 255, 255, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.7);
  --text-primary: #1d1d1f;
  --text-secondary: #515154;
  --text-tertiary: #86868b;
  --accent-blue: #007aff;
  --accent-blue-light: rgba(0, 122, 255, 0.1);
  --accent-orange: #ff9500;
  --accent-orange-light: rgba(255, 149, 0, 0.1);
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.2);
  --blur-amount: blur(20px);
}

[data-theme="dark"] {
  /* Modo Nocturno */
  --bg-primary: rgba(28, 28, 30, 0.95);
  --bg-secondary: rgba(44, 44, 46, 0.9);
  --bg-tertiary: rgba(58, 58, 60, 0.8);
  --bg-glass: rgba(28, 28, 30, 0.7);
  --text-primary: #ffffff;
  --text-secondary: #d1d1d6;
  --text-tertiary: #8e8e93;
  --accent-blue: #0a84ff;
  --accent-blue-light: rgba(10, 132, 255, 0.15);
  --accent-orange: #ff9f0a;
  --accent-orange-light: rgba(255, 159, 10, 0.15);
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --blur-amount: blur(20px);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] body {
  background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
}

/* Theme Switch */
.theme-switch {
  position: fixed;
  top: 20px;
  left: 75px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.theme-icon i {
  font-size: 16px !important;
}

.sun-icon {
  color: var(--accent-orange);
}

.moon-icon {
  color: #5E5CE6;
  display: none;
}

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

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

.theme-toggle {
  position: relative;
  width: 60px;
  height: 32px;
  background: var(--bg-tertiary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  box-shadow: 0 4px 16px var(--shadow-light);
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .theme-toggle {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .theme-toggle::before {
  transform: translateX(26px);
  background: #1c1c1e;
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px var(--shadow-medium);
}

/* Logo */
.logo {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 4px 12px var(--shadow-light));
}

.logo:hover {
  transform: scale(1.05) translateY(-2px);
}

/* Container Principal */
.container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0;
  border-radius: 24px;
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px var(--shadow-medium);
  overflow: hidden;
}

/* Header */
header {
  text-align: center;
  position: relative;
  padding: 40px 30px 30px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  border-radius: 24px;
}

.back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: var(--blur-amount);
  text-decoration: none;
}

* Mejorar visibilidad del botón atrás */
.back-button {
  z-index: 1001;
  box-shadow: 0 4px 12px var(--shadow-medium);
}

.back-button:hover {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 122, 255, 0.2);
}

header .logo {
  max-width: 550px;
  width: 100%;
  height: auto;
  margin-bottom: 24px;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 20px 0;
  color: var(--accent-orange);
  letter-spacing: -0.02em;
}

/* Buscador de paradas */
.search-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  padding: 0 20px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
}

#search-input {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

#search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.clear-btn:hover {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}

.highlight {
  background: rgba(255, 193, 7, 0.3);
  padding: 1px 2px;
  border-radius: 2px;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* Responsive para buscador */
@media (max-width: 768px) {
  .search-container {
    padding: 0 16px;
    margin: 16px 0;
  }
  
  #search-input {
    padding: 14px 18px;
    font-size: 15px;
  }
}

@media (max-width: 400px) {
  .search-container {
    padding: 0 12px;
  }
  
  #search-input {
    padding: 12px 16px;
    font-size: 14px;
  }
}


/* Botones de Dirección */
.direction-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
  padding: 0 20px;
  flex-wrap: wrap;
}

.direction-btn, .pdf-download-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: var(--blur-amount);
  -webkit-backdrop-filter: var(--blur-amount);
  text-decoration: none;
  letter-spacing: -0.01em;
  min-width: 180px;
  max-width: 220px;
}

.direction-btn:hover, .pdf-download-btn:hover {
  background: var(--bg-secondary);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--shadow-light);
}

.direction-btn.active {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.2);
  font-weight: 600;
}

.direction-btn.active:hover {
  background: var(--accent-blue-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.25);
}

.pdf-download-btn {
  background: var(--accent-orange-light);
  color: var(--accent-orange);
  border-color: var(--accent-orange);
  font-weight: 600;
}

.pdf-download-btn:hover {
  background: var(--accent-orange-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 149, 0, 0.25);
  color: var(--accent-orange);
}

.pdf-download-btn i {
  font-size: 16px;
}

/* Secciones de Paradas */
.paradas-section {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
  padding: 0 20px 20px;
}

.paradas-section.active {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

.paradas h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 24px 0 16px;
  color: var(--text-primary);
  text-align: center;
}

/* Información de Ruta */
.route-info {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  background: var(--bg-tertiary);
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  backdrop-filter: var(--blur-amount);
  flex-wrap: wrap;
  gap: 16px;
}

.route-code {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-blue);
  letter-spacing: 0.5px;
}

.route-detail {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* TABLA - Optimizada para móviles */
.table-container {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.paradas-table {
  width: 100%;
  min-width: 300px;
  border-collapse: collapse;
  background: transparent;
}

.paradas-table thead {
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.paradas-table thead th {
  color: var(--text-primary);
  font-weight: 600;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.paradas-table thead th:nth-child(1) {
  width: 15%;
  text-align: center;
  min-width: 50px;
}

.paradas-table thead th:nth-child(2) {
  width: 45%;
  text-align: left;
  min-width: 120px;
}

.paradas-table thead th:nth-child(3) {
  width: 40%;
  text-align: left;
  min-width: 100px;
}

.paradas-table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  font-size: 0.85rem;
}

.paradas-table tbody td:nth-child(1) {
  text-align: center;
  font-weight: 600;
  color: var(--accent-blue);
  background: var(--bg-secondary);
  width: 15%;
  min-width: 50px;
  position: sticky;
  left: 0;
  z-index: 5;
}

.paradas-table tbody td:nth-child(2) {
  text-align: left;
  font-weight: 500;
  color: var(--text-primary);
  width: 45%;
  min-width: 120px;
  padding-left: 12px;
}

.paradas-table tbody td:nth-child(3) {
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.8rem;
  width: 40%;
  min-width: 100px;
}

.paradas-table tbody tr {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.paradas-table tbody tr:hover {
  background: var(--bg-secondary);
}

/* ===== EFECTO HOVER PROFESIONAL SIN TEMBLOR ===== */

/* Transiciones suaves para todas las celdas */
.paradas-table tbody td {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  /* Fijar altura mínima para evitar cambios de layout */
  min-height: 40px;
  vertical-align: middle;
}

/* Efecto principal de hover en la fila */
.paradas-table tbody tr:hover {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(0, 122, 255, 0.05) 100%);
  transform: translateY(-1px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.08),
    inset 2px 0 0 var(--accent-blue);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Efecto sutil en el número de parada */
.paradas-table tbody tr:hover td:nth-child(1) {
  background: linear-gradient(135deg, var(--accent-blue-light) 0%, var(--bg-secondary) 100%);
  color: var(--accent-blue);
  font-weight: 700;
  border-radius: 6px;
  /* Solo efectos visuales, sin cambios de tamaño */
  text-shadow: 0 1px 2px rgba(0, 122, 255, 0.2);
}

/* Efecto principal en el nombre de la parada - SIN cambio de font-size */
.paradas-table tbody tr:hover td:nth-child(2) {
  font-weight: 600;
  color: var(--accent-blue);
  transform: translateX(3px);
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0, 122, 255, 0.15);
  /* Usar filter para simular agrandamiento sin cambiar layout */
  filter: brightness(1.1) contrast(1.05);
}

/* Efecto en la zona - SIN cambio de font-size */
.paradas-table tbody tr:hover td:nth-child(3) {
  font-weight: 500;
  color: var(--text-primary);
  transform: translateX(2px);
  opacity: 0.95;
  letter-spacing: 0.1px;
  filter: brightness(1.05);
}

/* Efecto táctil refinado para móviles */
.paradas-table tbody tr:active {
  background: linear-gradient(135deg, var(--accent-blue-light) 0%, rgba(0, 122, 255, 0.08) 100%);
  transform: translateY(0px) scale(0.999);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.6, 1);
}

.paradas-table tbody tr:active td:nth-child(1) {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 122, 255, 0.2);
}

.paradas-table tbody tr:active td:nth-child(2) {
  font-weight: 600;
  color: var(--accent-blue);
  transform: translateX(2px);
  letter-spacing: 0.2px;
  filter: brightness(1.1) contrast(1.05);
}

.paradas-table tbody tr:active td:nth-child(3) {
  font-weight: 500;
  color: var(--text-primary);
  transform: translateX(1px);
  filter: brightness(1.05);
}

/* Efecto de focus para accesibilidad */
.paradas-table tbody tr:focus-within {
  outline: 2px solid var(--accent-blue);
  outline-offset: -2px;
  border-radius: 4px;
}

/* Animación sutil de "pulsación" como alternativa al zoom */
.paradas-table tbody tr:hover td:nth-child(2)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 122, 255, 0.03);
  border-radius: 4px;
  animation: pulseGlow 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* ===== FIN DEL EFECTO HOVER PARA PARADAS ===== */

.paradas-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.paradas-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .paradas-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Footer */
footer {
  padding: 40px 30px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: var(--blur-amount);
}

.contact-item:hover {
  background: var(--bg-secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-light);
}

.contact-item i {
  color: var(--accent-blue);
  font-size: 18px;
  width: 20px;
  flex-shrink: 0;
}

.contact-item div {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.contact-location {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.contact-number {
  font-weight: 700;
  color: var(--accent-blue);
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Botón ir arriba */
#toTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: var(--accent-blue);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: var(--blur-amount);
  box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
  z-index: 1000;
}

#toTop:hover {
  background: #0056b3;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(0, 122, 255, 0.4);
}

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

/* Tablets y pantallas medianas */
@media (max-width: 768px) {
  .container {
    margin: 20px 15px;
    border-radius: 20px;
  }

  header {
    padding: 30px 20px 24px;
    border-radius: 20px;
  }

  .theme-switch {
    top: 15px;
    right: 15px;
    gap: 8px;
  }

  .theme-toggle {
    width: 50px;
    height: 28px;
    border-radius: 14px;
  }

  .theme-toggle::before {
    width: 20px;
    height: 20px;
    top: 3px;
    left: 3px;
  }

  [data-theme="dark"] .theme-toggle::before {
    transform: translateX(20px);
  }

  h1 {
    font-size: 1.6rem;
    margin: 16px 0;
  }

  .direction-buttons {
    gap: 10px;
    padding: 0 16px;
    flex-direction: column;
    align-items: center;
  }

  .direction-btn, .pdf-download-btn {
    padding: 14px 20px;
    font-size: 15px;
    min-width: auto;
    max-width: 280px;
    width: 100%;
  }

  .paradas-section {
    padding: 0 16px 16px;
  }

  .route-info {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 14px;
  }

  .route-code {
    font-size: 1rem;
  }

  .route-detail {
    font-size: 0.9rem;
  }

  .paradas-table thead th {
    padding: 10px 6px;
    font-size: 0.75rem;
  }

  .paradas-table tbody td {
    padding: 8px 6px;
    font-size: 0.8rem;
  }

  .paradas-table tbody td:nth-child(3) {
    font-size: 0.75rem;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 14px;
  }

  .contact-item div {
    text-align: center;
  }

  #toTop {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 18px;
  }
}

/* Móviles pequeños */
@media (max-width: 600px) {
  .container {
    margin: 15px 10px;
    border-radius: 18px;
  }

  header {
    padding: 24px 16px 20px;
  }

  .back-button {
    width: 38px;
    height: 38px;
    top: 16px;
    left: 16px;
    border-radius: 10px;
    font-size: 16px;
  }

  h1 {
    font-size: 1.4rem;
    margin: 12px 0;
  }

  .direction-buttons {
    padding: 0 12px;
    gap: 8px;
  }

  .direction-btn, .pdf-download-btn {
    padding: 12px 16px;
    font-size: 14px;
    max-width: 250px;
  }

  .paradas-section {
    padding: 0 12px 12px;
  }

  .route-info {
    padding: 12px;
    gap: 6px;
  }

  .route-code {
    font-size: 0.95rem;
  }

  .route-detail {
    font-size: 0.85rem;
  }

  .paradas h1 {
    font-size: 1.3rem;
    margin: 16px 0 12px;
  }

  .paradas-table thead th {
    padding: 8px 4px;
    font-size: 0.7rem;
  }

  .paradas-table tbody td {
    padding: 6px 4px;
    font-size: 0.75rem;
  }

  .paradas-table tbody td:nth-child(1) {
    min-width: 40px;
    font-size: 0.8rem;
  }

  .paradas-table tbody td:nth-child(2) {
    min-width: 100px;
    padding-left: 8px;
  }

  .paradas-table tbody td:nth-child(3) {
    font-size: 0.7rem;
    min-width: 80px;
  }

  footer {
    padding: 24px 16px;
  }

  .contact-item {
    padding: 12px;
    gap: 6px;
  }

  .contact-location {
    font-size: 0.85rem;
  }

  .contact-number {
    font-size: 1rem;
  }

  #toTop {
    width: 44px;
    height: 44px;
    bottom: 16px;
    right: 16px;
    font-size: 16px;
  }
}

/* Móviles muy pequeños */
@media (max-width: 400px) {
  .container {
    margin: 10px 8px;
    border-radius: 16px;
  }

  header {
    padding: 20px 12px 16px;
  }

  .back-button {
    width: 36px;
    height: 36px;
    top: 12px;
    left: 12px;
    font-size: 14px;
  }

header .logo {
  max-width: 90%;
  width: 100%;
  margin-bottom: 16px;
}

  h1 {
    font-size: 1.2rem;
    margin: 10px 0;
  }

  .theme-switch {
    top: 12px;
    right: 12px;
  }

  .direction-buttons {
    padding: 0 8px;
    gap: 6px;
  }

  .direction-btn, .pdf-download-btn {
    padding: 10px 12px;
    font-size: 13px;
    max-width: 200px;
  }

  .paradas-section {
    padding: 0 8px 8px;
  }

  .route-info {
    padding: 10px;
    gap: 4px;
  }

  .route-code {
    font-size: 0.9rem;
  }

  .route-detail {
    font-size: 0.8rem;
  }

  .paradas h1 {
    font-size: 1.1rem;
    margin: 12px 0 8px;
  }

  .table-container {
    border-radius: 12px;
  }

  .paradas-table thead th {
    padding: 6px 3px;
    font-size: 0.65rem;
  }

  .paradas-table tbody td {
    padding: 5px 3px;
    font-size: 0.7rem;
  }

  .paradas-table tbody td:nth-child(1) {
    min-width: 35px;
    font-size: 0.75rem;
  }

  .paradas-table tbody td:nth-child(2) {
    min-width: 90px;
    padding-left: 6px;
  }

  .paradas-table tbody td:nth-child(3) {
    font-size: 0.65rem;
    min-width: 70px;
  }

  footer {
    padding: 20px 12px;
  }

  .contact-item {
    padding: 10px;
    gap: 4px;
  }

  .contact-location {
    font-size: 0.8rem;
  }

  .contact-number {
    font-size: 0.95rem;
  }

  .footer-bottom p {
    font-size: 0.8rem;
  }

  #toTop {
    width: 40px;
    height: 40px;
    bottom: 12px;
    right: 12px;
    font-size: 14px;
  }
}

/* Orientación horizontal en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  header {
    padding: 16px 20px 12px;
  }

  h1 {
    font-size: 1.3rem;
    margin: 8px 0;
  }

  .direction-buttons {
    margin: 16px 0;
  }

  .paradas h1 {
    font-size: 1.2rem;
    margin: 12px 0 8px;
  }

  .route-info {
    padding: 10px;
    margin: 12px 0;
  }

  footer {
    padding: 20px 30px;
  }
}


/* ===== BOTÓN DE TELÉFONO FLOTANTE ===== */
.phone-button {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: #28a745;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: var(--blur-amount);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
  z-index: 1001;
}



.phone-button i {
  display: none;
}

/* Si Font Awesome se carga, usar el icono */
.phone-button:has(i.fa-phone) i {
  display: block;
}

.phone-button:has(i.fa-phone)::before {
  display: none;
}

.phone-button:hover {
  background: #218838;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(40, 167, 69, 0.4);
}

.phone-button.active {
  background: #dc3545;
  transform: rotate(45deg);
}

.phone-button.active:hover {
  background: #c82333;
}

/* Números de teléfono */
.phone-numbers {
  position: fixed;
  bottom: 170px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  z-index: 1000;
}

.phone-numbers.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.phone-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: var(--blur-amount);
  box-shadow: 0 4px 15px var(--shadow-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  min-width: 200px;
}

.phone-item:hover {
  background: var(--bg-secondary);
  transform: translateY(-2px) translateX(-4px);
  box-shadow: 0 8px 25px var(--shadow-medium);
  color: var(--accent-blue);
}

.phone-item i {
  color: var(--accent-blue);
  font-size: 12px;
  width: 16px;
  flex-shrink: 0;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .phone-button {
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
  
  .phone-numbers {
    bottom: 140px;
    right: 20px;
  }
  
  .phone-item {
    padding: 10px 12px;
    font-size: 13px;
    min-width: 180px;
  }
}

@media (max-width: 400px) {
  .phone-button {
    bottom: 70px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
  
  .phone-numbers {
    bottom: 120px;
    right: 16px;
  }
  
  .phone-item {
    padding: 8px 10px;
    font-size: 12px;
    min-width: 160px;
  }
}



/* SVG Icons - Estilos adicionales */
.phone-button svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-button:hover svg {
    transform: scale(1.1);
}

.phone-item svg {
    color: var(--accent-blue);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-item:hover svg {
    transform: scale(1.1);
    color: var(--accent-orange);
}