/* PUBLIC PROPERTIES CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.debug-info {
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    color: #c62828;
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

select, input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.property-card {
    opacity: 1 !important;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

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

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

.property-type {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

.property-type.for-rent {
    background: #e74c3c;
}

.property-details {
    padding: 20px;
}

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.property-address {
    color: #7f8c8d;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-features {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature i {
    font-size: 1.2rem;
    color: #3498db;
    margin-bottom: 5px;
}

.feature span {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.page-btn {
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.page-btn:hover {
    background: #3498db;
    color: white;
}

.page-btn.active {
    background: #2c3e50;
    color: white;
}

.load-more-container {
    display: flex;
    justify-content: center;
    margin: 30px 0 40px;
}

.load-more {
    background: #2c3e50;
    color: white;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 12px 30px;
    border-radius: 50px;
    transition: background 0.3s ease;
    text-align: center;
    text-decoration: none;
    width: fit-content;
}

.load-more:hover {
    background: #2980b9;
    color: white;
}

.load-more:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading-spinner i {
    font-size: 2rem;
    color: #3498db;
}

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

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #2c3e50;
    color: white;
    flex-shrink: 0;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.gallery-main {
    width: 100%;
    height: 400px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.gallery-thumbs {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 0;
    scrollbar-width: none; /* For Firefox */
    -ms-overflow-style: none; /* For Internet Explorer and Edge */
}

.gallery-thumbs::-webkit-scrollbar {
    display: none; /* For Chrome, Safari, and Opera */
}

.gallery-thumbs img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
    flex-shrink: 0; /* Prevent images from shrinking */
}

.gallery-thumbs img:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Add smooth scrolling for better UX */
.gallery-thumbs {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}


.property-details-modal {
    flex: 1;
    overflow-y: auto;
}

.property-details-modal h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.property-details-modal p {
    margin-bottom: 15px;
    color: #555;
}

/* Properties Video Links */
.video-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.video-section h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    text-align: center;
}

.video-links-container {
    display: flex;
    gap: 12px;
    margin-top: 5px;
    justify-content: center;
}

.video-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
}

.video-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-link i {
    font-size: 1.4rem;
}

/* Video Link colors */
.video-facebook {
    background: #1877F2;
    color: white;
}

.video-facebook:hover {
    background: #166FE5;
    color: white;
}

.video-tiktok {
    background: #000000;
    color: white;
}

.video-tiktok:hover {
    background: #333333;
    color: white;
}

.video-instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
}

.video-instagram:hover {
    background: linear-gradient(45deg, #2F4ACD, #4740C2, #7329A3, #B12473, #D0175B, #FC0C0C);
    color: white;
}

/* Text labels visible on desktop/tablet */
.video-label {
    display: inline;
}


    /* Responsive Styles */
    @media (max-width: 992px) {
        .properties-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 768px) {
        .properties-grid {
            grid-template-columns: 1fr;
        }
        
        .filters {
            flex-direction: column;
        }
        
        .filter-group {
            min-width: 100%;
        }
        
        .modal-content {
            max-width: 98%;
            max-height: 92vh;
            height: 95vh;
        }
        
        .gallery-main {
            height: 300px !important;
            max-height: 40vh;
        }
        
        .gallery-main img {
            object-fit: contain !important;
            background: #f5f5f5;
        }
        
        .gallery-thumbs {
            gap: 8px;
            padding: 8px 0;
        }
        
        .gallery-thumbs img {
            width: 100px;
            height: 70px;
        }
        
        .modal-body {
            padding: 15px;
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        
        .property-details-modal {
            max-height: 40vh;
            overflow-y: auto;
            margin-top: 15px;
        }

   /* Mobile Properties Video Links */
        .video-section h4 {
           font-size: 1.15rem;
           margin-bottom: 16px;
           text-align: center;
       }

       .video-links-container {
           justify-content: center;
           gap: 28px;
       }

       .video-link {
           padding: 10px;
           min-width: 48px;
           justify-content: center;
       }

       .video-label {
           display: none;
       }

       .video-link i {
           font-size: 2rem;
       }

       .video-links-container {
           justify-content: center;
           gap: 24px;
       }
    }

        @media (max-width: 480px) {
        .properties-subtitle {
            font-size: 0.8rem;
            margin-bottom: 15px;
        }

        .filter-group {
            margin-bottom: 0;
            padding-bottom: 0;
        }

        label {
            font-size: 0.9rem;
        }

        select, input {
            font-size: 0.8rem;
        }

        .modal-content {
            max-width: 98%;
            max-height: 98vh;
            height: 98vh;
        }
        
        .gallery-main {
            height: 250px !important;
            max-height: 35vh;
        }
        
            .gallery-thumbs {
            gap: 6px;
        }
        
        .gallery-thumbs img {
            width: 90px;
            height: 60px;
        }
        
        .modal-header {
            padding: 10px 15px;
        }
        
        .modal-header h2 {
            font-size: 1.2rem;
        }
        
        .property-details-modal h3 {
            font-size: 1.1rem;
        }
        
        .property-details-modal p {
            font-size: 0.9rem;
            margin-bottom: 10px;
        }
    }
