/* FLIGHTS PAGE STYLES - CLEAN VERSION
 */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #334155;
  background: #f8fafc;
}

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

/* TOP HEADER
 */
.top-header {
  background: #003580;
  color: white;
  padding: 8px 0;
  font-size: 14px;
}

.top-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.currency-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.currency-selector select {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.top-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-link {
  color: white;
  text-decoration: none;
  transition: opacity 0.2s;
}

.top-link:hover {
  opacity: 0.8;
}

.btn-top-register,
.btn-top-signin {
  padding: 6px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-top-register {
  background: white;
  color: #003580;
}

.btn-top-register:hover {
  background: #f0f0f0;
}

.btn-top-signin {
  border: 1px solid white;
  color: white;
}

.btn-top-signin:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* MAIN NAVIGATION
 */
.main-nav {
  background: #003580;
  padding: 0;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  font-size: 24px;
  font-weight: 700;
}

.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: white;
  padding: 6px;
  border-radius: 8px;
}

.nav-tabs {
  display: flex;
  gap: 4px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  color: white;
  text-decoration: none;
  border-radius: 24px 24px 0 0;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
  background: white;
  color: #003580;
}

.nav-tab i {
  font-size: 18px;
}

/* hero section*/
.flights-hero {
  background: #f7f9fb;
  padding: 60px 0;
  min-height: auto;
}

.hero-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 40px;
  align-items: start;
}

.hero-content {
  padding-top: 20px;
}

.flights-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

/* image*/
.hero-images {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.hero-image-top,
.hero-image-bottom {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.hero-image-top {
  height: 180px;
}

.hero-image-bottom {
  height: 240px;
}

.hero-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

/* trip type */
.trip-type-selector {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: #fff;
  border-radius: 6px;
  padding: 3px;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.trip-type-option {
  cursor: pointer;
  transition: all 0.2s ease;
}

.trip-type-option input[type="radio"] {
  display: none;
}

.trip-type-option span {
  display: block;
  padding: 6px 16px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #6b7280;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.trip-type-option:hover span {
  color: #1a1a1a;
}

.trip-type-option input[type="radio"]:checked + span {
  background: #0071c2;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 113, 194, 0.3);
}

/* horizontal search form */
.flight-search-form-horizontal {
  background: #fff;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.search-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.search-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border-right: 1px solid #e5e7eb;
  position: relative;
  min-height: 48px;
  justify-content: center;
  background: #fff;
  transition: all 0.2s ease;
}

.search-field:hover {
  background: #f9fafb;
}

.search-field:focus-within {
  background: #fff;
  outline: 2px solid #0071c2;
  outline-offset: -2px;
  z-index: 5;
}

.search-field:last-of-type {
  border-right: none;
}

.search-field label {
  font-size: 0.65rem;
  color: #6b7280;
  margin-bottom: 2px;
  font-weight: 600;
  text-transform: capitalize;
}

.search-field input {
  border: none;
  outline: none;
  font-size: 0.8rem;
  color: #111827;
  font-weight: 500;
  background: transparent;
  padding: 0;
  width: 100%;
}

.search-field input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.search-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.5;
}

.search-field.with-swap {
  position: relative;
}

.swap-btn {
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.swap-btn:hover {
  background: #f9fafb;
  border-color: #0071c2;
  color: #0071c2;
  transform: translateY(-50%) rotate(180deg);
}

.btn-search-horizontal {
  background: #0071c2;
  color: #fff;
  border: none;
  padding: 0 24px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  border-radius: 0 12px 12px 0;
}

.btn-search-horizontal:hover {
  background: #005fa3;
}

.btn-search-horizontal:active {
  transform: scale(0.98);
}

.btn-search-horizontal i {
  font-size: 1.2rem;
}

/* search options */
.search-options {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.checkbox-option:hover {
  color: #111827;
}

.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0071c2;
}

.checkbox-option span {
  user-select: none;
}

/* loading indicator */
.loading-indicator {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border-radius: 16px;
  margin: 40px auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.loading-indicator .spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 24px;
  border: 4px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-indicator p {
  color: #64748b;
  font-size: 1.125rem;
  font-weight: 500;
}

/* flight results */
.flight-results-section {
  padding: 60px 0;
  background: #f8fafc;
  min-height: 500px;
}

.flight-results {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Welcome Message */
.welcome-message {
  text-align: center;
  padding: 100px 20px;
  color: #64748b;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.welcome-message i {
  font-size: 5rem;
  color: #cbd5e1;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.welcome-message h3 {
  font-size: 2rem;
  color: #334155;
  margin-bottom: 12px;
  font-weight: 700;
}

.welcome-message p {
  font-size: 1.125rem;
  color: #64748b;
}

/* POPULAR ROUTES
 */
.popular-routes {
  padding: 80px 0;
  background: #fff;
}

.popular-routes h2 {
  text-align: center;
  margin-bottom: 48px;
  font-size: 2.5rem;
  color: #0f172a;
  font-weight: 700;
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.route-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.route-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  transform: translateY(-8px);
  border-color: #3b82f6;
}

.route-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.route-card:hover img {
  transform: scale(1.1);
}

.route-info {
  padding: 24px;
}

.route-info h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: #0f172a;
  font-weight: 700;
}

.route-info p {
  color: #3b82f6;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 2px solid #e2e8f0;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-secondary:hover {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* POPULAR AIRPORTS
 */
.popular-airports {
  padding: 80px 0;
  background: #f8fafc;
}

.popular-airports h2 {
  text-align: center;
  margin-bottom: 48px;
  font-size: 2.5rem;
  color: #0f172a;
  font-weight: 700;
}

.airports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.airport-card {
  background: #fff;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 20px;
  align-items: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.airport-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
  border-color: #3b82f6;
}

.airport-card img {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.airport-info h4 {
  font-size: 1.125rem;
  color: #0f172a;
  margin-bottom: 6px;
  font-weight: 700;
}

.airport-info p {
  color: #64748b;
  font-size: 0.875rem;
}

/* FOOTER
 */
.footer {
  background: white;
  color: #333;
  padding: 30px 20px;
  text-align: center;
  margin-top: 60px;
  border-top: 1px solid #e0e0e0;
}

.footer p {
  margin: 0;
  font-size: 0.875rem;
}

/* RESPONSIVE DESIGN
 */
@media (max-width: 1200px) {
  .search-row {
    flex-wrap: wrap;
  }
  
  .search-field {
    min-width: 45%;
  }
  
  .btn-search-horizontal {
    width: 100%;
    margin-top: 12px;
    border-radius: 4px;
  }
  
  .swap-btn {
    right: 16px;
    top: 50%;
  }
}

@media (max-width: 1200px) {
  .hero-container {
    grid-template-columns: 1fr 500px;
    gap: 40px;
  }
  
  .flights-hero h1 {
    font-size: 3rem;
  }
  
  .hero-image-top {
    height: 200px;
  }
  
  .hero-image-bottom {
    height: 280px;
  }
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .hero-image-top,
  .hero-image-bottom {
    height: 240px;
  }
  
  .flights-hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .top-header-content {
    flex-direction: column;
    gap: 12px;
  }

  .nav-tabs {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .flights-hero {
    padding: 40px 0;
  }
  
  .hero-container {
    padding: 0 20px;
  }

  .flights-hero h1 {
    font-size: 2rem;
  }
  
  .hero-images {
    grid-template-columns: 1fr;
  }
  
  .hero-image-top {
    height: 200px;
  }
  
  .hero-image-bottom {
    height: 260px;
  }

  .search-row {
    flex-direction: column;
  }
  
  .search-field {
    border-right: none;
    border-bottom: 2px solid #e8e8e8;
    width: 100%;
    min-width: 100%;
  }
  
  .search-field:last-child {
    border-bottom: none;
  }
  
  .swap-btn {
    right: 16px;
    top: auto;
    bottom: -20px;
    transform: translateY(0) rotate(90deg);
  }
  
  .swap-btn:hover {
    transform: translateY(0) rotate(270deg);
  }
  
  .btn-search-horizontal {
    width: 100%;
    border-radius: 4px;
  }
  
  .search-options {
    flex-direction: column;
    gap: 12px;
  }

  .routes-grid,
  .airports-grid {
    grid-template-columns: 1fr;
  }

  .popular-routes h2,
  .popular-airports h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .flights-hero {
    padding: 30px 0;
  }

  .flights-hero h1 {
    font-size: 1.5rem;
    margin-bottom: 16px;
  }
  
  .trip-type-selector {
    width: 100%;
  }
  
  .trip-type-option {
    flex: 1;
  }
  
  .trip-type-option span {
    text-align: center;
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

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

/* ALERT ANIMATIONS
 */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* FLIGHT CARDS
 */
.flight-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  border: 1px solid #e0e0e0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.flight-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #bdbdbd;
}

.flight-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.airline-logo-container {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  padding: 8px;
  margin-bottom: 8px;
}

.airline-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.airline-info {
  text-align: center;
}

.airline-info h3 {
  font-size: 0.75rem;
  color: #333;
  margin-bottom: 0;
  font-weight: 500;
}

.flight-number {
  color: #757575;
  font-size: 0.7rem;
  font-weight: 400;
}

.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  display: inline-block;
}

.badge-success {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-warning {
  background: #fff3e0;
  color: #e65100;
}

.flight-route {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.route-point {
  display: flex;
  flex-direction: column;
  min-width: 80px;
}

.route-point .time {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.route-point .airport {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0;
}

.route-point .city {
  display: none;
}

.route-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 140px;
}

.duration {
  font-size: 0.75rem;
  color: #757575;
  font-weight: 400;
  margin-bottom: 4px;
}

.route-line {
  position: relative;
  width: 100%;
  height: 1px;
  background: #e0e0e0;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.route-line::before {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: #e0e0e0;
  border-radius: 50%;
  left: 0;
}

.route-line::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 6px solid #757575;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  right: 0;
}

.route-line i {
  background: #fff;
  color: #757575;
  font-size: 0.875rem;
  padding: 0 4px;
  display: none;
}

.stops-info {
  font-size: 0.75rem;
  color: #c62828;
  font-weight: 500;
  margin-top: 4px;
}

.flight-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 180px;
  padding-left: 24px;
  border-left: 1px solid #e0e0e0;
}

.price-section {
  text-align: right;
}

.price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
  margin-bottom: 4px;
}

.price-label {
  font-size: 0.7rem;
  color: #757575;
  margin: 0;
}

.booking-options {
  font-size: 0.75rem;
  color: #1976d2;
  font-weight: 500;
  margin-bottom: 8px;
}

.btn-primary {
  background: #003580;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  background: #00245a;
  box-shadow: 0 2px 8px rgba(0, 53, 128, 0.3);
}

.btn-select {
  width: 100%;
}

.no-results {
  text-align: center;
  padding: 100px 20px;
  color: #64748b;
}

.no-results i {
  font-size: 5rem;
  color: #cbd5e1;
  margin-bottom: 24px;
}

.no-results h3 {
  font-size: 2rem;
  color: #334155;
  margin-bottom: 12px;
}

.btn-link {
  background: none;
  border: none;
  color: #0071c2;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 8px 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-link:hover {
  text-decoration: underline;
}

.segments-details {
  margin-top: 12px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.segment {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

.segment:last-child {
  border-bottom: none;
}

/* Favorite icon */
.favorite-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  color: #bdbdbd;
  cursor: pointer;
  transition: color 0.2s ease;
}

.favorite-icon:hover {
  color: #e91e63;
}

.favorite-icon.active {
  color: #e91e63;
}

/* Responsive Design */
@media (max-width: 768px) {
  .flight-card {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }
  
  .flight-header {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    min-width: auto;
  }
  
  .flight-route {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .route-point .time {
    font-size: 1.1rem;
  }
  
  .route-middle {
    min-width: 100px;
  }
  
  .flight-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-left: none;
    border-top: 1px solid #e0e0e0;
    padding-left: 0;
    padding-top: 16px;
    min-width: auto;
  }
  
  .price-section {
    text-align: left;
  }
  
  .btn-select {
    width: auto;
    padding: 10px 20px;
  }
}

