/* Modern Hero Section - Skyscanner-inspired but unique */

/* Transparent Navbar */
.navbar-transparent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    box-shadow: none;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar-transparent.scrolled {
    position: fixed;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-transparent .navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
    padding: 0;
}

.navbar-logo {
    height: 44px;
    width: auto;
    transition: opacity 0.2s ease;
}

.navbar-logo:hover {
    opacity: 0.9;
}

.navbar-transparent .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-transparent .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile navbar dropdown background */
@media (max-width: 991.98px) {
    .navbar-transparent .navbar-collapse {
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(12px);
        margin-top: 0.5rem;
        padding: 1rem;
        border-radius: 12px;
    }
}

/* Reset hero section */
.hero-modern {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7rem 0 4rem;
    position: relative;
    overflow: hidden;
}

/* Animated background shapes */
.hero-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.hero-modern::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(249, 115, 22, 0.1) 0%, transparent 60%);
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(2deg); }
    66% { transform: translate(-20px, 20px) rotate(-2deg); }
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Typography */
.hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-tagline i {
    color: #f59e0b;
}

.hero-headline {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-headline span {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subheadline {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 540px;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

/* Search Card */
.search-card-modern {
    background: #ffffff;
    border-radius: 24px;
    padding: 0;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 1000px;
    overflow: visible;
}

/* Trip Type Tabs */
.trip-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 24px 24px 0 0;
}

.trip-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.trip-tab:hover {
    color: #1e40af;
    background: rgba(37, 99, 235, 0.04);
}

.trip-tab.active {
    color: #1e40af;
    background: #ffffff;
}

.trip-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563eb;
}

/* Search Form */
.search-form-modern {
    padding: 1.5rem;
    overflow: visible;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 1rem;
}

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

/* Input Groups */
.input-group-modern {
    position: relative;
}

.input-group-modern.has-border-right {
    border-right: 1px solid #e2e8f0;
}

.input-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
    padding-left: 0.25rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 14px;
    transition: all 0.2s ease;
    cursor: text;
    overflow: visible;
}

.input-wrapper:hover {
    background: #f1f5f9;
}

.input-wrapper:focus-within {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-wrapper i {
    color: #94a3b8;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.input-wrapper:focus-within i {
    color: #2563eb;
}

.input-field {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #0f172a;
    outline: none;
    min-width: 0;
}

.input-field::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Location inputs with swap */
.location-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    align-items: center;
    background: #f8fafc;
    border-radius: 16px;
    padding: 0.25rem;
    margin-bottom: 1rem;
    overflow: visible;
}

.location-input-group {
    padding: 0.75rem 1rem;
    position: relative;
    overflow: visible;
}

.location-input-group .autocomplete-results {
    left: 0;
    right: auto;
}

/* Ensure autocomplete wrapper allows overflow */
.hero-modern .autocomplete-wrapper {
    overflow: visible;
}

.location-input-group .input-wrapper {
    background: transparent;
    padding: 0.5rem 0;
    border-radius: 0;
}

.location-input-group .input-wrapper:focus-within {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.swap-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.swap-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: rotate(180deg);
}

/* Date inputs */
.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Passenger selector */
.passenger-selector {
    position: relative;
}

.passenger-selector .passenger-dropdown {
    position: relative;
}

.passenger-trigger,
.hero-modern #passengerToggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.passenger-trigger:hover,
.hero-modern #passengerToggle:hover {
    background: #f1f5f9;
}

.passenger-trigger.active,
.hero-modern #passengerToggle.active {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.passenger-trigger i,
.hero-modern #passengerToggle i {
    color: #94a3b8;
    font-size: 1.1rem;
}

.passenger-trigger.active i:first-child,
.hero-modern #passengerToggle.active i:first-child {
    color: #2563eb;
}

.passenger-text {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    color: #0f172a;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.passenger-chevron {
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.passenger-trigger.active .passenger-chevron {
    transform: rotate(180deg);
}

/* Passenger dropdown */
.passenger-dropdown-modern,
.hero-modern .passenger-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    bottom: auto;
    left: auto;
    right: 0;
    min-width: 280px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    padding: 1.25rem;
    z-index: 300;
    display: none;
    border: 1px solid #e2e8f0;
}

.passenger-dropdown-modern.active,
.hero-modern .passenger-menu.active {
    display: block;
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.passenger-option,
.hero-modern .passenger-dropdown-modern > div:not(.cabin-selector) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.passenger-option:not(:last-of-type),
.hero-modern .passenger-dropdown-modern > div:not(.cabin-selector):not(:last-of-type) {
    border-bottom: 1px solid #f1f5f9;
}

.passenger-info h4,
.hero-modern .passenger-dropdown-modern .passenger-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.passenger-info span,
.hero-modern .passenger-dropdown-modern .passenger-info span {
    font-size: 0.8rem;
    color: #64748b;
}

.passenger-counter,
.hero-modern .passenger-dropdown-modern .passenger-counter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.counter-btn-modern,
.passenger-dropdown-modern .counter-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-btn-modern:hover:not(:disabled),
.passenger-dropdown-modern .counter-btn:hover:not(:disabled) {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.counter-btn-modern:disabled,
.passenger-dropdown-modern .counter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.counter-value,
.hero-modern .passenger-dropdown-modern .counter-value {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
}

/* Cabin class */
.cabin-selector {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.cabin-selector h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.cabin-options-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.cabin-option-modern {
    padding: 0.65rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.cabin-option-modern:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.cabin-option-modern.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* Search button */
.search-btn-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35);
    white-space: nowrap;
    height: 56px;
}

.search-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.45);
}

.search-btn-modern:active {
    transform: translateY(0);
}

.search-btn-modern i {
    font-size: 1.1rem;
}

/* Popular routes */
.popular-routes {
    margin-top: 2.5rem;
    text-align: center;
}

.routes-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.route-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.route-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.route-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.route-pill i {
    color: #60a5fa;
    font-size: 0.75rem;
}

/* Autocomplete dropdown */
.autocomplete-modern,
.hero-modern .autocomplete-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 320px;
    width: max-content;
    max-width: 450px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    max-height: 340px;
    overflow-y: auto;
    z-index: 200;
    display: none;
    border: 1px solid #e2e8f0;
}

.autocomplete-modern.active,
.hero-modern .autocomplete-results.active {
    display: block;
    animation: dropdownFade 0.2s ease;
}

.autocomplete-item-modern,
.hero-modern .autocomplete-item {
    display: block;
    padding: 0.9rem 1.25rem;
    cursor: pointer;
    transition: background 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-item-modern:hover,
.hero-modern .autocomplete-item:hover,
.hero-modern .autocomplete-item.active {
    background: #f1f5f9;
}

.autocomplete-item-modern i,
.hero-modern .autocomplete-item i {
    color: #94a3b8;
    font-size: 1.1rem;
}

.autocomplete-item-modern .item-details {
    flex: 1;
}

.autocomplete-item-modern .item-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.autocomplete-item-modern .item-country {
    font-size: 0.8rem;
    color: #64748b;
}

.autocomplete-item-modern .item-code,
.hero-modern .autocomplete-item .item-code {
    font-weight: 700;
    color: #2563eb;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-modern {
        padding: 4rem 0 2rem;
        min-height: auto;
    }

    .hero-headline {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .hero-subheadline {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .hero-tagline {
        font-size: 0.7rem;
        padding: 0.4rem 0.85rem;
        margin-bottom: 1rem;
    }

    .search-card-modern {
        border-radius: 16px;
        padding: 0;
    }

    .search-form-modern {
        padding: 0.75rem;
    }

    .trip-tabs {
        border-radius: 16px 16px 0 0;
    }

    .trip-tab {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    .input-wrapper {
        padding: 0.5rem 0.75rem;
    }

    .input-field {
        font-size: 0.9rem;
    }

    .input-label {
        font-size: 0.65rem;
        margin-bottom: 0.2rem;
    }

    .location-inputs {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0.5rem;
        padding: 0.15rem;
    }

    .location-input-group {
        padding: 0.5rem 0.75rem;
    }

    .swap-btn {
        margin: 0 auto;
        transform: rotate(90deg);
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .swap-btn:hover {
        transform: rotate(270deg);
    }

    .date-inputs {
        grid-template-columns: 1fr;
    }

    .search-row-full {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .search-btn-modern {
        width: 100%;
        margin-top: 0;
        height: 48px;
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .popular-routes {
        margin-top: 1.5rem;
    }

    .route-pills {
        gap: 0.5rem;
    }

    .route-pill {
        font-size: 0.75rem;
        padding: 0.45rem 0.85rem;
    }

    .passenger-dropdown-modern,
    .hero-modern .passenger-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        border-radius: 20px 20px 0 0;
        max-height: 70vh;
        overflow-y: auto;
    }

    .autocomplete-modern,
    .hero-modern .autocomplete-results {
        min-width: 100%;
        max-width: 100%;
        width: 100%;
        left: 0;
        right: 0;
    }
}

@media (max-width: 480px) {
    .trip-tabs {
        overflow-x: auto;
    }

    .trip-tab {
        padding: 0.85rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .hero-tagline {
        font-size: 0.7rem;
    }
}
