/* Styles for venture-list: moved out of the template inline <style> block(s). */

    .col-md-3 {
        padding: 20px;
        background-color: #f8f9fa;
    }
    .slider-container {
        position: relative;
        height: 40px;
    }
    .slider-track {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 6px;
        background-color: #e0e0e0;
        border-radius: 5px;
        transform: translateY(-50%);
        z-index: 1;
    }
    #slider-fill-price, #slider-fill-area {
        position: absolute;
        top: 50%;
        left: 0%;
        width: 100%;
        height: 6px;
        border-radius: 5px;
        transform: translateY(-50%);
        z-index: 2;
        background: linear-gradient(90deg, #1a2a44 0%, #2e4372 100%);
    }
    .slider {
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        height: 6px;
        background: transparent;
        outline: none;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 3;
        margin: 0;
        pointer-events: none;
    }
    .slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 24px;
        height: 24px;
        background: linear-gradient(90deg, #1a2a44 0%, #2e4372 100%);
        border: 3px solid #fff;
        border-radius: 50%;
        cursor: pointer;
        pointer-events: auto;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .slider::-webkit-slider-thumb:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    }
    .slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
        background: linear-gradient(90deg, #1a2a44 0%, #2e4372 100%);
        border: 3px solid #fff;
        border-radius: 50%;
        cursor: pointer;
        pointer-events: auto;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .slider::-moz-range-thumb:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    }
    .slider::-ms-thumb {
        width: 24px;
        height: 24px;
        background: linear-gradient(90deg, #1a2a44 0%, #2e4372 100%);
        border: 3px solid #fff;
        border-radius: 50%;
        cursor: pointer;
        pointer-events: auto;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .slider::-ms-thumb:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    }
    .form-check-input {
        background-color: #fff;
        border: 2px solid #2e4372;
        cursor: pointer;
    }
    .form-check-input:checked {
        background-color: #2e4372;
        border-color: #1a2a44;
    }
    .form-check-input:focus {
        box-shadow: 0 0 0 0.2rem rgba(46, 67, 114, 0.25);
    }
    .venture-details-btn {
        width: 100%;
        transition: all 0.3s ease;
        margin-bottom: 0; /* No margin to prevent shift */
        flex-shrink: 0; /* Don't shrink */
    }
    .venture-details-btn:hover {
        background: #003087 !important;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    /* YouTube-style Views Counter - Fixed Position (Same as YouTube) */
    .venture-views-counter {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
        font-size: 13px;
        color: #606060;
        margin-top: 8px;
        margin-bottom: 0;
        padding: 0; /* No padding to prevent shift */
        text-align: left;
        line-height: 18px; /* Fixed line height */
        font-weight: 400;
        display: block;
        height: 18px; /* Fixed height to prevent layout shift */
        min-height: 18px; /* Ensure minimum height */
        max-height: 18px; /* Ensure maximum height */
        position: relative; /* Keep position stable */
        width: 100%; /* Full width to prevent shifting */
        overflow: hidden; /* Prevent overflow from causing layout shift */
        flex-shrink: 0; /* Don't shrink in flexbox */
        contain: layout style; /* Isolate layout changes */
    }
    /* Amazon-style Venture Cards */
    .venture-item {
        padding: 0 8px 16px 8px;
        transition: none; /* Remove transition to prevent position changes */
        position: relative; /* Stable positioning */
        will-change: auto; /* Don't optimize for transforms */
    }
    .venture-card {
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        padding: 14px;
        height: 100%;
        min-height: 450px; /* Fixed minimum height to prevent layout shift */
        display: flex;
        flex-direction: column;
        transition: all 0.2s ease;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        contain: layout style; /* Prevent layout shifts from affecting other cards */
    }
    .venture-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
        border-color: #c7c7c7;
    }
    .venture-card-image {
        width: 100%;
        height: 200px;
        min-height: 200px;
        max-height: 200px;
        object-fit: cover;
        object-position: center;
        border-radius: 4px;
        margin-bottom: 12px;
        display: block;
    }
    .venture-card-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        text-align: left;
        min-height: 0; /* Prevent flexbox from causing layout shift */
        position: relative; /* Stable positioning */
    }
    .venture-card-title {
        font-size: 16px;
        font-weight: 500;
        line-height: 1.4;
        color: #0f1111;
        margin: 0 0 8px 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 44px;
    }
    .venture-card-location {
        font-size: 13px;
        color: #565959;
        margin: 0 0 6px 0;
        line-height: 1.3;
    }
    .venture-card-category {
        font-size: 13px;
        color: #565959;
        margin: 0 0 6px 0;
        line-height: 1.3;
    }
    .venture-card-facing {
        font-size: 13px;
        color: #565959;
        margin: 0 0 6px 0;
        line-height: 1.3;
    }
    .venture-card-price {
        font-size: 18px;
        font-weight: 600;
        color: #0f1111;
        margin: 8px 0 6px 0;
        line-height: 1.2;
    }
    .venture-card-area {
        font-size: 13px;
        color: #565959;
        margin: 0 0 8px 0;
        line-height: 1.3;
    }
    .venture-card-approval {
        font-size: 13px;
        margin: 0 0 12px 0;
        line-height: 1.3;
    }
    .venture-card-approval .badge {
        font-size: 12px;
        padding: 4px 8px;
    }
    .venture-item {
        transition: all 0.2s ease;
    }
    .venture-item:hover {
        transform: none;
    }
    #min-price-input, #max-price-input, #min-area-input, #max-area-input {
        width: 40%;
        margin-right: 5px;
    }
    #go-button-price, #go-button-area {
        width: 20%;
    }
    @media (max-width: 768px) {
        .col-md-3 {
            position: static;
            margin-bottom: 20px;
        }
        .filter-container, .mb-3 {
            font-size: 0.9rem;
        }
        .venture-item {
            padding: 0 4px 12px 4px;
        }
        .venture-card {
            padding: 12px;
        }
        .venture-card-image {
            height: 180px;
            min-height: 180px;
            max-height: 180px;
        }
        .venture-card-title {
            font-size: 15px;
            min-height: 42px;
        }
        .venture-card-price {
            font-size: 16px;
        }
        #min-price-input, #max-price-input, #min-area-input, #max-area-input {
            width: 35%;
        }
        #go-button-price, #go-button-area {
            width: 25%;
        }
    }

    /* Mobile Filter Button Styles */
    .mobile-filter-toggle {
        padding: 0.75rem 1rem;
        background: #fff;
        border-bottom: 1px solid #dee2e6;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-bottom: 0;
    }
    .mobile-filter-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.75rem 1rem;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        color: #2e4372;
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    .mobile-filter-btn:hover {
        background: #e9ecef;
        border-color: #2e4372;
    }
    .mobile-filter-btn i {
        font-size: 1.1rem;
    }

    /* Mobile Filters Drawer Styles */
    .mobile-filters-drawer {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2000;
        display: none;
    }
    .mobile-filters-drawer.active {
        display: block;
    }
    .mobile-filters-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
    }
    .mobile-filters-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 380px;
        height: 100%;
        background: #fff;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        display: flex;
        flex-direction: column;
    }
    .mobile-filters-drawer.active .mobile-filters-content {
        transform: translateX(0);
    }
    .mobile-filters-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        background: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    .mobile-filters-back {
        background: none;
        border: none;
        font-size: 1.2rem;
        color: #2e4372;
        cursor: pointer;
        padding: 0.5rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
    }
    .mobile-filters-body {
        padding: 1rem;
        flex: 1;
        overflow-y: auto;
    }
    .mobile-filters-body .filter-container {
        background: #f8f9fa;
        padding: 1rem;
        border-radius: 5px;
        margin-bottom: 1rem;
    }
    #apply-filters-mobile {
        background: #d4af37 !important;
        color: #fff !important;
        border: none !important;
        width: 100% !important;
        padding: 0.75rem !important;
        font-weight: 600 !important;
        font-size: 1.1rem !important;
        cursor: pointer !important;
        display: block !important;
        border-radius: 6px !important;
    }
    #apply-filters-mobile:hover {
        background: #c19a2e !important;
    }
