/* ===== Rentals Page Styles ===== */

/* Rentals Section */
.rentals-section {
    padding: 4rem 0;
    background: var(--color-light);
}

/* Filter Controls - Accordion on Mobile */
.rentals-filters-wrapper {
    margin-bottom: 2rem;
    background: #f8f9fa;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8ede9;
}

.filters-toggle {
    display: none; /* Hidden on desktop */
    width: 100%;
    padding: 0.75rem 2rem;
    background: transparent;
    color: var(--color-primary);
    border: none;
    border-top: 1px solid #e2e8f0;
    border-radius: 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: none;
}

.filters-toggle:hover {
    background: #f1f5f3;
}

.filters-toggle svg {
    flex-shrink: 0;
}

.filters-toggle .chevron {
    transition: transform 0.3s ease;
}

.filters-toggle.active .chevron {
    transform: rotate(180deg);
}

.rentals-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    padding: 0 2rem 1.5rem;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-secondary);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: white;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: var(--color-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(17, 91, 70, 0.1);
}

#clear-filters {
    align-self: flex-end;
    margin-top: auto;
}

/* Results Header with Map View Button */
.rentals-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.rentals-results-info p {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* Map View Button - Flashy and Eye-catching */
.map-view-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.75rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-tertiary) 100%);
    color: white;
    border: none;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(34, 168, 118, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.map-view-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.map-view-btn:hover::before {
    width: 300px;
    height: 300px;
}

.map-view-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(34, 168, 118, 0.5);
}

.map-view-btn:active {
    transform: translateY(0) scale(1.02);
}

.map-view-btn svg {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* City Selector Tabs */
.city-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 1.25rem 2rem 1rem;
    margin-bottom: 0;
}

.city-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: white;
    border: 2px solid #d0d7de;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.city-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.city-tab.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(17, 91, 70, 0.25);
}

.city-tab__count {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    min-width: 1.4rem;
    text-align: center;
}

.city-tab.active .city-tab__count {
    background: rgba(255, 255, 255, 0.25);
}

/* Property Grid */
.rentals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Vacancy Divider */
.rental-vacancy-divider {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 1rem 0;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}

.rental-vacancy-divider__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #333;
    font-size: 1rem;
}

.rental-vacancy-divider__content svg {
    flex-shrink: 0;
    color: #ef4444;
}

.rental-vacancy-divider__text {
    line-height: 1.5;
}

.rental-vacancy-divider__text strong {
    color: #ef4444;
    font-weight: 700;
}

/* Responsive adjustments for divider */
@media (max-width: 768px) {
    .rental-vacancy-divider {
        padding: 1.25rem 1.5rem;
    }

    .rental-vacancy-divider__content {
        font-size: 0.95rem;
        gap: 0.6rem;
    }

    .rental-vacancy-divider__content svg {
        width: 18px;
        height: 18px;
    }
}

/* Rental Card */
.rental-card {
    background: var(--color-light);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: grid;
    grid-template-rows: auto 1fr;
}

.rental-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.10);
}

.rental-card.hidden {
    display: none;
}

.rental-card__image {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #eef5f8;
    overflow: hidden;
}

.rental-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.rental-card:hover .rental-card__image img {
    transform: scale(1.05);
}

.rental-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.rental-badge--available {
    background: #10b981;
    color: white;
}

.rental-badge--unavailable {
    background: #ef4444;
    color: white;
}

.rental-badge--coming-soon {
    background: #f59e0b;
    color: white;
}

.rental-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rental-card__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-secondary);
    line-height: 1.3;
    margin: 0;
}

.rental-card__details {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #52616f;
}

.rental-card__units,
.rental-card__bedrooms {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.rental-card__units svg,
.rental-card__bedrooms svg {
    color: var(--color-primary);
}

.rental-card__location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #52616f;
    font-size: 0.95rem;
    margin: 0;
}

.rental-card__location svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

/* No Results */
.rentals-no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results-content svg {
    color: #cbd5e0;
    margin-bottom: 1.5rem;
}

.no-results-content h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
}

.no-results-content p {
    color: #52616f;
    margin-bottom: 1.5rem;
}

/* Map Modal */
.map-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 2rem);
    z-index: 250;
    background: rgba(10, 48, 74, 0.75);
    backdrop-filter: blur(4px);
}

.map-modal.open {
    display: flex;
}

.map-modal__backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.map-modal__panel {
    position: relative;
    z-index: 1;
    width: min(1400px, 95vw);
    max-height: calc(100vh - 2.5rem);
    background: var(--color-light);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    /* Remove overflow:hidden to allow close button to extend beyond panel */
}

.map-modal__header {
    padding: 2rem;
    background: linear-gradient(135deg, #0a304a 0%, #115b46 100%);
    border-bottom: none;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    overflow: hidden;
}

.map-modal__header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.map-modal__title h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    color: white;
    margin: 0 0 0.5rem 0;
}

.map-modal__title p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.map-modal__city-filters {
    display: flex;
    gap: 0.75rem;
}

.map-modal__city-dropdown {
    display: none; /* Hidden on desktop */
    width: 100%;
}

.map-modal__city-dropdown select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-primary);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23115b46' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.map-modal__city-dropdown select:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.map-city-btn {
    padding: 0.65rem 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.map-city-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.map-city-btn.active {
    background: white;
    color: var(--color-primary);
    border-color: white;
}

.map-modal__content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.rentals-map {
    width: 100%;
    height: 700px;
    background: #e2e8f0;
}

/* Modal Close Button - Red with White X, Straddling Edge */
.modal-close-btn {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #ef4444;
    color: white;
    font-size: 2rem;
    line-height: 1;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    cursor: pointer;
    border: 3px solid white;
    z-index: 15;
    transition: all 0.2s ease;
    font-weight: 300;
}

.modal-close-btn:hover {
    background: #dc2626;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
}

/* Property Modal */
.property-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 2rem);
    z-index: 260;
    background: rgba(10, 48, 74, 0.75);
    backdrop-filter: blur(4px);
}

.property-modal.open {
    display: flex;
}

.property-modal__backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.property-modal__panel {
    position: relative;
    z-index: 1;
    width: min(1600px, 96vw);
    max-height: calc(100vh - 2.5rem);
    background: var(--color-light);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    /* Remove overflow:hidden to allow close button to extend beyond panel */
}

.property-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.95);
    color: var(--color-secondary);
    box-shadow: 0 10px 22px rgba(0,0,0,0.15);
    cursor: pointer;
    border: 1px solid rgba(13, 63, 94, 0.22);
    z-index: 10;
    transition: all 0.2s ease;
}

.property-modal__nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.property-modal__nav--prev {
    left: 12px;
}

.property-modal__nav--next {
    right: 12px;
}

.property-modal__content {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

/* Modal Tabs - Green Color Scheme, Mobile-Friendly */
.modal-tabs {
    display: flex;
    border-bottom: 3px solid #e2e8f0;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 5;
}

.modal-tab {
    flex: 1;
    padding: 1.25rem 1rem;
    background: transparent;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: #52616f;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-tab .tab-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.modal-tab:hover {
    color: var(--color-accent);
    background: rgba(26, 122, 92, 0.05);
}

.modal-tab.active {
    color: white;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-tertiary) 100%);
}

.modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-tertiary);
}

.modal-tab-content {
    display: none;
    padding: 2rem 2rem 0 2rem;
    background: #f5f7fa;
}

    .modal-tab-content.active {
        display: block;
        padding-bottom: 1rem !important;
    }

/* Modal Overview - Reorganized Layout */
.modal-overview__header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.modal-overview__left {
    display: flex;
    flex-direction: column;
}

.modal-overview__hero {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    box-shadow: 0 14px 28px rgba(0,0,0,0.08);
}

.modal-overview__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-overview__right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-overview__right h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    color: var(--color-secondary);
    margin: 0;
    line-height: 1.2;
}

.modal-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #52616f;
    font-size: 1.05rem;
    margin: 0;
}

.modal-location svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.modal-location:hover {
    color: var(--color-primary);
}

/* Desktop address - shown by default, hidden on mobile */
.modal-location--desktop {
    display: flex;
}

/* Mobile address - hidden by default, shown on mobile */
.modal-location--mobile {
    display: none;
}

/* Building Name + Price Ribbon Container */
.modal-header-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Diagonal Price Ribbon Badge */
.price-ribbon {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 2.25rem 0.5rem 2rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d8a6f 100%);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    transform: skewX(-10deg);
    box-shadow: 0 4px 12px rgba(17, 88, 70, 0.4),
                inset 0 -2px 4px rgba(0,0,0,0.2);
    border-radius: 4px;
    margin-left: auto;
    margin-top: 0.25rem;
    overflow: hidden;
}

.price-ribbon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    pointer-events: none;
}

.price-ribbon::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent rgba(0,0,0,0.3) transparent;
    transform: skewX(10deg);
}

.price-ribbon__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.95;
    transform: skewX(10deg);
    font-weight: 600;
}

.price-ribbon__value {
    font-size: 1.3rem;
    line-height: 1;
    transform: skewX(10deg);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.modal-stat {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-stat:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.modal-stat__label {
    display: block;
    font-size: 0.85rem;
    color: #52616f;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-stat__value {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-secondary);
}

/* Larger font size for Units value specifically */
#modal-units {
    font-size: 2rem;
}

/* Larger font size for Bedrooms and Status values */
#modal-bedrooms,
#modal-vacancy {
    font-size: 1.3rem;
}

.modal-stat__value.available {
    color: #10b981;
}

.modal-stat__value.unavailable {
    color: #ef4444;
}

.modal-stat__value.coming-soon {
    color: #f59e0b;
}

.modal-section h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.modal-html-content {
    color: #2c3a49;
    line-height: 1.7;
}

.modal-html-content p {
    margin-bottom: 0.75rem;
}

.modal-html-content ul,
.modal-html-content ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal-html-content li {
    margin-bottom: 0.4rem;
}

/* Amenities Grid */
.modal-amenities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.amenity-card {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.amenity-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.amenity-card h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.amenity-card .modal-html-content {
    font-size: 0.95rem;
}

/* Photos & Location Layout - Photos LEFT, Map RIGHT */
/* Photos Tab Layout */
.photos-tab-layout {
    display: flex;
    flex-direction: column;
}

.photos-tab-layout h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
}

/* Location Tab Layout */
.location-tab-layout {
    display: flex;
    flex-direction: column;
    height: 600px;
}

/*.location-tab-header {
    margin-bottom: 1.5rem;
}*/

.location-tab-layout h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.location-address {
    font-size: 1.05rem;
    color: #52616f;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    justify-content: center;
}

.location-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d8a6f 100%);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(17, 88, 70, 0.25);
    border: 2px solid transparent;
    white-space: nowrap;
}

.location-action-btn:hover {
    background: linear-gradient(135deg, #0d8a6f 0%, var(--color-primary) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 88, 70, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
}

.location-action-btn svg {
    flex-shrink: 0;
}

/* Map View Tabs */
.map-view-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: #f1f5f9;
    border-radius: 10px;
    flex-wrap: wrap;
}

.map-view-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    color: #52616f;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: var(--font-heading);
}

.map-view-tab:hover {
    background: rgba(17, 88, 70, 0.1);
    color: var(--color-primary);
}

.map-view-tab.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d8a6f 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(17, 88, 70, 0.25);
}

.map-view-tab svg {
    flex-shrink: 0;
}

/* Map View Dropdown (Mobile) */
.map-view-dropdown {
    display: none; /* Hidden on desktop */
    margin-bottom: 1rem;
}

.map-view-dropdown select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    color: #52616f;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2352616f' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.map-view-dropdown select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(17, 88, 70, 0.1);
}

/* Mobile Responsive - Tablets and Below */
@media (max-width: 768px) {
    /* Hide tabs, show dropdown on mobile */
    .map-view-tabs {
        display: none;
    }

    .map-view-dropdown {
        display: block;
    }

    /* Make map taller and scrollable on mobile */
    .modal-map-container {
/*        min-height: 500px;*/
          max-height: 70vh;
    }

    .modal-map {
        min-height: 500px;
        height: 70vh;
    }

    /* Adjust map overlay button for mobile */
    .map-overlay-btn {
        bottom: 10px;
        left: 10px;
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
        gap: 0.3rem;
    }

    .map-overlay-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Location tab layout adjustments */
    .location-tab-layout {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow-y: auto;
    }
}

/* Modal Map - Full Tab Height */
.modal-map-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(0,0,0,0.08);
    flex: 1;
}

.modal-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
    background: #e2e8f0;
    display: none;
}

.modal-map.active {
    display: block;
}

/* Map Overlay Button - Lower Left Corner */
.map-overlay-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-primary);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(17, 88, 70, 0.2);
    white-space: nowrap;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.map-overlay-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 88, 70, 0.3);
    border-color: var(--color-primary);
}

.map-overlay-btn svg {
    flex-shrink: 0;
}

/* Modal Gallery */
.modal-carousel {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #eef5f8;
    aspect-ratio: 16 / 9;
    cursor: pointer;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gallery Navigation Buttons - Green Color Scheme */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-tertiary) 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(34, 168, 118, 0.6), 0 0 0 4px rgba(255, 255, 255, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    border: 4px solid white;
    z-index: 5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.gallery-nav::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(26, 122, 92, 0.2) 0%, rgba(34, 168, 118, 0.2) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-nav:hover::before {
    opacity: 1;
}

.gallery-nav:hover {
    background: linear-gradient(135deg, var(--color-tertiary) 0%, var(--color-accent) 100%);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 14px 40px rgba(34, 168, 118, 0.7), 0 0 0 5px rgba(255, 255, 255, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.gallery-nav svg {
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
}

.gallery-nav--prev {
    left: 20px;
}

.gallery-nav--next {
    right: 20px;
}

/* Gallery Close Button - Red, Positioned on Photo Corner */
.gallery-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #ef4444;
    color: white;
    font-size: 2rem;
    line-height: 1;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    cursor: pointer;
    border: 3px solid white;
    z-index: 10;
    transition: all 0.2s ease;
    font-weight: 300;
}

.gallery-close-btn:hover {
    background: #dc2626;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50px;
    backdrop-filter: blur(8px);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.carousel-dot {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
    background: var(--color-primary);
    width: 42px;
    border-color: white;
    box-shadow: 0 4px 12px rgba(17, 88, 70, 0.6);
    transform: scale(1.1);
}

/* Street View Container */
.street-view-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #eef5f8;
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
}

.street-view-panorama {
    width: 100%;
    height: 100%;
}

/* Contact Tab Centering */
.contact-tab-center {
    max-width: 700px;
    margin: 0 auto;
}

.contact-tab-center h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
    text-align: center;
}

.form-intro {
    color: #52616f;
    margin-bottom: 2rem;
    line-height: 1.6;
    text-align: center;
}

/* Rental Forms */
.rental-form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-secondary);
}

.form-group input,
.form-group textarea {
    padding: 0.85rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(17, 91, 70, 0.1);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.consent-label {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.rental-form button[type="submit"] {
    width: 100%;
    margin-top: 1rem;
}

/* Modal Body Scroll Lock */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* Directions control panel - minimized text visibility */
#directions-control-panel .minimized-text,
#directions-http-control .minimized-text {
    display: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
    white-space: nowrap;
}

#directions-control-panel.minimized .minimized-text,
#directions-http-control.minimized .minimized-text {
    display: block;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Mobile Filter Accordion */
    .filters-toggle {
        display: flex;
    }

    .rentals-filters {
        display: none;
        animation: slideDown 0.3s ease;
    }

    .rentals-filters.open {
        display: grid;
        grid-template-columns: 1fr;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Toggle address visibility on mobile */
    .modal-location--desktop {
        display: none !important;
    }

    .modal-location--mobile {
        display: flex !important;
        margin-bottom: 1rem;
    }

    /* Mobile-Friendly Tabs - Icons Only */
    .modal-tabs {
        flex-wrap: nowrap;
        overflow-x: hidden;
        overflow-y: hidden;
        justify-content: space-around;
    }

    .modal-tab {
        flex: 1;
        min-width: 0;
        padding: 1rem 0.5rem;
        font-size: 0.75rem;
    }

    .modal-tab .tab-icon {
        width: 22px;
        height: 22px;
    }

    .modal-tab .tab-text {
        display: none; /* Hide text on mobile, show only icons */
    }

    .modal-overview__right {
        gap: 0.2rem;
    }

    .modal-header-wrapper {
        margin-bottom:0.2rem;
    }

    .modal-stats {
        display: flex;
        flex-direction: column;
        gap: 0;
        background: white;
        border-radius: 12px;
        border: 2px solid #e2e8f0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        overflow: hidden;
        margin-bottom: 1rem;
    }

    .modal-stat {
        padding: 1rem 1.25rem;
        background: white;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: none;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    .modal-stat:last-child {
        border-bottom: none;
    }

    .modal-stat:hover {
        background: #f8fafc;
        border-color: #e2e8f0;
        box-shadow: none;
    }

    .modal-stat__label {
        font-size: 0.9rem;
        margin-bottom: 0;
        flex: 1;
    }

    .modal-stat__value {
        font-size: 1.1rem !important;
        flex: 0 0 auto;
    }

    /* Override specific font sizes for mobile */
    #modal-units {
        font-size: 1.5rem !important;
    }

    #modal-bedrooms,
    #modal-vacancy {
        font-size: 1.1rem !important;
    }

    .modal-map {
        min-height: 300px;
    }

    /* Map modal city filters on mobile */
    .map-modal__header-content {
        flex-direction: column;
        gap: 1rem;
    }

    /* Hide buttons, show dropdown on mobile */
    .map-modal__city-filters {
        display: none;
    }

    .map-modal__city-dropdown {
        display: block;
    }

    .property-modal__nav {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-tab-content {
        padding: 1.5rem;
    }

    /* Fix photo carousel scaling on mobile */
    .modal-carousel {
        aspect-ratio: auto;
        min-height: 250px;
    }

    .carousel-slide img {
        object-fit: contain;
        object-position: center;
    }

    .carousel-track {
        align-items: center;
    }

    /* Smaller carousel navigation arrows on mobile */
    .gallery-nav {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        border: 3px solid white;
        box-shadow: 0 6px 20px rgba(34, 168, 118, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    }

    .gallery-nav svg {
        width: 24px;
        height: 24px;
    }

    .gallery-nav--prev {
        left: 10px;
    }

    .gallery-nav--next {
        right: 10px;
    }

    .gallery-nav:hover {
        transform: translateY(-50%) scale(1.1);
    }

    /* Smaller carousel dots on mobile */
    .carousel-dots {
        gap: 0.5rem;
        padding: 0.6rem;
        margin-top: 1rem;
    }

    .carousel-dot {
        width: 12px;
        height: 12px;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

    .carousel-dot.active {
        width: 28px;
    }

    /* Directions control panel - centered on mobile */
    #directions-control-panel {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 66.666% !important;
        max-width: none !important;
        margin: 0 !important;
        z-index: 100 !important;
        transition: all 0.3s ease !important;
    }

    #directions-control-panel.minimized {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        width: auto !important;
        max-width: 200px !important;
        padding: 8px 12px !important;
        cursor: pointer !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }

    #directions-control-panel.minimized > *:not(.minimized-text) {
        display: none !important;
    }

    #directions-control-panel.minimized:hover {
        background: #f1f5f9 !important;
    }

    /* HTTP Directions control - centered on mobile */
    #directions-http-control {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 66.666% !important;
        max-width: none !important;
        margin: 0 !important;
        z-index: 100 !important;
        transition: all 0.3s ease !important;
    }

    #directions-http-control.minimized {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        width: auto !important;
        max-width: 180px !important;
        padding: 8px 12px !important;
        cursor: pointer !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }

    #directions-http-control.minimized > *:not(.minimized-text) {
        display: none !important;
    }

    #directions-http-control.minimized:hover {
        background: #f1f5f9 !important;
    }

    /* Reopen button on mobile */
    #directions-reopen-btn {
        right: 10px !important;
        font-size: 0.75rem !important;
        padding: 6px 10px !important;
    }

    /* Transit legend - smaller on mobile */
    #transit-legend {
        max-width: calc(100% - 20px) !important;
        font-size: 0.85rem !important;
        padding: 10px 12px !important;
        margin: 8px !important;
    }

    #transit-legend p {
        font-size: 0.8rem !important;
    }

    #transit-legend strong {
        font-size: 0.8rem !important;
    }

    #transit-legend span {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 950px) {
    /* Stack modal overview earlier to prevent awkward spacing at intermediate widths */
    .modal-overview__header {
        grid-template-columns: 1fr;
    }

    .modal-amenities-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .rentals-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .rentals-section {
        padding: 2rem 0;
    }

    .rentals-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile stats layout already handled in 768px breakpoint */

    /* Adjust price ribbon for mobile */
    .modal-header-wrapper {
/*        flex-direction: column; */
          gap: 0.75rem;
          margin-bottom: 0;
    }

    .modal-overview__right {
        gap: 0.2rem;
    }

    .price-ribbon {
        margin-left: 0;
        align-self: flex-start;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .rentals-results-header {
        flex-direction: column;
        align-items: stretch;
    }

    .map-view-btn {
        width: 100%;
        justify-content: center;
    }

    .city-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 1rem 1.25rem;
    }

    .city-tab {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* ===== Building and city pages (/for-rent/...) ===== */
.rental-card__title a,
.rental-card__link {
    color: inherit;
    text-decoration: none;
}

.building-page {
    padding: 2rem 0 3rem;
}

.building-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.building-breadcrumb a {
    color: var(--color-primary);
}

.building-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2rem;
    align-items: start;
}

.building-page__location {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.building-page__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.building-page__section {
    margin-bottom: 2rem;
}

.building-page__section h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.building-suite {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.building-suite__photos,
.building-page__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.building-suite__photos img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
}

.building-page__photos img {
    width: calc(33.333% - 0.35rem);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
}

.building-page__map {
    width: 100%;
    height: 360px;
    border: 0;
    border-radius: 8px;
}

.building-page__aside {
    position: sticky;
    top: 1rem;
}

.building-page__card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
}

.building-page__card h2 {
    font-size: 1.2rem;
    margin: 0;
}

.building-page__intro {
    max-width: 800px;
    margin-bottom: 1.5rem;
}

@media (max-width: 800px) {
    .building-page__layout {
        grid-template-columns: 1fr;
    }

    .building-page__photos img {
        width: calc(50% - 0.25rem);
    }
}
