/*
Theme Name: WorthFlights
Theme URI: https://worthflights.com
Author: WorthFlights Team
Author URI: https://worthflights.com
Description: A premium flight search website theme for WorthFlights.com — inspired by Skyscanner with a distinctive dark, luxury aesthetic featuring gold & teal accents.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: worthflights
Tags: travel, flights, booking, dark, custom-colors, custom-logo, full-width-template

*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --sky: #0a1628;
  --deep: #060e1c;
  --gold: #f5c842;
  --gold-light: #fde68a;
  --teal: #00c9b1;
  --teal-dim: rgba(0,201,177,0.12);
  --white: #f0f4ff;
  --muted: rgba(240,244,255,0.45);
  --card: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.09);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--deep);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--teal); text-decoration: none; }
a:hover { opacity: 0.8; }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   BACKGROUND EFFECTS
   ============================================================ */
.wf-bg-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, #1a3a6e 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 80%, #0d3330 0%, transparent 60%),
              var(--deep);
}

.wf-stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 15%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 45% 65%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 50%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 5%, rgba(255,255,255,0.45) 0%, transparent 100%);
}

.wf-plane-fly {
  position: fixed; top: 22%; left: -80px; z-index: 3;
  font-size: 1.6rem; opacity: 0.18;
  animation: flyAcross 18s linear infinite;
  pointer-events: none;
}

@keyframes flyAcross {
  0%   { left: -80px;              top: 22%; }
  100% { left: calc(100vw + 80px); top: 18%; }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 3rem;
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  background: rgba(6,14,28,0.6);
}

.site-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--white);
  text-decoration: none;
}

.site-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--teal));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.site-logo span { color: var(--gold); }

/* WordPress nav menu */
.main-navigation ul {
  display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0;
}
.main-navigation ul li a {
  color: var(--muted); font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.02em; transition: color 0.2s;
}
.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a { color: var(--white); }

.nav-cta {
  background: var(--gold); color: var(--deep);
  border: none; padding: 0.6rem 1.4rem;
  border-radius: 100px; font-size: 0.85rem;
  font-weight: 600; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: opacity 0.2s, transform 0.2s;
  text-decoration: none;
}
.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); color: var(--deep); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.wf-hero {
  position: relative; z-index: 5;
  text-align: center;
  padding: 5rem 2rem 3rem;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--teal-dim); border: 1px solid rgba(0,201,177,0.3);
  color: var(--teal); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.4rem 1rem; border-radius: 100px;
  margin-bottom: 1.8rem;
  animation: fadeDown 0.6s ease both;
}

.wf-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900; line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 1.2rem;
  animation: fadeDown 0.7s 0.1s ease both;
}

.wf-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wf-hero p.hero-subtitle {
  color: var(--muted); font-size: 1.1rem;
  max-width: 480px; margin: 0 auto 3rem; line-height: 1.6;
  animation: fadeDown 0.7s 0.2s ease both;
}

/* ============================================================
   SEARCH CARD
   ============================================================ */
.wf-search-card {
  position: relative; z-index: 5;
  max-width: 900px; margin: 0 auto 4rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  border-radius: 24px; padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: fadeUp 0.8s 0.25s ease both;
}

.trip-tabs {
  display: flex; gap: 0.4rem; margin-bottom: 1.8rem;
}

.tab {
  padding: 0.5rem 1.1rem; border-radius: 100px;
  font-size: 0.85rem; font-weight: 500; cursor: pointer;
  border: 1px solid transparent;
  background: transparent; color: var(--muted);
  font-family: 'DM Sans', sans-serif; transition: all 0.2s;
}
.tab.active {
  background: var(--teal-dim); border-color: rgba(0,201,177,0.4); color: var(--teal);
}
.tab:hover:not(.active) { color: var(--white); border-color: var(--card-border); }

.search-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 1rem; align-items: end;
}

.field-group { display: flex; flex-direction: column; gap: 0.4rem; }

.field-label {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}

.field-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  border-radius: 12px; padding: 0.85rem 1rem;
  color: var(--white); font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif; width: 100%;
  transition: border-color 0.2s, background 0.2s; outline: none;
}
.field-input::placeholder { color: rgba(240,244,255,0.3); }
.field-input:focus {
  border-color: rgba(0,201,177,0.5); background: rgba(0,201,177,0.06);
}

.swap-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--card-border);
  color: var(--muted); border-radius: 12px;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
  transition: all 0.2s; align-self: end; flex-shrink: 0;
}
.swap-btn:hover {
  background: var(--teal-dim); color: var(--teal);
  border-color: rgba(0,201,177,0.4); transform: rotate(180deg);
}

.passengers-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1.2rem; padding-top: 1.2rem;
  border-top: 1px solid var(--card-border);
}

.pax-select { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }

.pax-label { font-size: 0.82rem; color: var(--muted); }

.pax-chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  color: var(--muted); border-radius: 100px;
  padding: 0.4rem 1rem; font-size: 0.82rem;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}
.pax-chip.active {
  background: rgba(245,200,66,0.15); border-color: rgba(245,200,66,0.4); color: var(--gold);
}

.search-btn {
  background: linear-gradient(135deg, var(--gold) 0%, #e8b83a 100%);
  color: var(--deep); border: none;
  padding: 0.85rem 2.2rem; border-radius: 12px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  display: flex; align-items: center; gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(245,200,66,0.3); white-space: nowrap;
}
.search-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(245,200,66,0.45); }

/* ============================================================
   SECTIONS
   ============================================================ */
.wf-section {
  position: relative; z-index: 5;
  max-width: 960px; margin: 0 auto;
  padding: 0 2rem 5rem;
}

.section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; font-weight: 700;
}

.section-link {
  color: var(--teal); font-size: 0.85rem; font-weight: 500;
  transition: opacity 0.2s;
}
.section-link:hover { opacity: 0.75; }

/* ============================================================
   DEALS GRID
   ============================================================ */
.deals-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
}

.deal-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 18px; padding: 1.4rem; cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.deal-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  opacity: 0; transition: opacity 0.25s;
}
.deal-card:hover { transform: translateY(-4px); border-color: rgba(0,201,177,0.25); box-shadow: 0 16px 48px rgba(0,0,0,0.35); }
.deal-card:hover::before { opacity: 1; }

.deal-route { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; }
.deal-city { font-weight: 600; font-size: 1rem; }
.deal-arrow { color: var(--muted); font-size: 0.75rem; }

.deal-badge {
  display: inline-block;
  background: rgba(245,200,66,0.15); color: var(--gold);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.25rem 0.6rem;
  border-radius: 6px; margin-bottom: 0.8rem;
}

.deal-price { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; }
.deal-price span {
  font-family: 'DM Sans', sans-serif; font-size: 0.82rem;
  font-weight: 400; color: var(--muted); margin-left: 0.3rem;
}

.deal-meta { color: var(--muted); font-size: 0.8rem; margin-top: 0.5rem; }

/* ============================================================
   FEATURES
   ============================================================ */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
}

.feature-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 18px; padding: 1.5rem; text-align: center;
}
.feature-icon { font-size: 2rem; margin-bottom: 0.8rem; display: block; }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.feature-card p { color: var(--muted); font-size: 0.83rem; line-height: 1.5; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative; z-index: 5;
  border-top: 1px solid var(--card-border);
  padding: 2rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 0.8rem;
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }

/* ============================================================
   MODAL
   ============================================================ */
.wf-modal {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(6,14,28,0.85); backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
}
.wf-modal.open { display: flex; }

.modal-box {
  background: #0d1f3c; border: 1px solid var(--card-border);
  border-radius: 24px; padding: 2.5rem;
  width: 90%; max-width: 480px;
  box-shadow: 0 32px 100px rgba(0,0,0,0.6);
  animation: fadeUp 0.3s ease both;
}
.modal-box h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 0.5rem; }
.modal-box p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.result-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 0; border-bottom: 1px solid var(--card-border);
}
.result-airline { font-weight: 500; }
.result-times { color: var(--muted); font-size: 0.85rem; }
.result-price { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--gold); }

.modal-close {
  margin-top: 1.5rem; background: transparent;
  border: 1px solid var(--card-border); color: var(--muted);
  border-radius: 12px; padding: 0.7rem 1.5rem; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; width: 100%;
  transition: all 0.2s;
}
.modal-close:hover { border-color: var(--teal); color: var(--teal); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   WORDPRESS CORE COMPATIBILITY
   ============================================================ */
.wp-caption { max-width: 100%; }
.wp-caption-text { text-align: center; font-size: 0.85rem; color: var(--muted); }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.sticky { /* WordPress sticky post */ }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px); position: absolute;
  height: 1px; width: 1px; overflow: hidden;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  .site-header { padding: 1rem 1.5rem; }
  .main-navigation { display: none; }
  .search-row { grid-template-columns: 1fr 1fr; }
  .deals-grid, .features-grid { grid-template-columns: 1fr; }
  .wf-section { padding: 0 1rem 3rem; }
  .site-footer { flex-direction: column; gap: 1rem; text-align: center; }
}
