:root {
  --primary: #0a5fff;
  --primary-dark: #0847c4;
  --accent: #ff9d2e;
  --dark: #0f1c3f;
  --gray: #6b7280;
  --light-bg: #f5f7fb;
  --white: #ffffff;
  --radius: 12px;
}

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

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  background: var(--white);
  border-bottom: 1px solid #eaecf0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-weight: 600;
  font-size: 15px;
  color: var(--dark);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  border-color: var(--primary);
}

.nav-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}
.nav-cta:hover { background: var(--primary-dark); }

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
}

.nav-select {
  border: 1px solid #dde1ea;
  background: var(--white);
  color: var(--dark);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  max-width: 92px;
}

#currency-select { max-width: 180px; }

.nav-select:focus { outline: 2px solid var(--primary); }

@media (max-width: 700px) {
  .nav-select { max-width: 70px; font-size: 12px; }
  #currency-select { max-width: 44px; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0a5fff 0%, #063fa6 100%);
  color: var(--white);
  padding: 64px 24px 120px;
  text-align: center;
}

.hero h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 18px;
  opacity: 0.92;
  max-width: 560px;
  margin: 0 auto;
}

/* Search card */
.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(15, 28, 63, 0.18);
  max-width: 980px;
  margin: -64px auto 0;
  padding: 28px;
  position: relative;
  z-index: 5;
}

.search-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.search-tabs button {
  border: none;
  background: var(--light-bg);
  color: var(--gray);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

.search-tabs button.active {
  background: var(--primary);
  color: var(--white);
}

.search-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dde1ea;
  border-radius: 8px;
  font-size: 14px;
  color: var(--dark);
  background: var(--white);
}

.field input:focus, .field select:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}

.search-btn {
  background: var(--accent);
  color: var(--white);
  border: none;
  font-weight: 800;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.search-btn:hover { background: #e88a1a; }

.search-grid.cars-grid { grid-template-columns: 1.2fr 1fr 1fr auto; }

.card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray);
  font-weight: 600;
  margin-bottom: 6px;
}

.card-rating .stars { color: #ffb400; letter-spacing: 1px; font-size: 13px; }

.card-specs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--gray);
  font-weight: 600;
  margin: 10px 0 4px;
}

.card-specs span {
  background: var(--light-bg);
  padding: 3px 9px;
  border-radius: 12px;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.card-tags .stop-badge { background: #eaf7ee; color: #1a8a4a; }

/* Sections */
section {
  padding: 72px 24px;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 44px;
}

.section-head h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 10px;
}

.section-head p {
  color: var(--gray);
  font-size: 16px;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

/* Deal / destination cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.card {
  background: var(--white);
  border: 1px solid #eaecf0;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15,28,63,0.12);
}

.card-img {
  height: 180px;
  background: linear-gradient(135deg, #0a5fff, #4f8cff);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: var(--white);
  font-size: 42px;
  position: relative;
  overflow: hidden;
}

.card-img.photo {
  color: transparent;
}

.card-img.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,28,63,0.05) 0%, rgba(15,28,63,0.55) 100%);
}

.card:hover .card-img.photo {
  transform: scale(1.04);
}

.card-img.photo {
  transition: transform .35s ease;
}

.card-flag {
  position: relative;
  z-index: 2;
  font-size: 26px;
  margin: 12px 0 0 12px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}

.card-badge {
  position: relative;
  z-index: 2;
  margin: 12px 12px 0 0;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  align-self: flex-start;
  white-space: nowrap;
}

.card-body { padding: 20px; }

.card-route {
  font-size: 13px;
  color: var(--gray);
  font-weight: 600;
  margin-bottom: 6px;
}

.card-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 10px;
}

.card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
}

.card-price .amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
}

.card-price .label {
  font-size: 13px;
  color: var(--gray);
}

.card-cta {
  display: block;
  text-align: center;
  background: var(--light-bg);
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  padding: 10px;
  border-radius: 8px;
}

.card-cta:hover { background: #e8eefc; }

/* Filters (deals page) */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.filters button {
  border: 1px solid #dde1ea;
  background: var(--white);
  padding: 9px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--dark);
}

.filters button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Perks */
.perks {
  background: var(--light-bg);
}

.perks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
}

.perk-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
  box-shadow: 0 6px 16px rgba(15,28,63,0.08);
}

.perk h3 { font-size: 16px; margin-bottom: 6px; }
.perk p { font-size: 14px; color: var(--gray); }

/* Contact page */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 980px;
  margin: 0 auto;
}

.contact-info h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.contact-info p { color: var(--gray); margin-bottom: 20px; }

.info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--light-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.info-item strong { display: block; font-size: 14px; }
.info-item span { font-size: 14px; color: var(--gray); }

.contact-form {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 28px;
}

.contact-form .field { margin-bottom: 16px; }

.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dde1ea;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 110px;
}

.submit-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  font-weight: 800;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
}
.submit-btn:hover { background: var(--primary-dark); }

.form-note {
  font-size: 13px;
  color: var(--gray);
  margin-top: 10px;
  text-align: center;
}

/* Destinations page */
.region-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.region-tabs button {
  border: 1px solid #dde1ea;
  background: var(--white);
  padding: 9px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.region-tabs button.active {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--white);
}

/* CTA band */
.cta-band {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 56px 24px;
}

.cta-band h2 { font-size: 28px; margin-bottom: 10px; }
.cta-band p { opacity: 0.85; margin-bottom: 24px; }

.cta-band .search-btn { padding: 14px 32px; font-size: 16px; }

/* Footer */
footer {
  background: #0b1530;
  color: #b6bfd6;
  padding: 48px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1140px;
  margin: 0 auto 32px;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 15px;
  margin-bottom: 16px;
}

.footer-grid ul li { margin-bottom: 10px; font-size: 14px; }
.footer-grid ul li a:hover { color: var(--white); }

.footer-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-logo span { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  max-width: 1140px;
  margin: 0 auto;
  padding-top: 20px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Responsive */
@media (max-width: 900px) {
  .search-grid { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .perks-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 560px) {
  .search-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .perks-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
}

/* ===== Photo gallery ("Popular Destinations") ===== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 160px;
  grid-auto-flow: dense;
  gap: 14px;
  max-width: 1140px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  grid-column: span 2;
}

.gallery-item.large {
  grid-column: span 3;
  grid-row: span 2;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,28,63,0) 40%, rgba(15,28,63,0.75) 100%);
  transition: background .25s ease;
}

.gallery-item:hover::after {
  background: linear-gradient(180deg, rgba(10,95,255,0.15) 0%, rgba(15,28,63,0.85) 100%);
}

.gallery-item img.gallery-fallback-hide {
  display: none;
}

.gallery-caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  color: var(--white);
}

.gallery-caption .country {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.gallery-caption .city {
  font-size: 18px;
  font-weight: 800;
}

.gallery-item.large .gallery-caption .city {
  font-size: 26px;
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; }
  .gallery-item { grid-column: span 1 !important; grid-row: span 1 !important; height: 160px; }
}

/* ===== Hero flight-path decoration ===== */

.hero-plane-scene {
  position: relative;
  height: 40px;
  max-width: 420px;
  margin: 8px auto 0;
}

.hero-plane-scene .cloud {
  position: absolute;
  font-size: 20px;
  opacity: 0.5;
  animation: drift 14s linear infinite;
}
.hero-plane-scene .cloud:nth-child(1) { top: 0; animation-delay: 0s; }
.hero-plane-scene .cloud:nth-child(2) { top: 16px; animation-delay: -5s; font-size: 16px; }
.hero-plane-scene .cloud:nth-child(3) { top: 4px; animation-delay: -10s; font-size: 14px; }

.hero-plane-scene .hero-plane {
  position: absolute;
  top: 6px;
  font-size: 24px;
  animation: fly-across 5s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

@keyframes drift {
  0% { left: -10%; }
  100% { left: 110%; }
}

/* ===== Live flight results page ===== */

.flight-hero {
  background: linear-gradient(160deg, #071a3f 0%, #0a5fff 55%, #0847c4 100%);
  color: var(--white);
  padding: 48px 24px 40px;
  position: relative;
  overflow: hidden;
}

.flight-hero::before,
.flight-hero::after {
  content: "";
  position: absolute;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 50%;
}
.flight-hero::before { width: 500px; height: 500px; top: -260px; right: -140px; }
.flight-hero::after { width: 320px; height: 320px; bottom: -200px; left: -80px; }

.route-summary {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
}

.route-summary .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}
.route-summary .back-link:hover { color: var(--white); }

.route-line {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 30px;
  font-weight: 800;
  flex-wrap: wrap;
}

.route-path {
  flex: 1;
  min-width: 120px;
  max-width: 260px;
  height: 2px;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.6) 60%, transparent 40%);
  background-size: 14px 2px;
  position: relative;
}

.route-path .plane-icon {
  position: absolute;
  top: -13px;
  left: 0%;
  font-size: 22px;
  animation: fly-across 2.6s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

@keyframes fly-across {
  0%   { left: 0%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 96%; opacity: 0; }
}

.route-meta {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* Loading state */
.flight-loading {
  text-align: center;
  padding: 70px 24px;
}

.loading-plane {
  font-size: 46px;
  display: inline-block;
  animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

.flight-loading p {
  margin-top: 18px;
  color: var(--gray);
  font-weight: 600;
  font-size: 15px;
}

.skeleton-row {
  max-width: 780px;
  margin: 36px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skeleton-card {
  height: 92px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #eef1f7 25%, #f7f9fc 37%, #eef1f7 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* Results */
.results-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--gray);
  font-weight: 600;
}

.offer-card {
  background: var(--white);
  border: 1px solid #eaecf0;
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  transition: box-shadow .2s, transform .2s;
}

.offer-card:hover {
  box-shadow: 0 12px 26px rgba(15,28,63,0.1);
  transform: translateY(-2px);
}

.offer-slice {
  flex: 1;
  min-width: 0;
}

.offer-slice + .offer-slice {
  border-top: 1px dashed #eaecf0;
  padding-top: 12px;
  margin-top: 12px;
}

.offer-airline {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.offer-times {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
}

.offer-times .offer-route-icon {
  flex: 1;
  min-width: 60px;
  height: 1px;
  background-image: linear-gradient(90deg, #c7cedd 60%, transparent 40%);
  background-size: 8px 1px;
  position: relative;
  text-align: center;
}

.offer-times .offer-route-icon span {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  background: var(--white);
  padding: 0 4px;
}

.offer-sub {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--gray);
  font-weight: 600;
  flex-wrap: wrap;
}

.stop-badge {
  background: var(--light-bg);
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.offer-price-block {
  text-align: right;
  flex-shrink: 0;
}

.offer-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.offer-price-note {
  font-size: 11px;
  color: var(--gray);
  margin-bottom: 6px;
}

.offer-select-btn {
  margin-top: 10px;
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
.offer-select-btn:hover { background: #e88a1a; }

.results-empty, .results-error {
  text-align: center;
  padding: 60px 24px;
  color: var(--gray);
  font-weight: 600;
}

.results-footer-note {
  text-align: center;
  font-size: 13px;
  color: var(--gray);
  margin-top: 24px;
}

@media (max-width: 640px) {
  .offer-card { flex-direction: column; align-items: stretch; }
  .offer-price-block { text-align: left; }
  .route-line { font-size: 22px; }
}
