/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #262626;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

.container {
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 130px; /* Add padding to prevent content from being hidden behind fixed footer */
}

.page-header {
    padding-top: 48px;
    padding-bottom: 48px;
}

.search-summary {
    font-size: 14px;
    color: #262626;
    line-height: 1.5;
}

/* Footer Styles */
.search-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    z-index: 100;
    padding: 24px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.results-count {
    font-size: 14px; /* Slightly smaller on mobile if needed, but 16px base is fine */
    color: #000;
}

.instruction-text {
    font-size: 12px;
    color: #666;
    text-align: left;
}

.footer-actions {
    display: flex;
    width: 100%;
}

.btn.full-width {
    width: 100%;
}

.btn {
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    width: 100%;
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

.btn-whatsapp {
    background-color: #0D8F6E;
    color: white;
    max-width: 480px;
    margin: 0 auto;
}

.btn-whatsapp:hover {
    background-color: #20A483;
}

.btn i {
    font-size: 20px;
}

/* Dropdown Styles */
.dropdown-container {
    position: relative;
    width: 100%;
}

.dropdown-toggle {
    position: relative;
}

.dropdown-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 12px;
}

.dropdown-container.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    overflow: hidden;
    min-width: 200px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.dropdown-item:hover {
    background-color: #f5f5f5;
}

/* Property Card Styles */
.property-card {
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 24px;
    margin-bottom: 32px;
}

.property-card:last-child {
    border-bottom: none;
}

.property-image {
    width: 100%;
    aspect-ratio: 16 / 9; /* Maintain ratio */
    height: auto;
    background-color: #666; 
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.property-image::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.3) 100%);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    z-index: 1;
}

.placeholder-content i {
    font-size: 36px; /* Smaller icon on mobile */
    margin-bottom: 8px;
    border: 2px solid white;
    padding: 8px;
    border-radius: 4px;
}

.placeholder-content span {
    font-size: 12px;
    font-weight: 500;
}

.property-content {
    display: flex;
    flex-direction: column;
}

.property-type-label {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #262626;
    display: block;
}

.property-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.price-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.property-price {
    font-size: 20px;
    font-weight: 700;
    color: #262626;
}

.transaction-type {
    font-size: 12px;
    color: #262626;
}

.btn-favorite {
    background: none;
    border: 1px solid #262626;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #262626;
    padding: 8px 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-favorite i {
    font-size: 16px;
}

.btn-favorite.active {
    color: #e74c3c; /* Red color when active */
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.05);
}

.btn-favorite.active i {
    color: #e74c3c;
}

.btn-favorite span {
    font-weight: 500;
}

.property-address {
    font-size: 14px;
    color: #262626;
    margin-bottom: 16px;
    line-height: 1.4;
}

.property-features {
    font-size: 14px;
    color: #262626;
    margin-bottom: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.5;
}

.separator {
    font-weight: bold;
    margin: 0 2px;
}

.property-details {
    margin-top: 12px;
}

.details-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #262626;
}

.details-text {
    font-size: 14px;
    color: #262626;
    margin-bottom: 8px;
    text-align: left;
    line-height: 1.5;
}

.details-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.details-toggle {
    font-size: 12px;
    color: #262626;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    display: inline-block;
    padding: 4px 0;
    text-align: center;
    width: 100%;
}

/* Desktop Enhancements (min-width: 768px) */
@media (min-width: 768px) {
    .container {
        max-width: 800px;
        margin: 0 auto;
        padding-left: 24px;
        padding-right: 24px;
    }

    .search-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        /* margin-bottom: 30px; - removed as footer is fixed bottom */
    }

    .footer-actions {
        display: flex; /* Back to flex for desktop buttons */
        width: auto;
        gap: 10px;
    }

    .btn {
        width: auto; /* Auto width on desktop */
        padding: 10px 15px;
    }

    .results-count {
        font-size: 16px;
    }

    .property-image {
        height: 250px; /* Fixed height on desktop */
        aspect-ratio: auto;
    }

    .placeholder-content i {
        font-size: 48px;
    }

    .placeholder-content span {
        font-size: 14px;
    }

    .property-features {
        font-size: 16px;
        gap: 8px;
    }
    
    .details-text {
        font-size: 16px;
        text-align: justify;
    }
}

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

.image-modal.active {
    display: flex;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: default;
}

.property-image.clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.property-image.clickable:hover {
    opacity: 0.9;
}

/* Carousel Navigation Styles */
.property-image-container {
    position: relative;
    width: 100%;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.2s ease;
    opacity: 0.8;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-nav:hover {
    opacity: 1;
}

.carousel-nav-prev {
    left: 12px;
}

.carousel-nav-next {
    right: 12px;
}

/* Modal Navigation Styles */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: opacity 0.2s ease;
    opacity: 0.8;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.modal-nav:hover {
    opacity: 1;
}

.modal-nav-prev {
    left: 20px;
}

.modal-nav-next {
    right: 20px;
}

@media (min-width: 768px) {
    .modal-close {
        top: 30px;
        right: 30px;
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .modal-nav {
        width: 60px;
        height: 60px;
        font-size: 40px;
    }

    .modal-nav-prev {
        left: 30px;
    }

    .modal-nav-next {
        right: 30px;
    }

    .carousel-nav {
        width: 45px;
        height: 45px;
        font-size: 28px;
    }

    .carousel-nav-prev {
        left: 16px;
    }

    .carousel-nav-next {
        right: 16px;
    }
}
