/* Search flights — customer domestic search page */

.page-search {
  background: #f8fafc;
}

/* Hero */
.search-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(72vh, 640px);
  padding: 2.5rem 0 3.5rem;
  overflow: hidden;
}

.search-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.88) 55%, rgba(248, 250, 252, 0.95) 100%),
    url("https://images.unsplash.com/photo-1436491865332-7a61a109cc05?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center 40%;
}

.search-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.search-hero-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.search-hero-lead {
  margin: 0 auto 1.75rem;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Search panel */
.search-panel {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.35rem 1.35rem 1.5rem;
  box-shadow: var(--shadow-card);
  text-align: left;
}

.search-panel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.search-panel-row--top {
  align-items: center;
  justify-content: space-between;
}

.search-trip-note {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.search-panel-row--routes {
  align-items: flex-end;
}

.page-search .search-panel-row--routes {
  align-items: flex-end;
  position: relative;
  z-index: 4;
}

.page-search .search-panel-row--dates {
  position: relative;
  z-index: 1;
}

.search-airport-wrap {
  position: relative;
}

.search-field-error {
  margin: 0.2rem 0 0;
  padding: 0 0.1rem;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #b91c1c;
  font-weight: 600;
}

.search-field-input--invalid {
  border-color: #f87171 !important;
  background: #fff7f7 !important;
}

.airport-suggest {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 45, 114, 0.12);
  padding: 0.35rem;
  z-index: 30;
  max-height: 240px;
  overflow: auto;
}

.airport-suggest--hidden {
  display: none;
}

.airport-suggest-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.airport-suggest-item:hover,
.airport-suggest-item.is-active,
.airport-suggest-item:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.airport-suggest-code {
  flex: 0 0 auto;
  min-width: 2.4rem;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  background: #eef2ff;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

.airport-suggest-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.airport-suggest-city {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
}

.airport-suggest-name {
  font-size: 0.78rem;
  line-height: 1.35;
  color: #64748b;
}

.page-search .search-panel-row--routes .btn-swap {
  margin-bottom: 0.15rem;
}

.search-panel-row--dates {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .search-panel-row--routes {
    flex-direction: column;
    align-items: stretch;
  }

  .search-panel-row--dates {
    grid-template-columns: 1fr;
  }

  .btn-swap {
    align-self: center;
    transform: rotate(90deg);
  }
}

.trip-type-toggle {
  display: inline-flex;
  padding: 0.2rem;
  background: #f3f4f6;
  border-radius: 10px;
  gap: 0.15rem;
}

.trip-type-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.trip-type-btn.is-active {
  background: var(--navy);
  color: #fff;
}

.search-select-wrap {
  flex: 1;
  min-width: 160px;
  max-width: 220px;
}

.search-select {
  width: 100%;
  padding: 0.55rem 2rem 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  appearance: none;
  cursor: pointer;
}

/* Override landing.css search-card field styles inside customer search panel */
.page-search .search-panel .search-field {
  position: static;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  padding: 0;
  border: none;
  background: transparent;
}

.search-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.search-field--hidden {
  display: none;
}

.page-search .search-panel .search-field-label,
.search-field-label {
  position: static;
  left: auto;
  top: auto;
  display: block;
  margin: 0;
  padding: 0 0.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  pointer-events: none;
}

.page-search .search-panel .search-field-icon,
.search-field-icon {
  display: none;
}

.page-search .search-panel .search-field-input,
.search-field-input {
  width: 100%;
  margin: 0;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  background: #f9fafb;
}

.page-search .search-panel .search-field-input:focus,
.search-field-input:focus {
  outline: none;
  border-color: rgba(0, 45, 114, 0.45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 45, 114, 0.08);
}

.page-search .search-panel .search-field-hint,
.search-field-hint {
  margin: 0.1rem 0 0;
  padding: 0 0.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.btn-swap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-swap:hover {
  background: #f8fafc;
  border-color: var(--navy);
}

.btn-search-submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-search-submit:hover {
  background: var(--navy-dark);
}

/* Explore Malaysia */
.section-explore {
  padding: 2.5rem 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head-title {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
}

.section-head-sub {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.section-head-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.section-head-link:hover {
  text-decoration: underline;
}

.dest-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;
}

@media (min-width: 900px) {
  .dest-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    grid-template-rows: 200px 200px;
  }

  .dest-card--featured {
    grid-row: span 2;
  }
}

.dest-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  min-height: 180px;
  border: 1px solid var(--border);
}

.dest-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.dest-card-bg--kl {
  background-image: url("../../assets/images/Kuala%20Lumpur%201.jpg");
}

.dest-card-bg--penang {
  background-image: url("../../assets/images/penang.jpg");
}

.dest-card-bg--sabah {
  background-image: url("../../assets/images/sabah.jpg");
}

.dest-card-bg--langkawi {
  background-image: url("../../assets/images/langkawi.jpg");
}

.dest-card-bg--johor {
  background-image: url("../../assets/images/johor-bahru.jpg");
}

.dest-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 26, 68, 0.85) 100%);
}

.dest-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1rem 1.1rem;
  color: #fff;
}

.dest-badge {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.dest-name {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.dest-price {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Advantage */
.section-advantage {
  padding: 2.5rem 0 3.5rem;
  background: #fff;
  border-top: 1px solid var(--border);
}

.advantage-title {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

.advantage-lead {
  margin: 0 auto 2rem;
  max-width: 36rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.advantage-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .advantage-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.advantage-card {
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.advantage-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--icon-circle);
  color: var(--navy);
}

.advantage-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.advantage-card-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Footer */
.site-footer--search {
  margin-top: 0;
}

.footer-grid--search {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-grid--search {
    grid-template-columns: 1.4fr 1fr 1.2fr;
  }
}

.footer-contact p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-contact a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}
