/* ==========================================================================
   THEFLIGHTMASTER - LUXURY TRAVEL DESIGN SYSTEM (PURE CSS & MODERN LAYOUTS)
   ========================================================================== */

:root {
  --tfm-navy: #0B1B3D;
  --tfm-navy-dark: #071026;
  --tfm-navy-light: #162B56;
  --tfm-blue: #0284C7;
  --tfm-blue-light: #E0F2FE;
  --tfm-accent: #EA580C;
  --tfm-accent-hover: #C2410C;
  --tfm-gold: #D97706;
  --tfm-gold-light: #FEF3C7;
  --tfm-slate-50: #F8FAFC;
  --tfm-slate-100: #F1F5F9;
  --tfm-slate-200: #E2E8F0;
  --tfm-slate-300: #CBD5E1;
  --tfm-slate-400: #94A3B8;
  --tfm-slate-600: #475569;
  --tfm-slate-700: #334155;
  --tfm-slate-800: #1E293B;
  --tfm-slate-900: #0F172A;
  --tfm-whatsapp: #25D366;
  --tfm-whatsapp-dark: #1EBE5D;
  --tfm-shadow-sm: 0 1px 3px rgba(11, 27, 61, 0.06), 0 1px 2px rgba(11, 27, 61, 0.04);
  --tfm-shadow-md: 0 4px 14px -2px rgba(11, 27, 61, 0.08), 0 2px 6px -1px rgba(11, 27, 61, 0.05);
  --tfm-shadow-lg: 0 12px 30px -4px rgba(11, 27, 61, 0.12), 0 4px 10px -2px rgba(11, 27, 61, 0.06);
  --tfm-shadow-xl: 0 24px 50px -8px rgba(11, 27, 61, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: #F8FAFC;
  color: var(--tfm-slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Light backgrounds default to navy headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--tfm-navy);
}

/* Guarantee bright, crisp white text for headings on dark sections */
.text-white,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5,
.tfm-hero h1, .tfm-hero h2, .tfm-hero h3,
.bg-slate-900 h1, .bg-slate-900 h2, .bg-slate-900 h3, .bg-slate-900 h4,
.bg-slate-950 h1, .bg-slate-950 h2, .bg-slate-950 h3, .bg-slate-950 h4,
.bg-gradient-to-r h1, .bg-gradient-to-r h2, .bg-gradient-to-r h3,
.bg-gradient-to-b h1, .bg-gradient-to-b h2, .bg-gradient-to-b h3 {
  color: #FFFFFF !important;
}

/* High Contrast Readability Helpers */
.text-slate-400 {
  color: #64748B !important; /* Darkened from #94A3B8 for WCAG AA compliance on light backgrounds */
}
.text-slate-500 {
  color: #475569 !important; /* Darkened from #64748B for high contrast readability */
}

/* Bright, legible typography on all dark containers */
footer .text-slate-400,
.bg-slate-950 .text-slate-400,
.bg-slate-900 .text-slate-400,
.bg-sky-950 .text-slate-400,
.bg-gradient-to-b .text-slate-400,
.bg-gradient-to-r .text-slate-400,
.tfm-hero .text-slate-400 {
  color: #CBD5E1 !important; /* Brightened on dark backgrounds */
}

footer .text-slate-300,
.bg-slate-950 .text-slate-300,
.bg-slate-900 .text-slate-300,
.bg-sky-950 .text-slate-300,
.bg-gradient-to-b .text-slate-300,
.bg-gradient-to-r .text-slate-300,
.tfm-hero .text-slate-300 {
  color: #F1F5F9 !important; /* Crisp off-white on dark backgrounds */
}

.tfm-hero p,
.bg-gradient-to-b p,
.bg-slate-900 p,
.bg-slate-950 p {
  color: #F1F5F9;
}

/* High contrast input placeholders */
::placeholder {
  color: #64748B !important;
  opacity: 1 !important;
}
::-webkit-input-placeholder {
  color: #64748B !important;
  opacity: 1 !important;
}
::-moz-placeholder {
  color: #64748B !important;
  opacity: 1 !important;
}
:-ms-input-placeholder {
  color: #64748B !important;
  opacity: 1 !important;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

/* Luxury Header */
.tfm-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s ease;
}

.tfm-header.scrolled {
  box-shadow: 0 4px 20px rgba(11, 27, 61, 0.08);
}

/* Logo */
.tfm-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--tfm-navy) 0%, var(--tfm-blue) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

/* Hero Section */
.tfm-hero {
  position: relative;
  min-height: 580px;
  background: linear-gradient(180deg, rgba(7, 16, 38, 0.72) 0%, rgba(11, 27, 61, 0.85) 100%),
              url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?auto=format&fit=crop&w=1920&q=80') center center / cover no-repeat;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 20px 100px;
}

/* Main Search Card */
.tfm-search-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  box-shadow: var(--tfm-shadow-xl);
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  position: relative;
  z-index: 20;
  margin-top: -60px;
}

/* Tabs */
.tfm-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
  color: var(--tfm-slate-600);
}

.tfm-tab-btn.active {
  background: var(--tfm-navy);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(11, 27, 61, 0.2);
}

.tfm-tab-btn:hover:not(.active) {
  background: var(--tfm-slate-100);
  color: var(--tfm-navy);
}

/* Autocomplete Dropdown */
.tfm-autocomplete-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  border: 1px solid var(--tfm-slate-200);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.tfm-autocomplete-item {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid var(--tfm-slate-100);
  transition: background 0.15s ease;
}

.tfm-autocomplete-item:hover {
  background: var(--tfm-blue-light);
}

.tfm-airport-code {
  background: var(--tfm-slate-100);
  color: var(--tfm-navy);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Flight Route Visualizer in Card */
.tfm-route-line {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 2px;
  background: var(--tfm-slate-300);
  margin: 12px 0 6px;
}

.tfm-route-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tfm-blue);
}

.tfm-route-plane {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  padding: 0 6px;
  color: var(--tfm-blue);
  font-size: 14px;
}

.tfm-route-stop-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  color: var(--tfm-slate-600);
  font-weight: 600;
  white-space: nowrap;
}

/* Luxury Buttons */
.btn-tfm-primary {
  background: linear-gradient(135deg, var(--tfm-accent) 0%, #F97316 100%);
  color: white;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  transition: all 0.25s ease;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.btn-tfm-primary:hover {
  background: linear-gradient(135deg, #C2410C 0%, #EA580C 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
}

.btn-tfm-navy {
  background: var(--tfm-navy);
  color: white;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-tfm-navy:hover {
  background: var(--tfm-navy-light);
  transform: translateY(-1px);
}

.btn-tfm-outline {
  background: transparent;
  color: var(--tfm-navy);
  border: 1.5px solid var(--tfm-slate-300);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-tfm-outline:hover {
  border-color: var(--tfm-navy);
  background: var(--tfm-slate-50);
}

.btn-tfm-whatsapp {
  background: var(--tfm-whatsapp);
  color: white;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.28);
  transition: all 0.2s ease;
}

.btn-tfm-whatsapp:hover {
  background: var(--tfm-whatsapp-dark);
  transform: translateY(-1px);
}

/* Flight & Hotel Cards */
.tfm-flight-card, .tfm-hotel-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--tfm-slate-200);
  padding: 20px;
  box-shadow: var(--tfm-shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.tfm-flight-card:hover, .tfm-hotel-card:hover {
  box-shadow: var(--tfm-shadow-lg);
  border-color: rgba(2, 132, 199, 0.4);
  transform: translateY(-2px);
}

/* Live Indicative Price Tag */
.tfm-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECFDF5;
  color: #065F46;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid #A7F3D0;
}

.tfm-live-dot {
  width: 6px;
  height: 6px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Modals & Backdrop */
.tfm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 16, 38, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.tfm-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.tfm-modal-content {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--tfm-shadow-xl);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

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

.tfm-modal-close {
  color: #475569 !important;
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 6px;
}

.tfm-modal-close:hover {
  color: #0F172A !important;
  background: #F1F5F9;
  transform: scale(1.1);
}

/* Floating WhatsApp Button */
.tfm-floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  background: var(--tfm-whatsapp);
  color: white;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tfm-floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

/* Mobile Sticky Bar */
.tfm-mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--tfm-slate-200);
  padding: 12px 16px;
  z-index: 80;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
  .tfm-mobile-sticky-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .tfm-floating-whatsapp {
    bottom: 80px;
    right: 16px;
    width: 50px;
    height: 50px;
  }
}

/* Form Input Styling */
.tfm-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--tfm-slate-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  background: #FFFFFF;
  color: var(--tfm-slate-900);
  transition: all 0.2s ease;
  outline: none;
}

.tfm-input:focus {
  border-color: var(--tfm-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Admin Table */
.tfm-admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-new { background: #FEF3C7; color: #92400E; }
.badge-pending { background: #EFF6FF; color: #1E40AF; }
.badge-contacted { background: #E0E7FF; color: #3730A3; }
.badge-quoted { background: #F3E8FF; color: #6B21A8; }
.badge-confirmed { background: #DCFCE7; color: #166534; }
.badge-closed { background: #F1F5F9; color: #475569; }
