/* ==========================================================================
   UWS Air | Premium Flight Booking - Design System
   ========================================================================== */

:root {
    /* Color Palette */
    --color-primary: #0A192F;
    --color-primary-light: #112240;
    --color-accent: #D4AF37;
    --color-accent-hover: #B5952F;
    --color-accent-light: rgba(212, 175, 55, 0.15);
    
    --color-text-dark: #1E293B;
    --color-text-muted: #64748B;
    --color-text-light: #F8FAFC;
    
    --color-bg-main: #F4F7F9;
    --color-bg-card: #FFFFFF;
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    /* Layout & Utilities */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;
}

/* ==========================================================================
   Global Resets & Base Typography
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--color-bg-main);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--color-accent);
    color: #fff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem 0;
    z-index: 1000;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-light);
    text-decoration: none;
    cursor: pointer;
}

.logo-icon {
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a:not(.btn-login)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition-smooth);
}

.nav-links a:not(.btn-login):hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.btn-login {
    background: var(--color-accent);
    color: var(--color-primary) !important;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-login:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-light);
    transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section & Glassmorphism Search
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?q=80&w=2074&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 8rem 2rem 4rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.9) 0%, rgba(10, 25, 47, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-badge {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
    animation: fadeInDown 0.8s ease forwards;
}

.hero-title {
    color: var(--color-text-light);
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-subtitle {
    color: rgba(248, 250, 252, 0.85);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    max-width: 600px;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

/* Glassmorphism Search Form */
.search-glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 1080px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(10, 25, 47, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.input-wrapper:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
    background: rgba(10, 25, 47, 0.6);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--color-accent);
    pointer-events: none;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1rem 1rem 1rem 3rem;
    color: var(--color-text-light);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    appearance: none;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Fix select option colors */
.input-wrapper select option {
    background: var(--color-primary);
    color: var(--color-text-light);
}

/* Required date picker icon fix for webkit */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
    cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.form-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    padding-top: 1.5rem; /* Align with inputs */
}

.btn-search {
    background: var(--color-accent);
    color: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem; /* Align with inputs */
    transition: var(--transition-smooth);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
    height: 56px; /* Match input height */
}

.btn-search:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(212, 175, 55, 0.4);
}

.btn-search:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Search Results Section
   ========================================================================== */

.results-section {
    padding: 6rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 50vh;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.header-line {
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
}

/* Premium Flight Card */
.flight-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.flight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    opacity: 0;
    transition: var(--transition-smooth);
}

.flight-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(10, 25, 47, 0.1);
}

.flight-card:hover::before {
    opacity: 1;
}

.flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
}

.flight-number {
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(10, 25, 47, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
}

.flight-duration {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flight-route {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.route-point {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.route-point:first-child {
    text-align: left;
}

.route-point:last-child {
    text-align: right;
}

.route-point .time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.route-point .airport {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.route-line {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 1.5rem;
}

.route-line hr {
    width: 100%;
    border: none;
    border-top: 2px dashed rgba(10, 25, 47, 0.15);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.plane-icon {
    color: var(--color-accent);
    background: var(--color-bg-card);
    padding: 0 10px;
    z-index: 2;
    display: flex;
}

.flight-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.price-box {
    display: flex;
    align-items: baseline;
    color: var(--color-primary);
}

.price-box .currency {
    font-size: 1.2rem;
    font-weight: 500;
    margin-right: 2px;
}

.price-box .amount {
    font-size: 2rem;
    font-weight: 700;
}

.btn-book {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-book:hover {
    background: var(--color-primary);
    color: var(--color-text-light);
}

/* ==========================================================================
   Booking Modal
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 25, 47, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-content {
    position: relative;
    background: var(--color-bg-card);
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    z-index: 2001;
    overflow: hidden;
    animation: modalScaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0,0,0,0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.close-btn:hover {
    background: rgba(0,0,0,0.1);
    color: var(--color-text-dark);
}

.modal-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.modal-header p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.modal-body {
    padding: 2rem;
    background: var(--color-bg-main);
}

.summary-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.summary-icon {
    color: var(--color-accent);
}

.summary-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
}

.summary-details {
    display: flex;
    justify-content: space-between;
    background: var(--color-bg-main);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

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

.detail-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.detail-item p {
    font-weight: 600;
    color: var(--color-primary);
}

.price-breakdown {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.breakdown-row .value {
    color: var(--color-primary);
    font-weight: 500;
}

.breakdown-divider {
    height: 1px;
    background: rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.breakdown-row.total {
    margin-bottom: 0;
    align-items: center;
}

.total-label {
    display: flex;
    flex-direction: column;
}

.total-label span {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.total-label small {
    color: var(--color-accent);
    font-size: 0.75rem;
    font-weight: 600;
}

.total-value {
    color: var(--color-primary);
    font-size: 1.75rem;
    font-weight: 700;
}

.modal-footer {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--color-text-dark);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(0,0,0,0.05);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(10, 25, 47, 0.2);
}

.btn-primary:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 25, 47, 0.3);
}

.btn-primary:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

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

@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ==========================================================================
   Responsive Design (Max Width: 768px)
   ========================================================================== */

@media (max-width: 992px) {
    .search-form {
        flex-wrap: wrap;
    }
    .btn-search {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-section {
        padding: 6rem 1.5rem 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .search-glass-card {
        padding: 1.5rem;
    }
    
    .search-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-group {
        width: 100%;
    }
    
    .form-divider {
        display: none; /* Hide horizontal divider in vertical stack */
    }
    
    .btn-search {
        margin-top: 0.5rem;
        height: auto;
    }

    .results-section {
        padding: 4rem 1.5rem;
    }
    
    .flight-route {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .route-point {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left !important;
    }

    .route-line {
        display: none;
    }
    
    .flight-footer {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .btn-book {
        width: 100%;
    }
    
    .modal-content {
        max-width: 100%;
        border-radius: var(--radius-md);
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
}
```