/* Base Styles */
:root {
    --primary-color: #e53935;
    --secondary-color: #212121;
    --accent-color: #ff6f60;
    --light-color: #f5f5f5;
    --dark-color: #121212;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f9f9f9;
    color: #333;
    overflow-x: hidden;
}

/* Hero Section Styles */
.hero-container {
    padding: 30px 0 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.hero-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/api/placeholder/1200/400') center/cover no-repeat;
    opacity: 0.07;
    z-index: 0;
}

.hero-text {
    position: relative;
    z-index: 1;
}

/* Search Section Styles */
.search-section {
    padding: 30px 0;
    margin-bottom: 20px;
}

.search-filter-container {
    background: white;
    border-radius: 50px;
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.search-filter-container:hover {
    box-shadow: 0 8px 20px rgba(68, 64, 61, 0.15);
}

/* Search Bar */
.search-container {
    display: flex;
    max-width: 100%;
    margin: 0 auto 20px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 1px solid #e0e0e0;
}

.search-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    outline: none;
    font-size: 16px;
    border-radius: 50px 0 0 50px;
}

.search-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 30px;
    cursor: pointer;
    transition: var(--transition);
}

.search-button:hover {
    background-color: var(--accent-color);
}

/* Horizontal Filter Container Styles - NEW */
.horizontal-filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: nowrap;
    border-radius: 50px;
}

.horizontal-filter {
    flex: 1;
    position: relative;
}

.horizontal-filter-select {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #8d8d8d;
    border-radius: 8px;
    background-color: white;
    font-size: 14px;
    color: #5c5b5b;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e53935' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    padding-right: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(39, 39, 39, 0.05);
}

.horizontal-filter-select:focus,
.horizontal-filter-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.1);
    outline: none;
}

.horizontal-filter-select option {
    padding: 10px;
    font-size: 14px;
}

/* Existing Filter Styles (kept for backward compatibility) */
.filter-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.filter-group {
    flex: 1;
    position: relative;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 14px;
}

.filter-select {
    width: 100%;
    padding: 13px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e53935' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    padding-right: 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-select:focus, 
.filter-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.1);
}

/* Results Categories */
.result-section {
    margin-bottom: 30px;
}

.result-category-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary-color);
    padding-left: 10px;
    border-left: 3px solid var(--primary-color);
}

/* Card Styles */
.card-scroll-container {
    display: flex;
    overflow-x: auto;
    padding: 10px 5px 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    gap: 20px;
}

.card-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.card-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

.card-scroll-container::-webkit-scrollbar-track {
    background-color: #f0f0f0;
    border-radius: 10px;
}

.card-item {
    min-width: 220px;
    max-width: 220px;
    padding: 5px;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.custom-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.custom-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-image-container {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.custom-card:hover .card-image {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dorm-badge {
    background-color: var(--secondary-color);
}

.card-content {
    padding: 15px;
}

.card-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 8px;
}

.card-location {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #777;
}

.location-icon {
    margin-right: 5px;
    font-size: 12px;
    color: #999;
}

/* Button Styles */
.view-all-container {
    text-align: right;
    margin-top: 20px;
}

.view-all-button {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.view-all-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    z-index: -1;
}

.view-all-button:hover::before {
    left: 100%;
}

.view-rooms-button {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

.view-rooms-button:hover {
    background-color: #d32f2f;
    box-shadow: 0 6px 16px rgba(229, 57, 53, 0.4);
}

.view-dorms-button {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(33, 33, 33, 0.3);
}

.view-dorms-button:hover {
    background-color: #000;
    box-shadow: 0 6px 16px rgba(33, 33, 33, 0.4);
}

/* No Items Message */
.no-items-message {
    padding: 30px;
    text-align: center;
    width: 100%;
    color: #777;
    font-style: italic;
}

/* Animation Styles */
.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s ease forwards;
}

.animate-pop {
    animation: pop 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pop {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design for all components including horizontal filters */
@media (max-width: 992px) {
    .filter-container, 
    .horizontal-filter-container {
        flex-wrap: wrap;
    }
    
    .filter-group, 
    .horizontal-filter {
        flex: 0 0 calc(50% - 10px);
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .hero-container {
        padding: 10px 0 30px;
    }

    .section-container {
        padding: 10px 0;
    }
    
    .card-item {
        min-width: 180px;
    }
    
    .search-input {
        padding: 12px 20px;
    }
    
    .search-button {
        padding: 0 20px;
    }
    
    .filter-container,
    .horizontal-filter-container {
        flex-direction: column;
    }
    
    .filter-group,
    .horizontal-filter {
        width: 100%;
        flex: 0 0 100%;
    }
    
    .horizontal-filter-select {
        padding: 10px 15px;
    }
}

@media (max-width: 576px) {
    .card-item {
        min-width: 160px;
    }
    
    .card-image-container {
        height: 120px;
    }
    
    .card-content {
        padding: 10px;
    }
    
    .view-all-button {
        padding: 8px 20px;
        font-size: 12px;
    }
}