:root {
    --primary-color: #FF385C; /* Airbnb Red */
    --text-color: #222222;
    --text-light: #717171;
    --bg-color: #FFFFFF;
    --border-color: #DDDDDD;
    --hover-bg: #F7F7F7;
    --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* HEADER */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 80px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}

.logo-img {
    height: 32px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-center {
    display: flex;
    gap: 24px;
}

.nav-center a {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.nav-center a:hover {
    color: var(--text-color);
    background: var(--hover-bg);
    border-radius: 20px;
}

.nav-center a.active {
    font-weight: 500;
    color: var(--text-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-right .become-host {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px;
    border-radius: 20px;
    transition: background 0.2s;
}

.nav-right .become-host:hover {
    background: var(--hover-bg);
}

.globe-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
}

.globe-btn:hover {
    background: var(--hover-bg);
}

.user-menu {
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 6px 6px 6px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.user-menu:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #EBEBEB;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* SEARCH BAR */
.search-bar-container {
    display: flex;
    justify-content: center;
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.search-bar {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 40px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    background: white;
    padding: 8px 8px 8px 24px;
    transition: box-shadow 0.2s;
}

.search-bar:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.search-item {
    display: flex;
    flex-direction: column;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
}

.search-item:hover {
    background: var(--hover-bg);
}

.search-label {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.search-input {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text-color);
    outline: none;
    width: 120px;
}

.search-input::placeholder {
    color: var(--text-light);
}

.divider {
    width: 1px;
    height: 32px;
    background: var(--border-color);
    margin: 0 8px;
}

.search-btn {
    background-color: var(--primary-color);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: #E31C5F;
}

/* MAIN CONTENT */
main {
    padding: 40px 80px;
}

.category-header {
    margin-bottom: 24px;
}

.category-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
}

/* GRID LAYOUT */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.course-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
}

.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #EBEBEB;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .image-wrapper img {
    transform: scale(1.03); /* Subtle zoom effect */
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    z-index: 10;
}

.heart-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.1s;
}

.heart-btn:active {
    transform: scale(0.9);
}

.course-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-title {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating {
    font-size: 0.9rem;
    font-weight: 400;
}

.course-details {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.4;
}

.price {
    font-size: 1rem;
    margin-top: 4px;
}

.price strong {
    font-weight: 500;
}

/* Responsiveness */
@media (max-width: 900px) {
    .navbar {
        padding: 20px 40px;
    }
    main {
        padding: 40px;
    }
    /* Adjust search bar slightly for medium screens */
    .search-input {
        width: 100px;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 16px 20px;
        flex-direction: row;        
    }
    .nav-center {
        display: none; 
    }
    .nav-right .become-host, .nav-right .globe-btn {
        display: none; 
    }
    
    .search-bar-container {
        padding: 16px 20px;
    }
    
    /* Make the search bar a stacked column on mobile */
    .search-bar {
        flex-direction: column;
        width: 100%;
        border-radius: 16px;
        padding: 12px;
        gap: 12px;
        align-items: stretch;
    }
    
    .search-item {
        width: 100%;
        padding: 8px 16px;
    }
    
    .search-input {
        width: 100%;
        font-size: 1rem;
    }
    
    .divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }
    
    /* Full width search button */
    .search-btn {
        width: 100%;
        border-radius: 12px;
        margin-left: 0;
        margin-top: 4px;
        height: 48px;
    }

    main {
        padding: 20px;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
    }
}

/* Autocomplete suggestions */
.suggestions-box {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 200;
    overflow: hidden;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-item:hover {
    background: var(--hover-bg);
}

.suggestion-icon {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Date Input tweaks */
input[type="date"] {
    font-family: var(--font-family);
    cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

/* Select tweaks */
select.search-input {
    cursor: pointer;
    appearance: none;
    background-color: transparent;
    border: none;
    outline: none;
}
