:root {
  --orange-primary: #EE7500;
  --orange-dark: #d16600;
  --orange-light: #f57c00;
  --blue-primary: #0063e1;
  --green-arrived: #008a00;
  --gray-dark: #333;
  --gray-medium: #666;
  --gray-light: #9c9c9c;
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.15);
}

.text-v0-general {
  font-family: "Comfortaa-VariableFont_wght", sans-serif !important;
}

.banner-estatus-vuelo {
  position: relative;
  overflow: visible;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
}

.banner-estatus-vuelo .card-img {
  height: 500px;
  object-fit: cover;
  object-position: center;
}

.banner-estatus-vuelo .card-img-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
}

.motor-busqueda-container {
  margin-top: -50px;
  position: relative;
  border: none !important;
}

.header-motor .nav-link {
  border: none !important;
  background: transparent !important;
  cursor: pointer;
  transition: all 0.3s;
}

.option-checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--gray-medium);
  border-radius: 4px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: white;
}

.custom-checkbox.selected {
  background-color: var(--orange-primary);
  border-color: var(--orange-primary);
}

.custom-checkbox.selected::after {
  content: "✓";
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.option-label {
  font-weight: 600;
  color: var(--gray-dark);
  font-size: 17px;
  transition: color 0.2s;
}

.search-form {
  border-radius: 12px !important;
}

.search-btn {
  background-color: var(--orange-primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
}

.search-btn:hover {
  background-color: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(238, 117, 0, 0.2);
}

.search-btn:active {
  transform: translateY(0);
}

.dropdown-autocomplete {
  position: relative;
  width: 100%;
}

.dropdown-autocomplete-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s;
  height: 52px;
  background-color: white;
}

.dropdown-autocomplete-input:focus {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 0.25rem rgba(238, 117, 0, 0.15);
  outline: none;
}

.dropdown-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 4px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  display: none;
}

.dropdown-autocomplete-list.active {
  display: block;
}

.dropdown-autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

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

.dropdown-autocomplete-item:hover {
  background-color: #f8f9ff;
}

.dropdown-autocomplete-item.selected {
  background-color: #f0f4ff;
}

.dropdown-autocomplete-city {
  font-weight: 600;
  color: #333;
  font-size: 15px;
  margin-bottom: 4px;
}

.dropdown-autocomplete-airport {
  font-size: 14px;
  color: #666;
  margin-bottom: 2px;
}

.dropdown-autocomplete-code {
  font-weight: 700;
  color: var(--orange-primary);
  font-size: 13px;
  letter-spacing: 0.5px;
}

.dropdown-autocomplete-no-results {
  padding: 16px;
  text-align: center;
  color: #888;
  font-style: italic;
}

.dropdown-autocomplete-search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue-primary);
  pointer-events: none;
}

.dropdown-autocomplete-wrapper {
  position: relative;
}

.dropdown-autocomplete-clear-btn {
  position: absolute;
  right: 10px;
  top: 15%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 30px;
  padding: 0;
  width: 20px;
  height: 20px;
  display: none;
  z-index: 1;
}

.dropdown-autocomplete-clear-btn:hover {
  color: #333;
}

.dropdown-autocomplete-clear-btn.visible {
  display: block;
}

.text-3d-gradient {
  color: #fff;
  background: linear-gradient(145deg, rgba(238, 115, 0, 0.548), transparent);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2), 6px 6px 0 rgba(0, 0, 0, 0.1), 9px 9px 10px rgba(0, 0, 0, 0.3);
  padding: 10px 20px;
  border-radius: 10px;
  display: inline-block;
  transform: rotateX(15deg) translateZ(15px);
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}

/* ===== ESTILOS PARA LA NUEVA VISTA DE CUADRÍCULA ===== */
.itinerarios-grid-section {
  padding: 3rem 0;
}



.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--orange-primary);
}



/* Grid de itinerarios */
.itinerarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  width: 100%;
}

.itinerario-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  position: relative;
}

.itinerario-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.itinerario-header {
  /*background: linear-gradient(135deg, var(--orange-primary) 0%, var(--orange-dark) 100%);*/
  background-color: #ee7300c2;
  color: #fff;
  gap: 5px;
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  /*border-bottom: 2px solid var(--orange-primary);*/
}

.ruta-principal {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ruta-separador {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive para ruta principal */
/* Responsive para ruta principal */
@media (max-width: 768px) {
  .ruta-principal {
    flex-direction: row;
    /* Side by side */
    flex-wrap: wrap;
    /* Allow wrap */
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    margin: 0 !important;
  }

  .ruta-separador {
    transform: none;
    /* Reset rotation */
    margin: 0 5px !important;
  }

  .ruta-separador svg {
    width: 16px;
    height: 16px;
  }

  .ruta-origen,
  .ruta-destino {
    width: auto;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.1;
  }

  /* Hide decorative plane icons and country to save massive space */
  .ruta-origen svg,
  .ruta-destino svg,
  .pais-origen,
  .pais-destino {
    display: none !important;
  }

  .itinerario-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px !important;
  }

  .fecha-principal {
    margin-top: 4px;
    font-size: 0.9rem;
  }
}

.fecha-principal {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.codigos-ruta {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.itinerario-body {
  padding: 1.5rem;
}

/* Container for the grid of cards */
.vuelos-lista {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  /* Grid of cards */
  gap: 1.5rem;

}

/* Card item style */
.vuelo-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  /* Added for card look */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  /* Added for card shadow */
  transition: background 0.2s;
  /* Kept from original */
}

.vuelo-item:hover {
  background: #f8f9ff;
}

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

/* Inner content stack vertical */
.vuelo-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  width: 100%;
}

.vuelo-numero-grid {
  font-weight: 700;
  color: var(--orange-primary);
  font-size: 1.2rem;
  width: 100%;
  margin-bottom: 0.2rem;
  margin-right: 0;
  /* Updated */
}

.vuelo-horario {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  margin-right: 0;
  margin-top: 0;
  /* Kept from original */
  font-size: 1rem;
  /* Updated */
}

.vuelo-horario>div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hora {
  font-weight: 600;
  font-size: 1rem;
  /* Updated */
}

.duracion {
  color: var(--gray-medium);
  font-size: 0.9rem;
  /* Updated */
}

.dias-operacion {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.4rem;
  /* Updated */
  width: 100%;
  min-width: 0;
  /* Updated */
  margin-top: 0.5rem;
  /* Updated */
}

.descripcion-container {
  width: 100%;
  margin-top: 0.5rem;
  display: flex;
  /* Added */
  justify-content: flex-start;
  /* Added */
}

.dia-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--gray-medium);
}

.dia-activo {
  background: #ee7300c2;
  color: #fff;
}

.dia-inactivo {
  background: #f0f0f0;
  color: #999;
}

/* Estadísticas */
.estadisticas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.estadistica-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.estadistica-valor {
  font-size: 2rem;
  font-weight: 700;
  color: var(--orange-primary);
  margin-bottom: 0.5rem;
}

.estadistica-label {
  color: var(--gray-medium);
  font-size: 0.9rem;
}

/* Estilos adicionales para itinerario (originales) */
.texto-extra-grande {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contenedor-avion {
  position: relative;
  height: 50px;
}

.linea-fondo {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--gray-light);
  z-index: 1;
}

.linea-progreso {
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 3px;
  background-color: var(--orange-primary);
  z-index: 2;
}

.icono-avion {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 30px;
  height: 30px;
}

.boton-lupa {
  background-color: var(--blue-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s;
}

.boton-lupa:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

.flight-number {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--orange-primary);
}

.flight-time {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.vuelo-card {
  margin-bottom: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s;
}

.vuelo-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.flights-section {
  padding: 3rem 0;
  background: #f8f9fa
}

.flight-card {
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  padding: 1rem;
  margin-bottom: .75rem;
  background: #fff
}

.flight-card:hover {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .08)
}

.badge-directo {
  background: #28a745
}

.badge-escala {
  background: #ffc107;
  color: #212529
}

.badge-solo-ida {
  background: #6f42c1
}

/* Estados vacíos y loading */
.loading-grid {
  text-align: center;
  padding: 3rem;
  color: var(--gray-medium);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-medium);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #dee2e6;
}

/* Responsive */
@media (min-width: 1440px) {
  .banner-estatus-vuelo .card-img {
    height: 500px;
  }

  .motor-busqueda-container {
    margin-top: -60px;
  }

  .container {
    max-width: 1400px;
  }
}

@media (max-width: 1024px) and (min-width: 768px) {
  .banner-estatus-vuelo .card-img {
    height: 250px;
  }

  .motor-busqueda-container {
    margin-top: -30px;
  }

  .option-label {
    font-size: 15px;
  }

  /* Header adjustments */
  .itinerario-header {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .ruta-principal,
  .fecha-principal {
    width: 100%;
    margin: 5px 0 !important;
  }

  /* Flight List Column Adjustments for Tablet - Linear Layout (Same as Mobile) */
  .vuelo-info {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  .vuelo-numero-grid {
    width: auto;
    font-size: 1.1rem;
    margin-right: 1rem;
  }

  .vuelo-horario {
    width: auto;
    font-size: 0.9rem;
    justify-content: flex-start;
  }

  .dias-operacion {
    width: 100%;
    justify-content: flex-start;
    margin-top: 5px;
  }

  .descripcion-container {
    width: 100%;
    justify-content: flex-start;
    margin-top: 5px;
  }

  .dia-badge {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
  }

  .dia-badge {
    padding: 0.1rem 0.3rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 767px) {
  .banner-estatus-vuelo .card-img {
    height: 200px;
  }

  .banner-estatus-vuelo .display-4 {
    font-size: 2rem;
  }

  .motor-busqueda-container {
    margin-top: -20px;
  }

  .search-form {
    padding: 1rem !important;
  }

  .dropdown-autocomplete-input {
    font-size: 14px;
    height: 48px;
    margin-bottom: 0;
  }

  .search-btn {
    height: 48px;
    font-size: 14px;
  }

  .itinerarios-grid {
    grid-template-columns: 1fr;
  }

  .grid-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .vista-toggle {
    align-self: flex-end;
  }

  .estadisticas-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile style for flight table */
  /* Mobile style for flight table - Compact Linear Layout */
  .vuelo-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    /* Reduced gap */
  }

  /* Row 1: Flight Number + Schedule */
  .vuelo-numero-grid {
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
    font-size: 1rem;
  }

  .vuelo-horario {
    width: auto;
    display: inline-flex;
    vertical-align: middle;
    font-size: 0.9rem;
  }

  /* Make Num and Horario appear as one logical row via a wrapper if possible, 
     but since we can't change HTML structure easily here, we make them display nicely.
     However, to truly be "linear", we can use float or inline-block, or just flex wrap row.
  */

  /* Let's try Flex Row Wrap for the container to get specific items on one line?
     The structure is Num, Sched, Days, Desc.
     If we want Num + Sched on line 1, we can set them to auto width.
  */

  .vuelo-info {
    flex-direction: row;
    /* Allow wrapping */
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  .vuelo-numero-grid {
    width: auto;
    min-width: 0;
    margin-right: 10px;
  }

  .vuelo-horario {
    width: auto;
    min-width: 0;
    justify-content: flex-start;
  }

  .dias-operacion {
    width: 100%;
    /* Force new line */
    justify-content: flex-start;
    margin-top: 5px;
    gap: 5px;
  }

  .descripcion-container {
    width: 100%;
    /* Force new line */
    justify-content: flex-start;
    margin-top: 5px;
  }
}

@media (max-width: 480px) {
  .banner-estatus-vuelo .display-4 {
    font-size: 1.75rem;
  }

  .option-label {
    font-size: 14px;
  }
}

@media (min-width:768px) {
  .flight-header {
    font-weight: 600;
    font-size: .875rem;
    color: #495057;
    margin-bottom: .5rem
  }
}

/* Estilos para la descripción en la cuadrícula */
.descripcion-container {
  margin-top: 0;
  width: 25%;
  display: flex;
  justify-content: flex-end;
}

.descripcion-texto {
  font-size: 0.8rem;
  color: #856404;
  border-radius: 4px;
  padding: 4px 8px;
  display: flex;
  align-items: flex-start;
  line-height: 1.3;
}

.descripcion-texto i {
  color: var(--orange-primary);
  margin-right: 6px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Ajuste responsive */
@media (max-width: 767px) {
  .descripcion-container {
    max-width: 100%;
  }

  .descripcion-texto {
    font-size: 1rem;
    padding: 3px 6px;
  }
}

/* Dropdown No Results */
.dropdown-no-results {
  padding: 15px;
  text-align: center;
  color: var(--gray-medium);
  font-style: italic;
  font-size: 0.9em;
  cursor: default;
  background: white;
}

/* Dropup modification */
.dropdown-autocomplete-list.drop-up {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 5px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}