/* Global Variables and Colors for Sky Deals Hub */
:root {
  --primary-color: #0d9488; /* Teal */
  --primary-hover: #0f766e;
  --secondary-color: #1e3a8a; /* Navy Blue */
  --secondary-hover: #1e40af;
  --bg-color: #f7f9fc;
  --text-color: #1d2433;
  --text-muted: #6b7280;
  --border-color: #dbe0ec;
  --white: #ffffff;
  --black: #000000;
  --danger: #e11d48;
  --font-family: 'Poppins', 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

/* Header */
header {
  background-color: var(--secondary-color);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo a {
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

.nav-links a {
  font-weight: 600;
  font-size: 15px;
  transition: color 0.3s ease;
}

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

.header-cta .btn {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-cta .btn:hover {
  background-color: var(--primary-hover);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
  color: var(--white);
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 18px;
  margin-bottom: 40px;
  opacity: 0.9;
}

/* Google Flights Style Search Widget */
.search-widget {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  max-width: 900px;
  margin: -40px auto 40px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  color: var(--text-color);
  text-align: left;
  position: relative;
  z-index: 10;
}

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

.search-control-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-control-btn:hover {
  color: var(--text-color);
}

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

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.btn-search {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  height: 47px;
}

.btn-search:hover {
  background-color: var(--primary-hover);
}

/* Features Section */
.features {
  padding: 60px 0;
  background-color: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 32px;
  color: var(--primary-color);
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
}

/* Top Cities / Deals Section */
.top-deals {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 10px;
}

.section-title span {
  color: var(--primary-color);
}

.section-subtitle {
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.deal-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 250px;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

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

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

.deal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0) 50%);
}

.deal-info {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: var(--white);
}

.deal-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

.deal-city {
  font-size: 18px;
  font-weight: 600;
}

/* Policies Section */
.policies {
  padding: 60px 0;
  background-color: var(--white);
}

.policies-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.policy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--secondary-color);
  transition: all 0.3s ease;
}

.policy-btn:hover {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* Content Area (for About, Terms, Privacy) */
.content-area {
  padding: 60px 0;
  background-color: var(--white);
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.content-wrapper h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.content-wrapper p {
  margin-bottom: 15px;
  color: var(--text-color);
}

.content-wrapper strong {
  display: block;
  margin-top: 20px;
  margin-bottom: 5px;
  color: var(--secondary-color);
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.footer-col p {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 20px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 992px) {
  .search-form {
    grid-template-columns: 1fr 1fr;
  }
  .btn-search {
    grid-column: span 2;
  }
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .policies-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background-color: var(--secondary-color);
    flex-direction: column;
    padding: 20px;
    text-align: center;
  }
  .nav-links.active {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
  .header-cta {
    display: none;
  }
  .search-form {
    grid-template-columns: 1fr;
  }
  .btn-search {
    grid-column: 1;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .policies-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Flight Search Loading Overlay --- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.loading-box {
  background-color: var(--white);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.loading-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.loading-phone {
  font-size: 28px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 10px;
}

.loading-text {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-subtext {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.route-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.route-point {
  flex: 1;
}

.route-code {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 5px;
}

.route-name {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.route-arrow {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flight-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border-color);
}

.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.detail-icon {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.detail-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-color);
}

.detail-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-color);
}

.progress-container {
  position: relative;
  height: 4px;
  background-color: #ffe4d6;
  border-radius: 2px;
  margin-bottom: 30px;
}

.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 2px;
  width: 0%;
  animation: progressAnim 4s ease-in-out forwards;
}

.progress-plane {
  position: absolute;
  top: -10px;
  left: 0%;
  color: var(--black);
  animation: planeAnim 4s ease-in-out forwards;
}

@keyframes progressAnim {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes planeAnim {
  0% { left: 0%; }
  100% { left: 100%; }
}

.loading-cta {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  display: inline-block;
  text-decoration: none;
}

.loading-cta:hover {
  background-color: var(--primary-hover);
}

/* --- Results Page Styles --- */
.results-header {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 20px 0;
}
.results-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.results-route {
  font-size: 24px;
  font-weight: 700;
}
.results-meta {
  font-size: 14px;
  opacity: 0.8;
}
.flights-container {
  padding: 40px 0;
}
.flight-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.flight-times {
  display: flex;
  align-items: center;
  gap: 20px;
}
.time-block {
  text-align: center;
}
.time {
  font-size: 20px;
  font-weight: 700;
}
.airport {
  font-size: 12px;
  color: var(--text-muted);
}
.flight-duration {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  position: relative;
  width: 100px;
}
.flight-duration::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
  z-index: 1;
}
.duration-text {
  background: var(--white);
  position: relative;
  z-index: 2;
  padding: 0 5px;
}
.flight-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 10px;
}
.flight-action {
  text-align: right;
}
.btn-book {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
}
.btn-book:hover {
  background-color: var(--primary-hover);
}
