/* =======================================================
   1. GLOBAL STYLES & ROOT VARIABLES
   ======================================================= */
:root {
    --primary-color: #0d2d4c;
    --secondary-color: #e53935;
    --text-dark: #212529;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f9;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =======================================================
   2. MAIN HEADER & NAVIGATION
   ======================================================= */
.main-header {
    background-color: #fff;
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-link img {
    height: 60px; /* Increased logo size */
    width: auto;
    display: block;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
}

.nav-center {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-dark);
}

.nav-center span {
    color: var(--secondary-color);
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info i {
    font-size: 24px;
    color: var(--text-light);
}

.contact-info div span {
    display: block;
    font-size: 14px;
    color: var(--text-light);
}

.contact-info div a {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
    text-decoration: none;
}

.header-auth .btn-login,
.header-auth .btn-signup {
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.header-auth .btn-login {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}
.header-auth .btn-login:hover {
    background-color: var(--bg-light);
}

.header-auth .btn-signup {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}
.header-auth .btn-signup:hover {
    background-color: #0a2238;
}

/* User Dropdown Menu */
.user-dropdown-container {
    position: relative;
}
.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
}
.user-dropdown-toggle i:first-child { font-size: 1.5rem; }
.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 130%;
    right: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    min-width: 200px;
    overflow: hidden;
}
.user-dropdown-container:hover .user-dropdown-menu {
    display: block;
}
.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-dark);
}
.dropdown-link:hover {
    background-color: var(--bg-light);
}
.dropdown-logout-link {
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
}
.dropdown-logout-link i { color: var(--secondary-color); }

/* =======================================================
   3. MOBILE SIDEBAR
   ======================================================= */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px; /* Hidden by default */
    width: 300px;
    height: 100%;
    background-color: #fff;
    z-index: 1002;
    transition: left 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.mobile-sidebar.active {
    left: 0;
}
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-logo-image {
    height: 50px;
}
.sidebar-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}
.sidebar-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    margin-bottom: 5px;
    text-decoration: none;
    color: var(--text-dark);
    border-radius: 6px;
    font-weight: 500;
}
.sidebar-link:hover {
    background-color: var(--bg-light);
}
.sidebar-divider {
    margin: 20px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}
.sidebar-contact {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
}
.sidebar-contact i {
    font-size: 1.5rem;
}
.sidebar-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 15px;
}
.sidebar-auth-buttons .btn-login,
.sidebar-auth-buttons .btn-signup {
    text-align: center;
}

/* =======================================================
   4. HERO SECTION & BOOKING WIDGET
   ======================================================= */
.hero-section {
    padding-top: var(--header-height);
    background: url('../images/hero-bg.jpg') no-repeat center center/cover;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: #fff;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.2));
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    line-height: 1.2;
}
.hero-content p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 15px auto 0;
}

.booking-widget-container {
    position: relative;
    margin: -80px auto 0;
    max-width: 1100px;
    padding: 0 15px;
    z-index: 10;
}
.booking-widget {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.widget-nav {
    display: flex;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}
.widget-nav a {
    padding: 15px 25px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-nav a.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}
.widget-nav a:hover {
    color: var(--primary-color);
}

.widget-form-area {
    padding: 25px;
}
.trip-type-selector {
    margin-bottom: 20px;
}
.trip-type-selector button {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 18px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: 500;
}
.trip-type-selector button.active {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

.flight-search-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 20px;
    align-items: flex-end;
}

.form-field {
    position: relative;
}
.form-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 5px;
    display: block;
}
.form-field .input-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}
.form-field .sub-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

.swap-button {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-show-fare {
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    grid-column: 5 / 6;
}

/* =======================================================
   5. PORTAL SECTIONS
   ======================================================= */
.portals-section {
    padding: 60px 0;
}
.portals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.portal-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    text-align: center;
    position: relative;
}
.portal-card h2 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}
.portal-card .portal-icon {
    position: absolute;
    left: 20px;
    bottom: 20px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.1;
}

/* =======================================================
   6. RESPONSIVE MEDIA QUERIES
   ======================================================= */

/* For Tablets (e.g., width < 992px) */
@media (max-width: 992px) {
    .nav-center, .nav-right .contact-info, .header-auth {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .flight-search-form {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
    .btn-show-fare {
        grid-column: 1 / -1; /* Span full width */
        margin-top: 15px;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
}

/* For Mobile Phones (e.g., width < 768px) */
@media (max-width: 768px) {
    .hero-section {
        height: 50vh;
        min-height: 400px;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .widget-nav a {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    .flight-search-form {
        grid-template-columns: 1fr;
    }
    .swap-button {
        display: none; /* Hiding swap button on mobile can simplify the UI */
    }
    .portals-grid {
        grid-template-columns: 1fr;
    }
}