/* ===============================================
   GLOBAL STYLES & RESETS
   =============================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #fafafa;
}

/* This ensures the header doesn't cover content when fixed */
body {
    padding-top: 70px;
}


/* ===============================================
   HEADER & NAVIGATION
   =============================================== */

/* Fixed header that stays at the top while scrolling */
.site-header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

/* Navbar logo/title styling */
.navbar-brand {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #5b8aaf !important;
    letter-spacing: -0.5px;
}

/* Navigation link styling */
.nav-link {
    color: #333 !important;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
}

.nav-link:hover {
    color: #4a7c9f !important;
}

/* Active navigation link - highlighted for current page */
.nav-link.active {
    color: #5b8aaf !important;
}

/* Register button in navigation */
.navbar-nav .btn-primary {
    background-color: #5b8aaf !important;
    border-color: #5b8aaf !important;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.navbar-nav .btn-primary:hover {
    background-color: #4a7c9f !important;
    border-color: #4a7c9f !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 138, 175, 0.3);
}


/* ===============================================
   SEARCH FILTER SECTION (Top Bar with Filters)
   =============================================== */

/* Container for the filter bar section */
.search-filter-section {
    background: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 70px;
    z-index: 999;
}

/* The card that holds all filter fields */
.search-filter-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    align-items: end;
    border: 1px solid #e9ecef;
}

/* Individual filter field container */
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Labels for each filter field with icons */
.filter-field label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

/* Input fields and select dropdowns in filter bar */
.filter-input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: white;
    color: #1a1a1a;
}

/* Focus state for filter inputs */
.filter-input:focus {
    outline: none;
    border-color: #5b8aaf;
    box-shadow: 0 0 0 3px rgba(91, 138, 175, 0.1);
}

/* Update Results button in filter bar */
.filter-button button {
    background-color: #5b8aaf !important;
    border: none !important;
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    height: 42px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-button button:hover {
    background-color: #4a7c9f !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 138, 175, 0.3);
}


/* ===============================================
   SEARCH RESULTS SECTION (Hotel Listings)
   =============================================== */

/* Main container for search results */
.search-results-section {
    padding: 2.5rem 0 4rem 0;
    background: #fafafa;
}

/* Header area with title and filter controls (sort + currency) */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* "Available Hotels in London" title */
.results-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Container for both sort and currency dropdowns */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Sort dropdown container with label */
.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-dropdown label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

/* Sort select dropdown styling */
.sort-select {
    min-width: 180px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #5b8aaf;
    box-shadow: 0 0 0 3px rgba(91, 138, 175, 0.1);
}

/* Currency dropdown container with label */
.currency-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.currency-dropdown label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

/* Currency select dropdown styling */
.currency-select {
    min-width: 100px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.currency-select:focus {
    outline: none;
    border-color: #5b8aaf;
    box-shadow: 0 0 0 3px rgba(91, 138, 175, 0.1);
}


/* ===============================================
   HOTEL CARDS GRID
   =============================================== */

/* Grid container for all hotel cards - 4 columns on desktop, responsive on smaller screens */
.hotels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Individual hotel card styling */
.hotel-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
}

/* Hover effect on hotel cards - lifts up slightly */
.hotel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Hotel image container */
.hotel-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

/* Hotel image styling with smooth zoom on hover */
.hotel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hotel-card:hover .hotel-image img {
    transform: scale(1.08);
}

/* Hotel details section - contains name, location, description, badges */
.hotel-details {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Hotel name heading */
.hotel-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

/* Location with icon */
.hotel-location {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

/* Hotel description text */
.hotel-description {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Room type badge container */
.hotel-badges {
    margin-bottom: 0.75rem;
}

/* Standard/Deluxe/Family badge styling */
.badge-room-type {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Amenities icons row (WiFi, TV, Breakfast, Mini-bar) */
.hotel-amenities {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Individual amenity icon styling */
.amenity-icon {
    color: #6b7280;
    transition: color 0.2s ease;
}

.amenity-icon:hover {
    color: #5b8aaf;
}

/* Availability badge (Available / Not Available) */
.availability-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: auto;
}

/* Green badge for available rooms */
.availability-badge.available {
    background: #d1fae5;
    color: #065f46;
}

/* Red badge for unavailable rooms */
.availability-badge.not-available {
    background: #fee2e2;
    color: #991b1b;
}


/* ===============================================
   HOTEL CARD FOOTER (Price and Button)
   =============================================== */

/* Footer section of card with price and view details button */
.hotel-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

/* Price container */
.hotel-price {
    display: flex;
    flex-direction: column;
}

/* Price amount */
.price-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

/* "/ night" text */
.price-period {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

/* View Details button in card footer */
.btn-view-details {
    background-color: #5b8aaf;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-view-details:hover {
    background-color: #4a7c9f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 138, 175, 0.3);
}

/* Disabled state for unavailable hotels */
.btn-view-details:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #5b8aaf;
    pointer-events: none;
}

/* Slightly fade the entire footer when hotel is unavailable */
.hotel-footer-unavailable {
    opacity: 0.8;
}

/* Fade the price amount for unavailable hotels */
.hotel-footer-unavailable .price-amount {
    opacity: 0.5;
}

/* Prevent hover effects on disabled buttons */
.btn-view-details:disabled:hover {
    transform: none;
    box-shadow: none;
}


/* ===============================================
   LOAD MORE BUTTON SECTION
   =============================================== */

/* Container for Load More button */
.load-more-section {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* Load More button styling */
.btn-load-more {
    background-color: #5b8aaf !important;
    color: white !important;
    border: none;
    border-radius: 50px;
    padding: 0.85rem 3.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Hover state for Load More button */
.btn-load-more:hover {
    background-color: #4a7c9f !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(90, 138, 175, 0.3);
}

/* Active/pressed state for Load More button */
.btn-load-more:active {
    transform: translateY(0);
}


/* ===============================================
   FOOTER
   =============================================== */

/* Main footer container */
.footer {
    background: #f9fafb;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* Footer content layout */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Footer brand/logo */
.footer .fw-bold.text-primary,
.footer .fw-bold {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #5b8aaf !important;
}

/* Copyright text */
.footer .text-muted {
    font-size: 0.9rem;
    color: #6b7280 !important;
}

/* Footer links container */
.footer-links {
    display: flex;
    gap: 2rem;
}

/* Individual footer links */
.footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #4a7c9f;
}


/* ===============================================
   RESPONSIVE DESIGN - TABLETS
   =============================================== */

@media (max-width: 992px) {
    /* Adjust hotels grid to 3 columns on tablets */
    .hotels-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    /* Stack filter fields more on tablets */
    .search-filter-card {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    
    /* Make Update Results button wider on tablets to prevent text wrapping */
    .filter-button {
        grid-column: span 2;
        min-width: 200px;
    }
    
    .filter-button button {
        white-space: nowrap;
    }
    
    /* Smaller title on tablets */
    .results-title {
        font-size: 1.75rem;
    }
}


/* ===============================================
   RESPONSIVE DESIGN - MOBILE PHONES
   =============================================== */

@media (max-width: 768px) {
    /* Stack filter fields vertically on mobile */
    .search-filter-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Full width hotels grid on mobile */
    .hotels-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    /* Stack results header vertically on mobile */
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Full width sort dropdown on mobile */
    .sort-dropdown {
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
    }
    
    /* Smaller title on mobile */
    .results-title {
        font-size: 1.5rem;
    }
    
    /* Adjust hotel image height on mobile */
    .hotel-image {
        height: 180px;
    }
    
    /* Stack footer content vertically on mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    /* Stack footer links vertically on mobile */
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}


/* ===============================================
   UTILITY CLASSES (Extra Helpers)
   =============================================== */

/* Remove sticky behavior on very small screens to save space */
@media (max-width: 576px) {
    .search-filter-section {
        position: relative;
        top: 0;
    }
    
    /* Reduce padding on search filter section */
    .search-filter-card {
        padding: 1rem;
    }
    
    /* Smaller pagination on mobile */
    .page-item .page-link {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }
}