/* --- FIXED LISTINGS PAGE STYLES --- */

/* Main Listings Layout */
.listings-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Properties Grid Section */
.properties-grid {
    flex: 1;
    min-width: 0;
}

/* Grid Header / Controls */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.results-info {
    font-size: 1.1rem;
    color: #2c3e50;
}

.results-info strong {
    font-weight: 700;
    color: #007bff;
}

.grid-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Sort Dropdown */
.sort-dropdown select {
    padding: 10px 35px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 5px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 8px;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: white;
    color: #007bff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Properties Cards Grid */
.properties-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

/* Limit to 4 rows (12 cards max) */
.properties-cards .property-card:nth-child(n+13) {
    display: none;
}

/* Property Card Base */
.property-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Property Image */
.property-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f0f0f0;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

/* Property Details */
.property-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.property-details .btn {
    margin-top: auto;
}

/* Property Meta */
.property-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.property-type {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-price {
    font-size: 1.1rem;
    color: #000000;
    font-weight: 700;
}

/* Property Title */
.property-title {
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 700;
    margin: 5px 0;
    line-height: 1.3;
}

/* Property Location */
.property-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.95rem;
}

.property-location i {
    color: #007bff;
}

/* Property Specs List Styles - FIXED */
.property-specs {
    list-style: none;
    padding: 15px 0;
    margin: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.property-spec {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #555;
    padding: 4px 0;
}

.property-spec i {
    color: #007bff;
    font-size: 1rem;
    min-width: 20px;
}

/* Property Stats - Hidden as requested */
.property-stats {
    display: none;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #000000; /* Black text for pagination counter */
}

.pagination-btn:hover:not(:disabled) {
    background: #000000;
    color: white;
    border-color: #000000;
}

.pagination-btn.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- New Testimonials Section Styles --- */

.testimonials {
    background-color: var(--color-white);
    padding: var(--spacing-4xl) 0;
    position: relative;
    overflow: hidden;
}

.testimonials .section-title {
    color: var(--color-black);
    font-size: var(--text-4xl);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    letter-spacing: -0.02em;
}

.testimonial-carousel-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 0 var(--spacing-xl);
}

.testimonial-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.testimonial-slide.active {
    display: block;
    opacity: 1;
    animation: slideUpFade 0.6s ease-out forwards;
}

 @keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-card-new {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-xl);
    padding: var(--spacing-3xl);
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    position: relative;
}

.testimonial-card-new::before {
    content: '"';
    font-family: serif;
    font-size: 120px;
    line-height: 1;
    color: var(--color-gray-100);
    position: absolute;
    top: -20px;
    left: 40px;
    z-index: 0;
    opacity: 0.5;
}

.testimonial-text-new {
    font-size: var(--text-xl);
    line-height: 1.6;
    color: var(--color-gray-700);
    margin-bottom: var(--spacing-xl);
    position: relative;
    z-index: 1;
    font-style: italic;
    font-weight: 300;
}

.testimonial-author-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    position: relative;
    z-index: 1;
}

.author-name-new {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-black);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.author-location-new {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
    font-weight: 500;
}

.rating-new {
    margin-top: var(--spacing-sm);
    color: var(--color-black);
    font-size: var(--text-sm);
    display: flex;
    gap: 4px;
}

/* Navigation Buttons */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    color: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    z-index: 2;
}

.carousel-nav-btn:hover {
    background-color: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.carousel-prev {
    left: -80px;
}

.carousel-next {
    right: -80px;
}

/* Redesigned Filters Sidebar */
.filters-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    height: fit-content;
    min-width: 280px;
    max-width: 320px;
    overflow-x: hidden;
}

 @media (min-width: 993px) {
    .filters-sidebar {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Custom Scrollbar for Sidebar */
    .filters-sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .filters-sidebar::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .filters-sidebar::-webkit-scrollbar-thumb {
        background: #333;
        border-radius: 10px;
    }

    .filters-sidebar::-webkit-scrollbar-thumb:hover {
        background: #000;
    }
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.filters-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #2c3e50;
    font-weight: 600;
}

.reset-filters {
    background: #000000;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-filters:hover {
    background: #333333;
    transform: scale(1.05);
}

.filter-group {
    margin-bottom: 25px;
}

.filter-title {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.filter-option:hover {
    background: #e9ecef;
}

.filter-option input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-option span:first-of-type {
    flex: 1;
    font-size: 0.95rem;
    color: #34495e;
}

.filter-count {
    background: #000000;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-option input:checked ~ span {
    color: #000000;
    font-weight: 600;
}

.price-range-filter,
.area-range-filter {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.range-slider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.range-slider input[type="range"] {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 5px;
    border-radius: 5px;
    outline: none;
    background: #e0e0e0;
    -webkit-appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #000000;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #000000;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 500;
}

.additional-filters {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
}

.additional-filters.active {
    display: block;
}

.filter-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-col {
    flex: 1;
}

.filter-col label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #2c3e50;
}

.filter-col select,
.filter-col input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.3s ease;
}

.filter-col select:focus,
.filter-col input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#more-filters-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

#more-filters-toggle:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

#more-filters-toggle i {
    transition: transform 0.3s ease;
}

#more-filters-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Interactive Elements Styles */
.interactive-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-image:hover .interactive-overlay {
    opacity: 1;
}

.interactive-overlay button {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.interactive-overlay button:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Social Proof Styles */
.social-proof {
    background: #000000;
    padding: 80px 0;
    margin: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #ffffff;
    font-weight: 800;
}

.trust-indicators {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.trust-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.counter {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    display: block;
}

.label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Custom Requirement CTA */
.custom-requirement {
    background: #f8f9fa;
    padding: 60px 20px;
    text-align: center;
}

.custom-requirement h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.custom-requirement p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
}

.close-modal:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.tour-placeholder, 
.video-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tour-placeholder p, 
.video-placeholder p {
    margin: 10px 0;
    font-size: 1.1rem;
    color: #555;
}

/* Advanced Search Styles */
.advanced-search {
    width: 100%;
    max-width: 900px;
    margin: 20px auto 0;
    position: relative;
}

.search-container {
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.search-inputs {
    display: flex;
    flex: 1;
    gap: 0;
}

.search-field {
    position: relative;
    flex: 1;
}

.search-field i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 2;
}

.search-field input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: none;
    outline: none;
    font-size: 1rem;
    position: relative;
    z-index: 1;
    background-color: transparent;
}

.search-field:not(:first-child) input {
    border-left: 1px solid #eee;
}

.search-field:first-child input {
    border-radius: 50px 0 0 50px;
}

.search-field:last-child input {
    border-radius: 0 50px 50px 0;
}

#advancedSearchBtn {
    background: #000000;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0 25px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

#advancedSearchBtn:hover {
    background: #333333;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 5px;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

/* Listings Header */
.listings-header {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.listings-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.listings-header-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    padding: 0 20px;
    width: 100%;
}

.listings-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 800;
}

.listings-header p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Responsive Styles */
 @media (max-width: 1024px) {
    .listings-layout {
        flex-direction: column;
    }

    .filters-sidebar {
        width: 100%;
        max-width: 100%;
        position: static;
        max-height: none;
    }

    .properties-cards {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .carousel-prev {
        left: 0;
    }

    .carousel-next {
        right: 0;
    }

    .testimonial-carousel-container {
        padding: 0 60px;
    }
}

 @media (max-width: 768px) {
    .properties-cards {
        grid-template-columns: 1fr;
    }

    .grid-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .grid-controls {
        flex-direction: column;
        gap: 10px;
    }

    .sort-dropdown select,
    .view-toggle {
        width: 100%;
    }

    .search-container {
        flex-direction: column;
        border-radius: 15px;
        padding: 10px;
    }

    .search-inputs {
        flex-direction: column;
    }

    .search-field input {
        border-radius: 10px !important;
        border-left: none !important;
    }

    .search-field:not(:first-child) input {
        border-top: 1px solid #eee;
    }

    #advancedSearchBtn {
        justify-content: center;
        padding: 15px;
        border-radius: 10px;
    }

    .listings-header h1 {
        font-size: 2rem;
    }

    .listings-header p {
        font-size: 1.1rem;
    }

    .carousel-nav-btn {
        display: none;
    }

    .testimonial-carousel-container {
        padding: 0;
    }

    .testimonial-card-new {
        padding: var(--spacing-xl);
    }

    .filter-row {
        flex-direction: column;
    }

    .trust-indicators {
        flex-direction: column;
        gap: 40px;
    }
}

 @media (max-width: 480px) {
    .property-title {
        font-size: 1.1rem;
    }

    .property-stats {
        gap: 10px;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .listings-header {
        height: 300px;
    }

    .counter {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

 @keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    border-radius: 8px;
    overflow: hidden;
}

.skeleton-image {
    height: 250px;
}

.skeleton-title {
    height: 20px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-text {
    height: 15px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-button {
    height: 40px;
    margin-top: 15px;
    border-radius: 4px;
}

/* Animation for Filter Count Updates */
.filter-count.updated {
    animation: pulse 0.5s ease;
}

 @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Mobile Filter Button */
.mobile-filter-btn {
    display: none;
}

 @media (max-width: 1024px) {
    .mobile-filter-btn {
        display: flex;
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: #007bff;
        color: white;
        border: none;
        padding: 15px 25px;
        border-radius: 50px;
        font-weight: bold;
        box-shadow: 0 4px 12px rgba(0,123,255,0.4);
        z-index: 1000;
        align-items: center;
        gap: 8px;
        cursor: pointer;
    }

    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .filter-overlay[aria-hidden="false"] {
        display: block;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .filters-sidebar.active {
        left: 0;
    }
}