/*
Theme Name: Travo
Theme URI: https://travo.qheemstation.com
Author: Travo Team
Author URI: https://qheemstation.com
Description: Travo - Flight, Hotel & Car Rental Search Theme powered by Amadeus and Booking.com APIs
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: travo
Tags: travel, flights, hotels, booking, custom-colors, custom-logo, full-width-template
*/

/* ── CSS VARIABLES ─────────────────────────────────────────────────────────── */
:root {
  --blue: #1a6fc4;
  --blue-dark: #145aa0;
  --blue-light: #e8f1fb;
  --yellow: #f5a623;
  --yellow-dark: #e0941a;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f0f4fa;
  --card-bg: #ffffff;
  --nav-bg: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(26,111,196,0.10);
  --font: 'Poppins', sans-serif;
}

body.dark-mode {
  --blue: #4fa3e0;
  --blue-dark: #3a8fc7;
  --blue-light: #1a2a3a;
  --text: #e8eaf0;
  --muted: #9ca3af;
  --border: #2d3748;
  --bg: #111827;
  --card-bg: #1e2533;
  --nav-bg: #161d2b;
  --shadow: 0 2px 16px rgba(0,0,0,0.4);
}

/* ── RESET & BASE ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; height: auto; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

/* ── NAVIGATION ─────────────────────────────────────────────────────────────── */
#site-header {
  background: var(--nav-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--blue);
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img {
  height: 38px;
  width: auto;
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--blue), #4fa3e0);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: white;
  box-shadow: 0 2px 8px rgba(26,111,196,0.3);
  flex-shrink: 0;
}
#primary-menu {
  display: flex;
  gap: 4px;
  flex: 1;
  list-style: none;
  margin: 0; padding: 0;
}
#primary-menu li a {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
#primary-menu li a:hover,
#primary-menu li.current-menu-item a,
#primary-menu li.active a {
  background: var(--blue-light);
  color: var(--blue);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.btn-lang, .btn-dark {
  background: var(--blue-light);
  border: none;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-lang:hover, .btn-dark:hover { background: var(--blue); color: white; }
.btn-signin {
  background: var(--blue);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-signin:hover { background: var(--blue-dark); }
.btn-signin.logged-in { background: #10b981; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--blue);
  cursor: pointer;
}

/* ── HERO / SEARCH ──────────────────────────────────────────────────────────── */
.travo-hero {
  background: linear-gradient(135deg, #1a6fc4 0%, #2563eb 60%, #3b82f6 100%);
  padding: 32px 32px 42px;
  color: white;
}
.travo-hero h1 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 18px;
  opacity: 0.95;
}
.trip-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.trip-tab {
  background: rgba(255,255,255,0.18);
  border: none;
  padding: 7px 18px;
  border-radius: 20px;
  color: white;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.trip-tab.active,
.trip-tab:hover { background: rgba(255,255,255,0.38); }

.search-box {
  background: white;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr auto 1fr 160px 160px 180px auto;
  align-items: stretch;
  box-shadow: 0 4px 28px rgba(0,0,0,0.18);
  overflow: hidden;
}
.search-field {
  padding: 14px 18px;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.search-field label {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 5px;
}
.search-field input,
.search-field select {
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  width: 100%;
  background: transparent;
}
.swap-btn {
  background: var(--blue-light);
  border: 2px solid var(--blue);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; color: var(--blue);
  flex-shrink: 0; align-self: center;
  margin: 0 -12px; z-index: 2;
  transition: all 0.2s;
}
.swap-btn:hover { background: var(--blue); color: white; }
.btn-search {
  background: var(--yellow);
  border: none; color: white;
  padding: 0 28px;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 66px;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-search:hover { background: var(--yellow-dark); }
.btn-search:disabled { opacity: 0.7; cursor: not-allowed; }

/* ── RESULTS LAYOUT ─────────────────────────────────────────────────────────── */
.travo-results {
  display: flex;
  gap: 24px;
  padding: 28px 32px;
  max-width: 1320px;
  margin: 0 auto;
}

/* ── SIDEBAR ────────────────────────────────────────────────────────────────── */
.travo-sidebar {
  width: 268px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filter-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: background 0.3s;
}
.filter-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}
.stop-tabs { display: flex; gap: 6px; }
.stop-tab {
  flex: 1; padding: 7px 0;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: white; font-size: 0.8rem;
  font-weight: 500; cursor: pointer;
  transition: all 0.2s; color: var(--muted);
}
.stop-tab.active { background: var(--blue); color: white; border-color: var(--blue); }
input[type="range"] { width: 100%; accent-color: var(--blue); cursor: pointer; }
.price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}
.checkbox-list { display: flex; flex-direction: column; gap: 10px; }
.checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.checkbox-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  cursor: pointer;
}
.checkbox-item input[type="checkbox"] {
  accent-color: var(--blue);
  width: 15px; height: 15px;
}
.count-badge {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--blue-light);
  padding: 1px 8px;
  border-radius: 10px;
}
.btn-reset {
  background: none; border: none;
  color: var(--blue); font-size: 0.78rem;
  cursor: pointer; font-weight: 600;
}

/* ── FLIGHT CARDS ───────────────────────────────────────────────────────────── */
.travo-listings { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.listings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.results-count { font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.sort-tabs { display: flex; gap: 6px; }
.sort-tab {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: white; font-size: 0.8rem;
  font-weight: 500; cursor: pointer;
  color: var(--muted); transition: all 0.2s;
}
.sort-tab.active { background: var(--blue); color: white; border-color: var(--blue); }

.flight-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.22s;
  position: relative;
}
.flight-card:hover { border-color: var(--blue); box-shadow: 0 4px 24px rgba(26,111,196,0.13); }
.flight-card.best-deal { border-color: var(--yellow); }
.best-badge {
  position: absolute; top: -1px; right: 18px;
  background: var(--yellow); color: white;
  font-size: 0.68rem; font-weight: 700;
  padding: 2px 10px; border-radius: 0 0 8px 8px;
  letter-spacing: 0.5px;
}
.airline-logo {
  width: 46px; height: 46px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem; color: white;
  flex-shrink: 0; background: var(--blue);
}
.airline-info { min-width: 130px; }
.airline-name { font-weight: 600; font-size: 0.92rem; }
.airline-sub { font-size: 0.73rem; color: var(--muted); }
.flight-route {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.route-time { font-size: 1.2rem; font-weight: 700; }
.route-airport { font-size: 0.72rem; color: var(--muted); text-align: center; }
.route-line {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.route-bar {
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--border), var(--blue), var(--border));
  border-radius: 2px;
}
.route-duration { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.route-stop { font-size: 0.72rem; font-weight: 600; }
.route-stop.direct { color: #10b981; }
.route-stop.has-stop { color: var(--yellow); }
.flight-price { text-align: right; min-width: 135px; }
.price-amount { font-size: 1.45rem; font-weight: 800; color: var(--blue); }
.price-per { font-size: 0.7rem; color: var(--muted); }
.price-total { font-size: 0.75rem; color: var(--muted); }
.btn-book {
  background: var(--blue); color: white; border: none;
  padding: 10px 22px; border-radius: 8px;
  font-size: 0.88rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.btn-book:hover { background: var(--blue-dark); transform: translateY(-1px); }

/* ── HOTELS ─────────────────────────────────────────────────────────────────── */
.hotels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 18px;
}
.hotel-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.25s;
  cursor: pointer;
}
.hotel-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.hotel-thumb {
  width: 100%; height: 165px;
  object-fit: cover;
  background: linear-gradient(135deg, #1a6fc4, #4fa3e0);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem; color: white;
}
.hotel-body { padding: 14px; }
.hotel-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.hotel-location { font-size: 0.78rem; color: var(--muted); margin-bottom: 7px; }
.hotel-stars { color: #f5a623; font-size: 0.85rem; margin-bottom: 7px; }
.hotel-amenities { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.amenity-tag {
  background: var(--blue-light); color: var(--blue);
  font-size: 0.68rem; padding: 2px 8px;
  border-radius: 10px; font-weight: 500;
}
.hotel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hotel-price { font-size: 1.15rem; font-weight: 800; color: var(--blue); }
.hotel-price-label { font-size: 0.7rem; color: var(--muted); }
.btn-hotel-book {
  background: var(--yellow); color: white; border: none;
  padding: 7px 16px; border-radius: 7px;
  font-size: 0.8rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.btn-hotel-book:hover { background: var(--yellow-dark); }

/* ── CARS ───────────────────────────────────────────────────────────────────── */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 18px;
}
.car-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.25s;
}
.car-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.car-thumb {
  width: 100%; height: 150px;
  background: linear-gradient(135deg, #1a3a5c, #1a6fc4);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.car-body { padding: 14px; }
.car-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.car-type { font-size: 0.75rem; color: var(--muted); margin-bottom: 8px; }
.car-features { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.car-feat { font-size: 0.72rem; color: var(--muted); }
.car-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.car-price { font-size: 1.1rem; font-weight: 800; color: var(--blue); }
.car-price-label { font-size: 0.7rem; color: var(--muted); }
.btn-car-book {
  background: var(--yellow); color: white; border: none;
  padding: 7px 16px; border-radius: 7px;
  font-size: 0.8rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.btn-car-book:hover { background: var(--yellow-dark); }

/* ── MODALS ─────────────────────────────────────────────────────────────────── */
.travo-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.travo-modal-overlay.open { display: flex; }
.travo-modal {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 32px;
  width: 400px; max-width: 95vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  position: relative;
}
.travo-modal h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.travo-modal p { font-size: 0.84rem; color: var(--muted); margin-bottom: 22px; }
.travo-modal input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.9rem;
  margin-bottom: 14px;
  outline: none;
  transition: border 0.2s;
  background: var(--bg);
  color: var(--text);
}
.travo-modal input:focus { border-color: var(--blue); }
.btn-modal-submit {
  width: 100%;
  background: var(--blue); color: white; border: none;
  padding: 12px; border-radius: 8px;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s; margin-bottom: 10px;
}
.btn-modal-submit:hover { background: var(--blue-dark); }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none;
  font-size: 1.5rem; cursor: pointer; color: var(--muted);
}
.modal-divider { text-align: center; color: var(--muted); font-size: 0.8rem; margin: 6px 0 10px; }
.btn-google {
  width: 100%;
  background: white; border: 1.5px solid var(--border);
  padding: 11px; border-radius: 8px;
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s;
}
.btn-google:hover { border-color: var(--blue); background: var(--blue-light); }

/* ── MESSAGE BOX ────────────────────────────────────────────────────────────── */
.travo-message {
  text-align: center;
  padding: 60px 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.travo-message .msg-icon { font-size: 2.8rem; margin-bottom: 12px; }
.travo-message h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.travo-message p { color: var(--muted); font-size: 0.85rem; }

/* ── LOADING SPINNER ────────────────────────────────────────────────────────── */
.travo-loading { text-align: center; padding: 60px; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--blue-light);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MAP PLACEHOLDER ────────────────────────────────────────────────────────── */
.map-placeholder {
  width: 100%; height: 300px;
  border-radius: var(--radius);
  background: var(--blue-light);
  display: flex; align-items: center;
  justify-content: center; flex-direction: column; gap: 8px;
  border: 2px dashed var(--border);
  color: var(--muted); font-size: 0.88rem;
}

/* ── AGENT PORTAL ───────────────────────────────────────────────────────────── */
.agent-portal {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 22px 32px;
}
.agent-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.agent-stat {
  background: var(--blue-light);
  border-radius: 10px;
  padding: 16px;
}
.agent-stat .val { font-size: 1.6rem; font-weight: 800; color: var(--blue); }
.agent-stat .key { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* ── FOOTER ─────────────────────────────────────────────────────────────────── */
#site-footer {
  background: #0f1724;
  color: #9ca3af;
  padding: 48px 32px 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.footer-brand .site-logo { color: white; margin-bottom: 14px; }
.footer-brand p { font-size: 0.84rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 { color: white; font-size: 0.9rem; font-weight: 700; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { color: #9ca3af; font-size: 0.84rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--yellow); }
.footer-bottom {
  border-top: 1px solid #1e2d3d;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.8rem;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .search-box {
    grid-template-columns: 1fr auto 1fr 150px 150px;
    grid-template-rows: auto auto;
  }
  .btn-search { grid-column: 1 / -1; min-height: 52px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  #site-header { padding: 0 16px; gap: 12px; }
  #primary-menu { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--nav-bg); padding: 16px; box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
  #primary-menu.open { display: flex; }
  .menu-toggle { display: block; }
  .travo-hero { padding: 20px 16px 28px; }
  .search-box { grid-template-columns: 1fr 1fr; }
  .swap-btn { display: none; }
  .travo-results { flex-direction: column; padding: 16px; }
  .travo-sidebar { width: 100%; }
  .agent-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
