﻿.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25) !important;
    border-color: #28a745 !important;
}

.validation-summary ul {
    padding-left: 20px !important;
    margin-bottom: 20px !important;
}

input[type="submit"], button[type="submit"] {
    transition: all 0.3s ease !important;
}

    input[type="submit"]:hover, button[type="submit"]:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    }

.login-container, .register-container {
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
}

.back-to-top {
    right: 20px !important;
    bottom: 20px !important;
    z-index: 998 !important;
}

/* Better focus states for accessibility */
*:focus-visible {
    outline: 2px solid #28a745 !important;
    outline-offset: 2px !important;
}

*:focus:not(:focus-visible) {
    outline: none !important;
}

@media (max-width: 767.98px) {
    /* ===== TYPOGRAPHY ===== */
    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.3rem !important;
    }

    /* ===== LAYOUT ===== */
    .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden !important;
    }

    .row {
        margin-left: -10px !important;
        margin-right: -10px !important;
    }

    .col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
    .col-sm, .col-md, .col-lg, .col-xl {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* ===== FORMS ===== */
    .form-control, input[type="text"], input[type="email"],
    input[type="password"], input[type="number"], input[type="date"],
    input[type="tel"], input[type="month"], select, textarea {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 12px !important;
        box-sizing: border-box !important;
    }

    .form-label {
        font-size: 14px !important;
    }

    /* Make checkboxes more touch-friendly */
    .form-check-input {
        width: 20px !important;
        height: 20px !important;
        margin-top: 2px !important;
    }

    .form-check-label {
        margin-left: 5px !important;
        padding: 3px 0 !important;
    }

    /* Submit buttons on forms */
    .d-grid .btn {
        padding: 12px !important;
        font-size: 16px !important;
    }

    .mb-3 {
        margin-bottom: 20px !important;
    }

    /* Bootstrap modal fixes */
    .modal-dialog {
        margin: 10px;
        width: calc(100% - 20px);
        max-width: none;
    }

    /* Enhanced touch targets */
    button, .btn, a.btn, input[type="submit"], input[type="button"] {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 10px 15px !important;
        touch-action: manipulation !important;
    }

    /* ===== FIX 1: WEEKEND/WEEKDAYS CHECKBOX LAYOUT ===== */
    .weekend-definition {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(130px, 1fr)) !important;
        gap: 10px !important;
        padding: 15px !important;
        background: transparent !important;
        border: none !important;
        box-sizing: border-box !important;
        justify-content: start !important;
    }

    .day-checkbox {
        min-width: 130px !important;
        width: 130px !important;
        max-width: 130px !important;
        background-color: #f8f9fa !important;
        padding: 12px 14px !important;
        border-radius: 8px !important;
        border: 1px solid #dee2e6 !important;
        margin-bottom: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        transition: all 0.2s ease !important;
    }

        .day-checkbox:hover {
            background-color: #e8f5e8 !important;
            border-color: #28a745 !important;
        }

        .day-checkbox label {
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            cursor: pointer !important;
            font-size: 15px !important;
            font-weight: 500 !important;
            color: #333 !important;
            background: none !important;
            border: none !important;
            box-sizing: border-box !important;
            white-space: nowrap !important;
        }

        .day-checkbox input[type="checkbox"] {
            width: 18px !important;
            height: 18px !important;
            margin: 0 25px 0 0 !important;
            flex-shrink: 0 !important;
            accent-color: #28a745 !important;
            background: white !important;
            border: 2px solid #dee2e6 !important;
            border-radius: 4px !important;
        }

        /* Style checked state */
        .day-checkbox:has(input:checked) {
            background-color: #e8f5e8 !important;
            border-color: #28a745 !important;
        }

            .day-checkbox:has(input:checked) label {
                color: #28a745 !important;
                font-weight: 600 !important;
            }

    /* Fix season info text */
    .season-info {
        text-align: center !important;
        margin-top: 15px !important;
        padding: 12px !important;
        background-color: #e3f2fd !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        color: #1976d2 !important;
        font-style: italic !important;
    }

    /* ===== PRICING GRID MOBILE FIXES ===== */
    .pricing-grid {
        display: block !important;
        width: 100% !important;
    }

    .pricing-row {
        display: block !important;
        margin-bottom: 15px !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    }

    .pricing-header {
        display: none !important;
    }

    .pricing-cell {
        display: block !important;
        border: none !important;
        border-bottom: 1px solid #eee !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }

        .pricing-cell:last-child {
            border-bottom: none !important;
        }

    .pricing-row .pricing-cell:first-child {
        background-color: #f8f9fa !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        color: #333 !important;
    }

    .price-input {
        width: 100% !important;
        height: 44px !important;
        font-size: 16px !important;
        padding: 12px 12px 12px 30px !important;
        box-sizing: border-box !important;
    }

    /* Season definition mobile fix */
    .season-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .season-dates {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

        .season-dates input[type="month"] {
            width: 100% !important;
            height: 44px !important;
            font-size: 16px !important;
        }

    /* ===== FIX 2: REGISTER BUTTON CENTERING ===== */
    .register-container {
        max-width: 500px !important;
        margin: 0 auto !important;
        padding: 20px 15px !important;
        text-align: center !important;
    }

        .register-container .form-group,
        .register-container .mb-3 {
            margin-bottom: 20px !important;
            text-align: left !important; /* Keep form labels left-aligned */
        }

        .register-container .form-label {
            display: block !important;
            margin-bottom: 8px !important;
            font-weight: 500 !important;
            color: #333 !important;
            text-align: left !important;
        }

        /* Center the register button container */
        .register-container .d-grid {
            margin: 25px auto 20px auto !important;
            text-align: center !important;
            max-width: 100% !important;
        }

        /* Style the register button */
        .register-container input[type="submit"],
        .register-container .btn-primary {
            width: 100% !important;
            padding: 12px 20px !important;
            font-size: 16px !important;
            font-weight: 600 !important;
            border: none !important;
            border-radius: 8px !important;
            background-color: #28a745 !important;
            color: white !important;
            transition: all 0.3s ease !important;
            cursor: pointer !important;
            margin: 0 auto !important;
            display: block !important;
        }

            .register-container input[type="submit"]:hover,
            .register-container .btn-primary:hover {
                background-color: #218838 !important;
                transform: translateY(-2px) !important;
                box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
            }

        /* Center any links below register button */
        .register-container p,
        .register-container .text-center {
            text-align: center !important;
            margin: 15px 0 !important;
        }

        .register-container a {
            color: #28a745 !important;
            text-decoration: none !important;
            font-weight: 500 !important;
        }

            .register-container a:hover {
                color: #218838 !important;
                text-decoration: underline !important;
            }

    /* ===== FIX 3: MOBILE LISTING CONTAINER SHADOW FIXES ===== */
    /* Fix grid container padding to prevent shadow overflow */
    #listingsContainer {
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    /* Ensure listing image container is properly contained */
    .listing-image-container {
        padding-bottom: 75% !important; /* 4:3 aspect ratio */
        overflow: hidden !important;
        border-radius: 15px 15px 0 0 !important;
    }

    /* Ensure content section is properly contained */
    .package-item .p-4 {
        padding: 1rem !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Fix for very small screens */
    .package-item {
        margin: 0 5px !important;
        max-width: calc(100% - 10px) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* ===== FIX 4: MYLISTINGS VIEW MOBILE FIXES ===== */
    .listing-container {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
        gap: 1rem !important;
        padding: 0 0.5rem !important;
    }

    .listing-card {
        height: auto !important;
        min-height: 380px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* Ensure image container maintains aspect ratio */
    .listing-image-container {
        padding-bottom: 65% !important;
    }

    /* Improve info section spacing */
    .listing-info {
        padding: 1rem 0.75rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        min-height: 140px !important;
    }

        .listing-info h5 {
            font-size: 1rem !important;
            margin-bottom: 0.5rem !important;
            line-height: 1.3 !important;
        }

    .request-photoshoot-btn {
        width: 100% !important;
        padding: 10px 12px !important;
        font-size: 14px !important;
        margin-top: auto !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* ===== ADDLISTING PAGE RESPONSIVENESS ===== */
    #wizard-container {
        width: 95% !important;
        padding: 15px !important;
        margin-top: 20px !important;
    }

    .wizard-step h2 {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
    }

    .input-field {
        max-width: 100% !important;
        width: 100% !important;
        font-size: 16px !important;
        padding: 12px !important;
    }

    #step1 .input-group {
        flex-direction: column !important;
    }

    #step1 .input-item {
        width: 100% !important;
        margin-bottom: 8px !important;
    }

    #map {
        height: 300px !important;
        width: 100% !important;
    }

    #step3 .input-group,
    #step4 .input-group {
        flex-direction: column !important;
    }

    #step3 .input-item,
    #step4 .input-item {
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    #photo-preview-container {
        justify-content: center !important;
    }

    #step6 input, #step8 input, #step10 input {
        width: 100% !important;
        max-width: 100% !important;
    }

    #step7 textarea {
        width: 100% !important;
        max-width: 100% !important;
    }

    .wizard-footer {
        display: flex !important;
        gap: 10px !important;
        margin-top: 30px !important;
        padding-top: 20px !important;
        border-top: 1px solid #eee !important;
    }

        .wizard-footer .btn {
            flex: 1 !important;
            min-height: 44px !important;
            font-size: 16px !important;
            padding: 12px !important;
        }

    input[type="radio"],
    input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        margin-right: 10px !important;
    }

    label {
        padding: 8px 0 !important;
        font-size: 1rem !important;
    }

    #district, #city {
        width: 100% !important;
        margin-bottom: 15px !important;
        height: 45px !important;
    }

    #selectedLocation {
        font-size: 0.9rem !important;
        word-break: break-word !important;
    }

    /* ===== LOGIN/REGISTER FORMS ===== */
    .login-container, .register-container {
        padding: 20px 15px !important;
        margin: 0 10px !important;
    }

    /* ===== NAVIGATION ===== */
    .navbar-brand h1 {
        font-size: 1.5rem !important;
    }

    #vertical-line {
        display: none !important;
    }

    .switch-link {
        display: block;
        text-align: center;
        margin: 5px 0;
    }

    .navbar-toggler {
        padding: 5px 10px;
        border: 1px solid #28a745;
    }

    .navbar-nav .nav-item {
        padding: 5px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .navbar {
        padding: 10px !important;
    }

    .navbar-collapse {
        background-color: white !important;
        padding: 10px !important;
        border-radius: 0 0 5px 5px !important;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1) !important;
    }

    /* ===== FOOTER ===== */
    .footer-col {
        margin-bottom: 30px;
    }

    .container-fluid.bg-dark {
        padding: 30px 15px !important;
    }

    .footer-col h5 {
        margin-bottom: 15px !important;
    }

    /* ===== HOME PAGE ===== */
    .carousel-item img {
        height: 50vh;
        object-fit: cover;
    }

    .carousel-caption {
        padding-bottom: 20px;
    }

        .carousel-caption h1 {
            font-size: 1.5rem !important;
        }

        .carousel-caption h4 {
            font-size: 1rem !important;
        }

        .carousel-caption .btn {
            padding: 8px 15px !important;
            font-size: 0.9rem !important;
        }

    .destination-item {
        margin-bottom: 15px;
    }

    .about-text {
        padding: 15px !important;
    }

    /* ===== MAP FUNCTIONALITY ===== */
    .map-toggle-btn {
        width: 50px;
        height: 56px;
    }

    .map-close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 1002;
        font-size: 20px;
        color: #333;
        cursor: pointer;
    }

    .show-map .desktop-map-container {
        display: none;
    }

    .show-map .listings-container {
        padding-left: 0;
    }

    .mobile-map-container {
        top: 5%;
        left: 2.5%;
        width: 95%;
        height: 90%;
    }
}

/* ===================================================================
   EXTRA SMALL MOBILE (max-width: 575.98px)
   =================================================================== */

@media (max-width: 575.98px) {
    .listing-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        max-width: 350px !important;
        margin: 0 auto !important;
        padding: 0 1rem !important;
    }

    .listing-card {
        min-height: 360px !important;
        width: 100% !important;
    }

    .weekend-definition {
        grid-template-columns: 1fr !important;
    }

    .text-center.mt-4 .btn {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    #listingsContainer {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 5px !important;
    }

    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ===================================================================
   TABLET STYLES (768px - 991.98px)
   =================================================================== */

@media (min-width: 768px) and (max-width: 991.98px) {
    /* Container adjustments */
    .container, .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Listings layout */
    .listings-wrapper {
        padding: 20px !important;
    }

    .listings-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    .listing-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 450px)) !important;
        max-width: 900px !important;
        gap: 1.5rem !important;
        margin: 0 auto !important;
    }

    .package-item {
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    /* Map container for tablets */
    .desktop-map-container {
        width: 400px !important;
        position: sticky !important;
        top: 20px !important;
        height: calc(100vh - 100px) !important;
    }

    /* Weekend definition for tablets */
    .weekend-definition {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }

    .day-checkbox {
        background-color: #f8f9fa;
        padding: 8px !important;
        border-radius: 5px;
        border: 1px solid #dee2e6;
    }

    /* Forms on tablets */
    #wizard-container {
        width: 80% !important;
        max-width: 600px !important;
        padding: 30px !important;
    }

    /* Navigation improvements */
    .navbar-nav {
        flex-direction: row !important;
        justify-content: center !important;
    }

        .navbar-nav .nav-item {
            margin: 0 10px !important;
        }

    /* Home page adjustments */
    .carousel-caption h1 {
        font-size: 2.5rem !important;
    }

    .feature-boxes {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

/* ===================================================================
   LARGE TABLET/SMALL DESKTOP (992px - 1199.98px)
   =================================================================== */

@media (min-width: 992px) and (max-width: 1199.98px) {
    .listing-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 400px)) !important;
        justify-content: center !important;
        max-width: 1000px !important;
        margin: 0 auto !important;
    }

    #listingsContainer {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    .show-map #listingsContainer {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ===================================================================
   DESKTOP STYLES (min-width: 992px)
   =================================================================== */

@media (min-width: 992px) {
    /* Desktop enhancements */
    .container {
        max-width: 1140px !important;
    }

    /* Hover effects only on desktop */
    .package-item:hover, .destination-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }

    /* Desktop navigation improvements */
    .navbar-nav .nav-item {
        margin: 0 5px !important;
    }

    /* Improved desktop listing page layout */
    .listings-wrapper {
        height: calc(100vh - 100px) !important;
        overflow-y: auto !important;
    }

    /* Better map position on desktop */
    .map-container {
        position: sticky !important;
        top: 20px !important;
    }

    /* Desktop restore for MyListings */
    .listing-container {
        grid-template-columns: repeat(auto-fit, minmax(320px, 380px)) !important;
        justify-content: flex-start !important;
        max-width: none !important;
        gap: 2rem !important;
        padding: 0 2rem !important;
    }

    .listing-card {
        height: 440px !important;
    }
}

/* ===================================================================
   LARGE DESKTOP (min-width: 1200px)
   =================================================================== */

@media (min-width: 1200px) {
    #listingsContainer {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }

        #listingsContainer .package-item {
            width: 100% !important;
            max-width: none !important;
        }
}

/* ===================================================================
   EXTRA LARGE DESKTOP (min-width: 1600px)
   =================================================================== */

@media (min-width: 1600px) {
    #listingsContainer {
        grid-template-columns: repeat(5, 1fr);
    }

    .show-map #listingsContainer {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================================================
   MAP FUNCTIONALITY
   =================================================================== */

.map-toggle-btn {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: #28a745 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
    z-index: 999 !important;
    cursor: pointer !important;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

    .map-toggle-btn i {
        font-size: 24px;
    }

    .map-toggle-btn:hover {
        background-color: #218838 !important;
    }

.show-map .map-toggle-btn {
    transform: translateX(-50%) rotate(180deg) !important;
}

    .show-map .map-toggle-btn:hover {
        background-color: #218838 !important;
    }

/* Map overlay styles */
.map-overlay, .mobile-map-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    z-index: 1001;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .map-overlay.show, .mobile-map-overlay.show {
        opacity: 1;
    }

.map-container, .mobile-map-container {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 90%;
    height: 80%;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.map-overlay.show .map-container,
.mobile-map-overlay.show .mobile-map-container {
    transform: translateY(0);
    opacity: 1;
}

/* Desktop map adjustments */
.desktop-map-container {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-right: 20px;
}

@media (min-width: 768px) {
    .desktop-map-container {
        width: 400px;
        transition: width 0.3s ease, opacity 0.3s ease;
        opacity: 0;
    }

    .show-map .desktop-map-container {
        opacity: 1;
    }

    #desktopMap {
        width: 100% !important;
        height: 100% !important;
        background-color: #f0f0f0;
    }
}

/* ===================================================================
   PACKAGE ITEM SHADOW FIXES
   =================================================================== */

.package-item {
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: auto;
    display: flex;
    flex-direction: column;
    min-width: 250px;
    /* Clean, contained shadow */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    box-sizing: border-box !important;
    overflow: hidden !important;
}

    .package-item:hover {
        transform: translateY(-6px);
        /* Contained hover shadow */
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    /* Ensure the inner content fits perfectly */
    .package-item .bg-white {
        display: flex;
        flex-direction: column;
        height: 100%;
        border-radius: 15px;
        overflow: hidden;
        /* Remove any conflicting shadows */
        box-shadow: none !important;
        /* Ensure perfect fit */
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

/* ===================================================================
   UTILITY CLASSES & MISC
   =================================================================== */

/* Ensure proper stacking order */
.map-location-btn {
    z-index: 15 !important;
}

.image-nav {
    z-index: 20 !important;
}

.image-indicators {
    z-index: 18 !important;
}

/* Login form center alignment */
#loginForm .form-group {
    text-align: center;
}

#loginForm .form-control {
    margin: 0 auto;
    max-width: 300px;
    width: 100%;
}

#loginForm .btn {
    display: block;
    margin: 20px auto;
    min-width: 150px;
}

#loginForm .validation-summary-valid,
#loginForm .validation-summary-errors {
    text-align: center;
}

#loginForm {
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

    #loginForm .checkbox {
        text-align: center;
        margin: 15px 0;
    }

/* Footer improvements */
.footer-col .text-primary {
    transition: color 0.3s;
    margin-right: 15px;
}

    .footer-col .text-primary:hover {
        color: #0056b3 !important;
    }

/* Switch link styling */
.switch-link {
    cursor: pointer;
    margin-left: 10px;
}

/* Leaflet touch controls */
@media (max-width: 767.98px) {
    .leaflet-touch .leaflet-control-zoom a {
        width: 34px;
        height: 34px;
        line-height: 34px;
    }
}

/* Ensure proper touch targets for touch devices */
@media (hover: none) and (pointer: coarse) {
    button, .btn, a.btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    /* ===================================================================
   FIXED DESKTOP + MOBILE FILTERS
   Desktop: Always visible, compact
   Mobile: Toggleable with beautiful green button
   =================================================================== */

    /* Filter Toggle Button - ONLY visible on mobile */
    .filter-toggle-btn {
        display: none; /* Hidden by default */
        position: sticky;
        top: 10px;
        z-index: 100;
        width: 100%;
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        color: white;
        border: none;
        border-radius: 12px;
        padding: 12px 20px;
        font-size: 16px;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

        .filter-toggle-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
        }

        .filter-toggle-btn:active {
            transform: translateY(0);
        }

        .filter-toggle-btn .filter-icon {
            font-size: 18px;
            transition: transform 0.3s ease;
        }

        .filter-toggle-btn.active .filter-icon {
            transform: rotate(180deg);
        }

        .filter-toggle-btn .filter-count {
            background: rgba(255, 255, 255, 0.2);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 12px;
            font-weight: 500;
        }

        /* Active filter button styling - Orange when filters are active */
        .filter-toggle-btn.has-active-filters {
            background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        }

        

    @keyframes pulse {
        0% {
            box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
        }

        50% {
            box-shadow: 0 6px 25px rgba(253, 126, 20, 0.4);
        }

        100% {
            box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
        }
    }

    /* Enhanced Filters Section */
    .filters-section {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border: 1px solid rgba(0, 0, 0, 0.06);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        position: relative;
        border-radius: 12px;
    }

        .filters-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, #28a745, #20c997, #17a2b8);
            opacity: 0.8;
        }

    /* DESKTOP STYLES (min-width: 768px) - Always visible, compact */
    @media (min-width: 768px) {
        /* Hide toggle button on desktop */
        .filter-toggle-btn {
            display: none !important;
        }

        /* Compact, always-visible filters on desktop */
        .filters-section {
            padding: 15px 10px !important; /* Smaller padding */
            margin-bottom: 25px !important; /* Less margin */
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); /* Subtle shadow */
            max-height: none !important; /* Always expanded */
            opacity: 1 !important;
            transform: none !important;
        }

            /* Keep original desktop grid layout but more compact */
            .filters-section .row {
                display: grid !important;
                grid-template-columns: repeat(4, minmax(180px, 1fr)) !important; /* Slightly smaller min-width */
                gap: 12px !important; /* Smaller gap */
                margin: 0 !important;
            }

            .filters-section .container,
            .filters-section .container-fluid {
                max-width: none !important;
                width: 100% !important;
                padding: 0 !important;
            }

            /* Compact filter group containers */
            .filters-section .row > div {
                background: rgba(255, 255, 255, 0.9) !important;
                padding: 12px !important; /* Smaller padding */
                border-radius: 8px !important; /* Smaller radius */
                border: 1px solid rgba(40, 167, 69, 0.1) !important;
                box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important; /* Subtle shadow */
                transition: all 0.3s ease !important;
                position: relative;
                overflow: hidden;
            }

                .filters-section .row > div::before {
                    content: '';
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    height: 1px;
                    background: linear-gradient(90deg, transparent, #28a745, transparent);
                    opacity: 0.3;
                }

                .filters-section .row > div:hover {
                    transform: translateY(-1px) !important;
                    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08) !important;
                    border-color: rgba(40, 167, 69, 0.2) !important;
                }

            /* Compact desktop form controls */
            .filters-section .form-control,
            .filters-section .select2-container--default .select2-selection--single {
                height: 40px !important; /* Smaller height */
                font-size: 14px !important; /* Smaller font */
                padding: 8px 12px !important; /* Less padding */
                border-radius: 6px !important; /* Smaller radius */
                border: 1px solid #e9ecef !important; /* Thinner border */
                background: white !important;
                transition: all 0.3s ease !important;
                font-weight: 400 !important;
            }

                .filters-section .form-control:focus,
                .filters-section .select2-container--default.select2-container--focus .select2-selection--single {
                    border-color: #28a745 !important;
                    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1) !important; /* Smaller focus ring */
                    background: #fff !important;
                }

            /* Compact desktop labels */
            .filters-section label {
                display: block !important;
                margin-bottom: 6px !important; /* Less margin */
                min-height: 16px !important; /* Smaller height */
                line-height: 16px !important;
                font-weight: 600 !important;
                font-size: 13px !important; /* Smaller font */
                color: #495057 !important;
                display: flex !important;
                align-items: center !important;
                gap: 6px !important; /* Smaller gap */
            }

                .filters-section label::before {
                    content: '🔍';
                    font-size: 10px; /* Smaller icons */
                    opacity: 0.7;
                }

                .filters-section label[for="citySelect"]::before {
                    content: '📍';
                }

                .filters-section label[for="minPrice"]::before {
                    content: '💰';
                }

                .filters-section label[for="minGuests"]::before {
                    content: '👥';
                }

                .filters-section label[for="sortBy"]::before {
                    content: '📊';
                }

            /* Compact price slider */
            .filters-section #priceSlider {
                margin-top: 20px !important; /* Less margin */
            }

            /* Compact desktop buttons */
            .filters-section .btn {
                padding: 8px 16px !important; /* Smaller padding */
                font-size: 13px !important; /* Smaller font */
                font-weight: 600 !important;
                border-radius: 6px !important; /* Smaller radius */
                transition: all 0.3s ease !important;
                position: relative;
                overflow: hidden;
            }

            .filters-section .btn-primary {
                background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
                border: none !important;
                color: white !important;
                box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3) !important; /* Smaller shadow */
            }

                .filters-section .btn-primary:hover {
                    transform: translateY(-1px) !important;
                    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.4) !important;
                }

            .filters-section .btn-outline-secondary {
                border: 1px solid #e9ecef !important; /* Thinner border */
                color: #6c757d !important;
                background: white !important;
            }

                .filters-section .btn-outline-secondary:hover {
                    background: #f8f9fa !important;
                    border-color: #28a745 !important;
                    color: #28a745 !important;
                    transform: translateY(-1px) !important;
                }

        /* Compact active filter indicator */
        .active-filter-indicator {
            position: absolute;
            top: 6px;
            right: 6px;
            width: 6px; /* Smaller indicator */
            height: 6px;
            background: #28a745;
            border-radius: 50%;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .filters-section .row > div.has-value .active-filter-indicator {
            opacity: 1;
        }

        /* Compact sort section */
        .sort-section {
            background: rgba(255, 255, 255, 0.9) !important;
            border: 1px solid rgba(40, 167, 69, 0.1) !important;
            border-radius: 8px !important;
            padding: 10px 12px !important; /* Smaller padding */
            margin-bottom: 15px !important;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
        }

            .sort-section .form-control {
                height: 36px !important; /* Smaller height */
                font-size: 13px !important;
                padding: 6px 10px !important;
                border-radius: 5px !important;
                border: 1px solid #e9ecef !important;
            }

            .sort-section label {
                font-size: 12px !important; /* Smaller font */
                font-weight: 600 !important;
                color: #495057 !important;
                margin-bottom: 4px !important;
            }
    }

    /* MOBILE STYLES (max-width: 767px) - Toggleable with beautiful button */
    @media (max-width: 767px) {
        /* Show toggle button on mobile */
        .filter-toggle-btn {
            display: flex !important;
        }

        .filters-section {
            padding: 0 !important;
            margin-bottom: 20px !important;
            max-height: 0;
            opacity: 0;
            transform: translateY(-10px);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }

            .filters-section.show {
                max-height: 1000px;
                opacity: 1;
                transform: translateY(0);
                padding: 20px 15px !important;
            }

            .filters-section .container,
            .filters-section .container-fluid {
                padding: 0 !important;
            }

            .filters-section .row {
                grid-template-columns: 1fr !important;
                gap: 16px !important;
                margin: 0 !important;
            }

                /* Beautiful mobile filter group containers */
                .filters-section .row > div {
                    background: rgba(255, 255, 255, 0.9) !important;
                    padding: 16px 12px !important;
                    border-radius: 10px !important;
                    border: 1px solid rgba(40, 167, 69, 0.1) !important;
                    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
                    transition: all 0.3s ease !important;
                    position: relative;
                    overflow: hidden;
                }

                    .filters-section .row > div::before {
                        content: '';
                        position: absolute;
                        top: 0;
                        left: 0;
                        right: 0;
                        height: 1px;
                        background: linear-gradient(90deg, transparent, #28a745, transparent);
                        opacity: 0.3;
                    }

                    .filters-section .row > div:hover {
                        transform: translateY(-1px) !important;
                        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
                        border-color: rgba(40, 167, 69, 0.2) !important;
                    }

            /* Enhanced mobile form controls */
            .filters-section .form-control,
            .filters-section .select2-container--default .select2-selection--single {
                height: 42px !important;
                font-size: 14px !important;
                padding: 10px 14px !important;
                border-radius: 8px !important;
                border: 2px solid #e9ecef !important;
                background: white !important;
                transition: all 0.3s ease !important;
                font-weight: 400 !important;
            }

                .filters-section .form-control:focus,
                .filters-section .select2-container--default.select2-container--focus .select2-selection--single {
                    border-color: #28a745 !important;
                    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
                    background: #fff !important;
                }

            /* Beautiful mobile labels with icons */
            .filters-section label {
                font-size: 14px !important;
                font-weight: 600 !important;
                margin-bottom: 8px !important;
                color: #495057 !important;
                display: flex !important;
                align-items: center !important;
                gap: 8px !important;
            }

                .filters-section label::before {
                    content: '🔍';
                    font-size: 12px;
                    opacity: 0.7;
                }

                .filters-section label[for="citySelect"]::before {
                    content: '📍';
                }

                .filters-section label[for="minPrice"]::before {
                    content: '💰';
                }

                .filters-section label[for="minGuests"]::before {
                    content: '👥';
                }

                .filters-section label[for="sortBy"]::before {
                    content: '📊';
                }

            /* Enhanced mobile price slider */
            .filters-section #priceSlider {
                margin: 25px 5px 20px 5px !important;
            }

        .price-labels {
            display: flex !important;
            justify-content: space-between !important;
            margin-bottom: 12px !important;
            font-size: 13px !important;
            font-weight: 600 !important;
            color: #6c757d !important;
        }

        /* Beautiful mobile buttons */
        .filters-section .btn {
            padding: 10px 20px !important;
            font-size: 14px !important;
            font-weight: 600 !important;
            border-radius: 8px !important;
            transition: all 0.3s ease !important;
            position: relative;
            overflow: hidden;
        }

        .filters-section .btn-primary {
            background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
            border: none !important;
            color: white !important;
            box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3) !important;
        }

            .filters-section .btn-primary:hover {
                transform: translateY(-1px) !important;
                box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4) !important;
            }

        .filters-section .btn-outline-secondary {
            border: 2px solid #e9ecef !important;
            color: #6c757d !important;
            background: white !important;
        }

            .filters-section .btn-outline-secondary:hover {
                background: #f8f9fa !important;
                border-color: #28a745 !important;
                color: #28a745 !important;
                transform: translateY(-1px) !important;
            }

        /* Mobile button container */
        .filter-buttons {
            display: flex !important;
            gap: 10px !important;
            margin-top: 20px !important;
            padding-top: 15px !important;
            border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
        }

            .filter-buttons .btn {
                flex: 1 !important;
            }

        /* Mobile active filter indicator */
        .active-filter-indicator {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 8px;
            height: 8px;
            background: #28a745;
            border-radius: 50%;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .filters-section .row > div.has-value .active-filter-indicator {
            opacity: 1;
        }

        /* Enhanced mobile sort section */
        .sort-section {
            background: rgba(255, 255, 255, 0.9) !important;
            border: 1px solid rgba(40, 167, 69, 0.1) !important;
            border-radius: 10px !important;
            padding: 12px 15px !important;
            margin-bottom: 15px !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        }

            .sort-section .form-control {
                height: 38px !important;
                font-size: 13px !important;
                padding: 8px 12px !important;
                border-radius: 6px !important;
                border: 2px solid #e9ecef !important;
            }

            .sort-section label {
                font-size: 13px !important;
                font-weight: 600 !important;
                color: #495057 !important;
                margin-bottom: 6px !important;
            }
    }

    /* Extra small devices (phones in portrait, less than 576px) */
    @media (max-width: 575.98px) {
        .filter-toggle-btn {
            padding: 10px 16px !important;
            font-size: 15px !important;
            border-radius: 10px !important;
        }

        .filters-section.show {
            padding: 16px 12px !important;
        }

        .filters-section .row > div {
            padding: 12px 10px !important;
        }

        .filters-section .form-control,
        .filters-section .select2-container--default .select2-selection--single {
            height: 38px !important;
            font-size: 13px !important;
            padding: 8px 12px !important;
        }
    }

    /* Loading animation for filter toggle (mobile only) */
    .filter-toggle-btn.loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        animation: shimmer 1.5s infinite;
    }

    @keyframes shimmer {
        0% {
            left: -100%;
        }

        100% {
            left: 100%;
        }
    }

    /* Smooth accordion animation (mobile only) */
    @media (max-width: 767px) {
        .filters-section {
            transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, transform 0.3s ease, padding 0.3s ease;
        }
    }

    /* Accessibility improvements */
    .filter-toggle-btn:focus {
        outline: 3px solid rgba(40, 167, 69, 0.5) !important;
        outline-offset: 2px !important;
    }

    .filters-section .form-control:focus {
        outline: 2px solid rgba(40, 167, 69, 0.5) !important;
        outline-offset: 1px !important;
    }}
