/* Hero Section Styles */
.hero-section {
  position: relative;
  background-image: url("../images/hero-background.jpeg");
  background-size: cover;
  background-position: center;
  min-height: 80vh;
  padding: 0;
  z-index: 10;
}

/* Search Form Styles */
.search-form-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
  max-width: 800px;
  margin: 30px auto;
  padding: 20px;
  z-index: 20;
}

.tab-buttons {
  display: flex;
  margin-bottom: 20px;
  justify-content: center;
  gap: 10px;
}

.tab-button {
  padding: 12px 20px;
  background-color: var(--bs-primary);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.tab-button.active {
  background-color: var(--bs-success);
  color: var(--bs-primary);
}

.tab-button i {
  margin-right: 8px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.search-btn {
  background-color: var(--bs-primary);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
  width: 100%;
}

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

.trip-type {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.trip-type label {
  margin-right: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.trip-type input {
  margin-right: 5px;
}

.hero-image-mobile {
  display: none;
  width: 100%;
  padding: 10px;
}

.hero-image-mobile img {
  width: 100%;
}

/* Responsive styles */


@media (max-width: 768px) {

  /* HERO IMAGE ALWAYS */
  .hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 30px;
  }

  /* DARK OVERLAY */
  .hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
  }

  

  /* MAIN CARD */
  .flight-container {
    padding: 18px;
    border-radius: 18px;
  }



  .tab-item {
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
  }

  /* FORM GRID CLEAN */
  .row {
    gap: 10px;
  }

  .form-group {
    margin-bottom: 10px;
  }

  /* BUTTON FULL WIDTH */
  .search-btn {
    width: 100%;
    border-radius: 10px;
  }
}

@media (max-width: 576px) {
  .icon-box {
    width: 100px;
    height: 100px;
  }

  .form-group {
    flex-wrap: nowrap !important;
  }

  .tab-button {
    font-size: 12px;
  }
}


/* Later Updated by Razaan */

 .hero-section {
    padding: 60px 0;
    display: flex;
    justify-content: center;
  }

  /* WRAPPER */
  .flight-wrapper {
    width: 90%;
    max-width: 1100px;
    position: relative;
  }

  /* TOP TAB */
  .flight-tab {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #cfe5df;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    gap: 8px;
    align-items: center;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }

  /* MAIN BOX */
  .flight-container {
    background: white;
    border-radius: 20px;
    border: 1px solid #ddd;
    padding: 30px;
  }

  /* TRIP */
  .trip-type-ui {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
  }

  .preferred-airline {
    margin-left: auto;
    background: #f3f4f6;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 12px;
  }

  /* ===== NEW CARD STYLE (LIKE SS) ===== */
  .flight-fields {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    position: relative;
  }

  .flight-fields .field.big {
  height: 90px;        
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  padding-top: 8px;
}

#fromInput,
#toInput {
  position: absolute;
  width: calc(100% - 32px);
  top: 26px;
  left: 16px;
}

  /* FIELD */
  .field {
    position: relative;
    padding: 14px 16px;
    border-right: 1px solid #e5e7eb;
    /* border-right: none; */
    /* border-bottom: 1px solid #e5e7eb; */
  }

#journeyField,
#returnField {
  width: 204px;
  height: 90px;
}

  .field .label {
  position: absolute;
  top: 8px;
  left: 16px;
}

.field .value {
  position: absolute;
  top: 28px;
  left: 16px;
}

#journeyInput,
#returnInput {
  position: relative;
  top: 15px; /* move down */
}

  .field:last-child {
    border-right: none;
  }

  .label {
    font-size: 12px;
    color: #6b7280;
  }

  .value {
    font-weight: 600;
    font-size: 15px;
  }

  .field small {
    font-size: 12px;
    color: #9ca3af;
  }

  /* SWAP ICON CENTER */
  .swap {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* SWAP OVERLAY (CENTER ON BORDER) */
  .swap-overlay {
    position: absolute;
    top: 50%;
    left: 27%;
    transform: translate(-190%, -30%);
    z-index: 10;
  }

  .swap-overlay i {
    background: #f3f4f6;
    padding: 10px;
    border-radius: 50%;
    color: #10b981;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .swap i {
    background: #f3f4f6;
    padding: 10px;
    border-radius: 50%;
    color: #10b981;
  }

  /* ===== RADIO BUTTON (IMPORTANT) ===== */
  .trip-type-ui label,
  .fare-type label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
  }

  .trip-type-ui input,
  .fare-type input {
    display: none;
  }

  .trip-type-ui label span,
  .fare-type label span {
    width: 16px;
    height: 16px;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    position: relative;
  }

  .trip-type-ui input:checked+span,
  .fare-type input:checked+span {
    border-color: #10b981;
  }

  .trip-type-ui input:checked+span::after,
  .fare-type input:checked+span::after {
    content: "";
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
  }

  /* PREFERRED BOX IMPROVED */
  .preferred-airline {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 10px;
  }

  /* FARE */
  .fare-type {
    margin-top: 15px;
    display: flex;
    gap: 20px;
  }

  /* GUEST BOX */
  .guest-box {
    position: absolute;
    right: 20px;
    top: 120px;
    width: 280px;
    background: white;
    border-radius: 14px;
    padding: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 50;
  }

  .guest-box.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .guest-trigger {
    cursor: pointer;
    /* position: relative; */
    /* padding-bottom: 20px; */
  }

  #classDisplay {
  position: absolute;
  bottom: 14px;
  font-size: 12px;
  color: #666;
}


  .guest-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .counter {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* BUTTON STYLE */
  .counter-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
  }



  /* PLUS BUTTON ACTIVE LOOK */
  .counter-btn.plus {
    background: #e6f4f1;
    color: #0a5c4d;
  }

  /* COUNT TEXT */
  .counter .count {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
  }

  .done-btn {
    width: 100%;
    background: #0a5c4d;
    color: white;
    padding: 10px;
    border-radius: 20px;
    border: none;
  }

  .icon {
    margin-right: 6px;
    color: #444;
    font-size: 14px;
  }

  /* TOP TABS CONTAINER */
  .top-tabs {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 100%;
  }

  /* Mobile scroll instead of wrapping */
  @media (max-width: 576px) {
    .top-tabs {
      flex-wrap: nowrap;
      overflow-x: auto;
      justify-content: flex-start;
      padding: 0 10px;
      scrollbar-width: none;
    }

    .top-tabs::-webkit-scrollbar {
      display: none;
    }
  }

  /* EACH TAB */
  .tab-item {
    background: #eef2f3;
    padding: 14px 26px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #555;
    cursor: pointer;
    transition: 0.2s;
  }

  /* ACTIVE TAB  */
  .tab-item.active {
    background: #cfe5df;
    color: #0a5c4d;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
  }

  /* ICON */
  .tab-item i {
    font-size: 14px;
  }

  .submit-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
  }

  .submit-btn {
    width: auto;
    padding: 12px 40px;
    border-radius: 999px;
  }

  .submit-btn:hover {
    background: #0a5c4d;
    color: white;
    transform: none;
    cursor: pointer;
  }

.airport-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: none;
  z-index: 9999;
}

.airport-dropdown input {
  width: 100%;
  padding: 10px;
  border: none;
  border-bottom: 1px solid #eee;
  outline: none;
}

.airport-list div {
  padding: 10px;
  cursor: pointer;
}

.airport-list div:hover {
  background: #f5f5f5;
}
  .tab-content {
    display: none;
  }

  .tab-content.active {
    display: block;
  }

.flight-fields .field.big .value {
  cursor: pointer;
}

#journeyDisplay {
  cursor: pointer;
}

#returnDisplay {
  cursor: pointer;
}



/* #flight-tab .submit-wrapper {
  width: 100%;
}

#flight-tab .submit-btn {
  width: 100%;
  display: block;
} */

  /* =========================
   RESPONSIVE FIX (SAFE)
   ========================= */

/* Tablet */
@media (max-width: 992px) {

  .flight-wrapper {
    width: 95%;
  }

  .flight-container {
    padding: 20px;
  }

  /* stack trip type nicely */
  .trip-type-ui {
    flex-wrap: wrap;
    gap: 10px;
  }

  .preferred-airline {
    width: 100%;
    margin-left: 0;
  }

  /* flight fields → 2 columns */
  .flight-fields {
    grid-template-columns: 1fr 1fr;
  }

  .swap-overlay {
    display: none;
  }

  .submit-wrapper {
    justify-content: center;
  }
}


/* Mobile */
@media (max-width: 768px) {

  .hero-section {
    padding: 30px 0;
  }

  .flight-container {
    padding: 15px;
    border-radius: 14px;
  }

  /* tabs spacing */
  .tab-item {
    padding: 10px 14px;
    font-size: 14px;
  }

  /* FULL STACK layout */
  .flight-fields {
    grid-template-columns: 1fr;
  }

 

  .field:last-child {
    border-bottom: none;
  }

  /* guest dropdown fix */
  .guest-box {
    right: 0;
    left: 0;
    width: 100%;
    top: 100%;
    margin-top: 10px;
  }

  /* center submit */
  .submit-wrapper {
    justify-content: center;
  }

  .submit-btn {
    width: 100%;
  }
}


/* Small mobile */
@media (max-width: 576px) {

  .top-tabs {
    gap: 8px;
  }

  .tab-item {
    padding: 8px 12px;
    font-size: 13px;
  }

  .flight-container {
    padding: 12px;
  }

  .value {
    font-size: 14px;
  }

  .label {
    font-size: 11px;
  }
}

@media (max-width: 768px) {

  .hero-section {
    position: relative;
    min-height: 500px;
    padding: 0;
    display: block;
  }

  /* TEXT OVER IMAGE */
  .hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
  }

  /* FORM WRAPPER ON IMAGE */
  .flight-wrapper {
    position: absolute;
    bottom: -40px; 
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    z-index: 2;
  }

  .flight-container {
    border-radius: 18px;
    padding: 20px;
  }

  /* OPTIONAL: center tabs nicely */
  .top-tabs {
    position: relative;
    top: 0;
    transform: none;
    justify-content: center;
    margin-bottom: 10px;
  }
}
@media (max-width: 768px) {
  .welcome-section {
    margin-top: 80px;
  }
}

/* ===== FORCE FIX MOBILE TABS ===== */
@media (max-width: 768px) {

  .top-tabs {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;              
    transform: none !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
    padding: 0 10px !important;
    overflow-x: auto;
    justify-content: flex-start !important;
    z-index: 5;
  }

  .flight-wrapper {
    position: relative !important;
    bottom: 0 !important;
  }

}

/* =========================
   MOBILE FIX ONLY (NO DESKTOP CHANGE)
   ========================= */
@media (max-width: 768px) {

  .flight-fields {
    grid-template-columns: 1fr; /* stack */
  }

  .field {
    width: 100% !important;
    height: auto !important;
    padding: 12px 14px;
  }

  /* STOP overlapping */
  .field .label {
    position: static;
    display: block;
    margin-bottom: 4px;
  }

  .field .value {
    position: static;
    display: block;
    margin-bottom: 6px;
  }

  #journeyInput,
  #returnInput {
    position: static;
    width: 100%;
    margin-top: 6px;
  }

  /* Guest fix */
  #classDisplay {
    position: static;
    display: block;
    margin-top: 4px;
  }

  

}

@media (max-width: 768px) {

  #fromInput,
  #toInput {
    position: static;   
    width: 100%;
    margin-top: 6px;
  }

  .guest-trigger {
    position: relative;
  }

  .guest-box {
    position: absolute;
    top: 50%;        
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 8px;

    z-index: 999;    
  }

}
