/* --- Top Header Styles for Consistency --- */
.top-header {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}
.input-group.w-25 {
    min-width: 220px;
    max-width: 350px;
}
.user-profile {
    display: flex;
    align-items: center;
    margin-left: 10px;
    padding: 5px;
    border-left: 1px solid #eeeeee;
}
.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}
.user-profile span {
    font-size: 14px;
    font-weight: 600;
}
/* Color Variables based on the image */
:root {
    --color-primary: #3c82f6; /* A clear blue, similar to the active state and search button */
    --color-secondary: #007bff; /* Just for contrast */
    --color-background: #f8f8f8; /* Light gray page background */
    --color-sidebar: #ffffff; /* White sidebar */
    --color-text-dark: #333333; /* Primary dark text */
    --color-text-medium: #666666; /* Secondary gray text */
    --color-text-light: #aaaaaa; /* Light gray text for labels */
    --color-active-bg: #e1ecff; /* Light blue background for active sidebar item */
    --color-card-bg: #ffffff; /* White card background */
    --color-star: #ffc107; /* Yellow star */
    --color-border: #eeeeee; /* Light border color */
    --color-hero-bg: #a6c0e8; /* Base color for the banner background */
}

/* Global Reset and Box Sizing */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--color-background);
    color: var(--color-text-dark);
    line-height: 1.6;
}

/* Main Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    padding: 10px; /* Reduced padding for better mobile view */
    gap: 15px; /* Added gap between sidebar and main content */
}

/* --- Sidebar Styles --- */
.sidebar {
    width: 240px; /* Slightly reduced width */
    min-width: 240px; /* Prevent sidebar from shrinking too much */
    background-color: var(--color-sidebar);
    padding: 20px 15px; /* Reduced padding */
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100vh - 20px); /* Fixed height */
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 40px;
}

.logo i {
    margin-right: 10px;
    font-size: 32px;
}

.logo img {
    height: 87px !important;
    max-width: 160px !important;
    object-fit: contain;
    vertical-align: middle;
}


.nav-heading {
    color: var(--color-text-light);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 20px 0 10px 15px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 8px;
    color: var(--color-text-medium);
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-nav li i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.sidebar-nav li.active {
    background-color: var(--color-active-bg);
    color: var(--color-primary);
    font-weight: 600;
}

.logout {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffebeb; /* Light red for the log out button */
    color: #ff5252;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.logout i {
    margin-right: 10px;
}

/* --- Main Content and Header Styles --- */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0; /* Prevent overflow issues */
}

.top-header {
    background-color: var(--color-sidebar);
    padding: 15px 20px; /* Reduced padding */
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px; /* Reduced height */
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--color-background);
    padding: 10px 15px;
    border-radius: 10px;
    flex: 1;
    max-width: 350px; /* Responsive max width */
}

.search-bar i {
    color: var(--color-text-light);
    margin-right: 10px;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    color: var(--color-text-dark);
}

.header-icons {
    display: flex;
    align-items: center;
}

.header-icons i {
    font-size: 18px;
    color: var(--color-text-medium);
    margin: 0 15px;
    cursor: pointer;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-left: 10px;
    padding: 5px;
    border-left: 1px solid var(--color-border);
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.user-profile span {
    font-size: 14px;
    font-weight: 600;
}

/* --- Content Body --- */
.content-body {
    padding-right: 10px;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    background-color: var(--color-hero-bg);
    background-image: url('https://img.freepik.com/free-photo/airplane-flying-blue-sky-with-clouds_335224-1095.jpg'); 
    background-size: cover;
    background-position: center;
    height: 400px; /* Increased height to prevent overlap */
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed back to flex-start */
    overflow: hidden;
    padding: 20px; /* Reduced padding for mobile */
    color: white;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Increased opacity for better text contrast */
    z-index: 1;
}

.hero-text {
    position: relative;
    z-index: 2;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 0; /* Removed bottom margin */
    align-self: flex-start; /* Align to top */
}

.hero-text p {
    font-size: 16px;
    font-weight: 400;
    margin-top: 8px;
}

.search-tabs {
    position: relative; /* Changed from absolute */
    align-self: flex-start; /* Align to start */
    z-index: 3;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px; /* Add spacing */
}

.tab-button {
    background: none;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.tab-button i {
    margin-right: 5px;
}

.tab-button:not(.active) {
    opacity: 0.8;
}

.tab-button.active {
    background-color: var(--color-sidebar);
    color: var(--color-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-form-bar {
    position: relative;
    z-index: 3;
    background-color: var(--color-sidebar);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px; /* Push to bottom of hero section */
    margin-bottom: -40px; /* Overlap with next section */
    width: 100%; /* Full width within padding */
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 15px;
    border-right: 1px solid var(--color-border);
    min-width: 120px; /* Minimum width for mobile */
}

.input-group:last-of-type {
    border-right: none;
}

.input-group label {
    font-size: 12px;
    color: var(--color-text-light);
    margin-bottom: 5px;
    font-weight: 500;
}

.input-group span {
    font-size: 14px; /* Slightly smaller for mobile */
    font-weight: 600;
    color: var(--color-text-dark);
}

.search-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 15px 25px; /* Slightly smaller padding */
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
}

.search-btn:hover {
    background-color: #0056b3;
}

/* --- Travelers Spot Section --- */
.travelers-spot {
    margin-top: 60px; /* Adjusted for form overlap */
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-right: 30px;
}

.spot-filters {
    flex-grow: 1;
    display: flex;
    gap: 10px;
}

.spot-navigation {
    display: flex;
    gap: 10px;
    margin-left: auto;
    margin-right: 15px;
}

.spot-navigation i {
    width: 35px;
    height: 35px;
    background-color: var(--color-sidebar);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-medium);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.spot-navigation i:hover {
    background-color: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

.filter-btn {
    background: none;
    border: none;
    padding: 5px 15px;
    border-radius: 20px;
    color: var(--color-text-medium);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.filter-btn.active {
    background-color: var(--color-active-bg);
    color: var(--color-primary);
    font-weight: 600;
}

.see-all {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
}

/* Slider Container */
.spot-cards-container {
    overflow: hidden;
    width: 100%;
}

.spot-cards {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
    width: max-content;
}

.spot-card {
    min-width: 250px;
    flex-shrink: 0;
    background-color: var(--color-card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spot-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.spot-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.card-info {
    padding: 15px;
}

.card-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.card-info p {
    font-size: 13px;
    color: var(--color-text-medium);
    margin-bottom: 10px;
}

.rating {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-medium);
}

.rating i {
    color: var(--color-star);
    margin-right: 5px;
}

/* --- Second Row Sections --- */
.row-two-sections {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.travelers-spot.second-row {
    flex: 3;
    margin-top: 0;
}

.special-offer {
    flex: 2;
    margin-top: 0;
}

/* Small Cards Slider Container */
.small-cards-container {
    overflow: hidden;
    width: 100%;
}

.spot-cards.small-cards {
    gap: 15px;
    transition: transform 0.3s ease;
    width: max-content;
}

.small-card {
    min-width: 120px;
    flex-shrink: 0;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.small-card:hover {
    transform: scale(1.05);
}

.small-card img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

/* Special Offer Section */
.offer-card {
    background-color: var(--color-card-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.offer-card h3 {
    font-size: 18px;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.offer-card p {
    font-size: 14px;
    color: var(--color-text-medium);
    margin-bottom: 10px;
}

.book-now-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    align-self: flex-start;
    cursor: pointer;
}

/* === RESPONSIVE DESIGN === */

/* Tablet and Mobile Styles */
@media (max-width: 1024px) {
    .app-container {
        padding: 10px 5px;
        gap: 10px;
    }
    
    .sidebar {
        width: 200px;
        min-width: 200px;
        padding: 15px 10px;
    }
    
    .main-content {
        gap: 15px;
    }
    
    .search-bar {
        max-width: 280px;
    }
    
    .hero-section {
        height: 380px;
        padding: 15px;
    }
    
    .hero-text {
        font-size: 28px;
    }
    
    .search-form-bar {
        padding: 15px;
        gap: 10px;
    }
    
    .input-group {
        padding: 0 10px;
        min-width: 100px;
    }
    
    .search-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .spot-card {
        min-width: 220px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        padding: 5px;
        gap: 15px;
    }
    
    .sidebar {
        width: 100%;
        min-width: unset;
        height: auto;
        padding: 15px;
        order: 2; /* Move sidebar to bottom */
    }
    
    .main-content {
        order: 1;
        gap: 15px;
    }
    
    .top-header {
        flex-direction: column;
        gap: 15px;
        min-height: auto;
        padding: 15px;
    }
    
    .search-bar {
        max-width: 100%;
        width: 100%;
    }
    
    .header-icons {
        width: 100%;
        justify-content: center;
    }
    
    .hero-section {
        height: 450px; /* Increased for mobile */
        padding: 15px;
    }
    
    .hero-text {
        font-size: 24px;
        text-align: center;
    }
    
    .search-form-bar {
        flex-direction: column;
        gap: 15px;
        padding: 20px 15px;
        margin-bottom: -20px;
    }
    
    .input-group {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: 10px 0;
        text-align: center;
    }
    
    .input-group:last-of-type {
        border-bottom: none;
    }
    
    .search-btn {
        width: 100%;
        padding: 15px;
    }
    
    .section-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .section-header h2 {
        margin-right: 10px;
        font-size: 18px;
    }
    
    .spot-filters {
        order: 3;
        width: 100%;
    }
    
    .spot-navigation {
        order: 2;
    }
    
    .see-all {
        order: 1;
        margin-left: auto;
    }
    
    .spot-card {
        min-width: 200px;
    }
    
    .row-two-sections {
        flex-direction: column;
        gap: 30px;
    }
    
    .travelers-spot.second-row,
    .special-offer {
        flex: unset;
    }
    
    .small-card {
        min-width: 100px;
        height: 70px;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .hero-section {
        height: 500px;
        padding: 10px;
    }
    
    .hero-text {
        font-size: 20px;
    }
    
    .search-form-bar {
        margin: 15px 0 -15px 0;
        padding: 15px 10px;
    }
    
    .spot-card {
        min-width: 180px;
    }
    
    .small-card {
        min-width: 90px;
        height: 60px;
    }
    
    .input-group span {
        font-size: 12px;
    }
    
    .search-btn {
        font-size: 12px;
    }
}