/* Reset and global configuration */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Main container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Modern header */
.main-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.main-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1976d2;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: #1565c0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    color: #666;
    font-size: 0.95rem;
}

/* Footer */
.main-footer {
    background: #1a1a1a;
    color: white;
    padding: 25px 30px;
    text-align: center;
    margin-top: 50px;
}

.main-footer a {
    color: #1976d2;
    text-decoration: none;
}

.main-footer a:hover {
    color: #1565c0;
}

/* Legacy container (for compatibility) */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin: 20px 0;
    color: #333;
}

.search-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-form input,
.search-form select,
.search-form button {
    padding: 10px;
    margin: 5px;
}

.search-form button {
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.hotel-result {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.hotel-card {
    width: calc(33.333% - 20px);
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.hotel-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.hotel-card .image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    /* Use relative path so it works with any STATIC_URL */
    background: #ddd url('../images/placeholder.jpg') center center / cover no-repeat;
}

.hotel-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hotel-card .details {
    padding: 10px;
}

.hotel-card h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 18px;
}

.hotel-card p {
    color: #777;
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.4;
}

.hotel-card .stars {
    color: #ffc107;
}

.hotel-card .amenities {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

.amenities .amenity {
    display: inline-block;
    background-color: #f0f0f0;
    color: #555;
    padding: 5px 10px;
    margin: 3px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.amenities .amenity.special {
    background-color: #28a745;
    color: white;
}

.no-results {
    text-align: center;
    margin-top: 50px;
    color: #777;
}

.no-results h3 {
    color: #333;
}

.no-resuls .btn {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.no-results .btn:hover {
    background-color: #218838;
}

footer {
    padding: 10px;
    background-color: #333;
    color: #fff;
    text-align: center;
    margin-top: 20px;
}

footer a {
    color: #28a745;
    text-decoration: none;
}

/* Media Queries for Small Devices */
@media (max-width: 768px) {
    .hotel-card {
        width: calc(50% - 20px);
    }

    .hotel-card .image-container {
        padding-top: 75%;
    }

    .hotel-result {
        justify-content: center; /* Center the cards */
    }
}

@media (max-width: 480px) {
    .hotel-card {
        width: 100%;
    }

    .hotel-card .image-container {
        padding-top: 100%;
    }
}

/* Loader overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    margin-top: 10px;
    font-size: 1.2rem;
    color: #007bff;
}
