/* UMH Home Listings Grid Styles - Based on Mockup */

:root {
    --umh-primary: #f89c5f;
    --umh-secondary: #5981a7;
    --umh-primary-hover: #e88a4a;
    --umh-secondary-hover: #016a77;
    --umh-bg-card: #eceee9;
    --umh-bg-white: #ffffff;
    --umh-bg-muted: #e8e8d0;
    --umh-bg-section: #d7e6e8;
    --umh-bg-border: #e0e0d0;
    --umh-text-color: #35424b;
    --umh-text-dark: #333;
    --umh-text-medium: #666;
    --umh-button-muted: #6c757d;
    --umh-button-muted-hover: #5a6268;
    --umh-button-dark: #273742;
    --umh-button-dark-hover: #1a2a35;
    --umh-border-color: #dddddd;
    --umh-divider: #8ba3a6;
    --umh-box-shadow: rgba(0, 0, 0, 0.15);
    --umh-box-shadow-hover: rgba(0, 0, 0, 0.2);
}

/* Site Editor exceptions start */
.wp-site-blocks .umh-home-listings-container {
    p, br {
        display: none;
    }
}
.wp-site-blocks .umh-home-listings-container .umh-filters-header {
    p {
        display: block !important;
    }
}
/* Site Editor exceptions end */

.umh-home-listings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--umh-bg-color);
}

/* Grid Layout */
.umh-homes-grid {
    display: grid;
    gap: 25px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Column configurations */
.umh-grid-1-columns {
    grid-template-columns: 1fr;
}

.umh-grid-2-columns {
    grid-template-columns: repeat(2, 1fr);
}

.umh-grid-3-columns {
    grid-template-columns: repeat(3, 1fr);
}

.umh-grid-4-columns {
    grid-template-columns: repeat(4, 1fr);
}

/* Home Card - Based on mockup styling */
.umh-home-card {
    background: var(--umh-bg-card);
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--umh-box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.umh-home-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--umh-box-shadow-hover);
}

/* Home Image */
.umh-home-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

.umh-home-card:hover .umh-home-image img {
    transform: scale(1.02);
}

.umh-no-image {
    width: 100%;
    height: 100%;
    background: var(--umh-bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--umh-text-medium);
}

/* Badges */
.umh-featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--umh-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.umh-price-badge {
    display: none; /* Hidden for cleaner design like mockup */
}

/* Home Content - Restructured to match mockup */
.umh-home-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Property Details Section - Icons and stats */
.umh-home-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--umh-bg-border);
}

.umh-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--umh-text-color);
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
}

.umh-stat svg {
    color: white;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    background: var(--umh-button-dark);
    border-radius: 50%;
    padding: 6px;
    width: 24px;
    height: 24px;
}

/* Address and Model Section */
.umh-home-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
    color: var(--umh-text-color);
}

.umh-home-title a {
    color: var(--umh-text-color);
    text-decoration: none;
}

.umh-home-title a:hover {
    color: var(--umh-primary-hover);
}

.umh-community-name {
    margin: 0 0 15px 0;
    color: var(--umh-text-color);
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
}

/* Price and Lease Section */
.umh-price-section {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Align buttons to the right */
    gap: 15px;
    flex-wrap: wrap;
}

.umh-price-main {
    font-size: 24px;
    font-weight: bold;
    color: var(--umh-text-color);
    margin-bottom: 5px;
}

.umh-lease-option {
    font-size: 14px;
    color: var(--umh-text-color);
    font-weight: 400;
}

/* Home Actions - Buttons positioned like mockup */
.umh-home-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.umh-view-details-btn {
    background: var(--umh-secondary);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.umh-view-details-btn:hover {
    background: var(--umh-secondary-hover);
    color: white;
}

.umh-call-btn {
    background: var(--umh-primary); /* Updated Apply Now button background */
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.umh-call-btn:hover {
    background: var(--umh-primary-hover);
    color: white;
}

.umh-call-btn svg {
    width: 14px;
    height: 14px;
}

/* Apply Now button styling */
.umh-apply-now-btn {
    background: var(--umh-primary) !important;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.umh-apply-now-btn:hover {
    background: var(--umh-primary-hover) !important;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--umh-box-shadow-hover);
}

/* No Homes Found */
.umh-no-homes-found {
    text-align: center;
    padding: 40px 20px;
    color: var(--umh-text-medium);
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .umh-grid-4-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .umh-home-listings-container {
        padding: 15px;
    }
    
    .umh-homes-grid {
        gap: 20px;
    }
    
    /* Stack all grids to single column on mobile */
    .umh-grid-2-columns,
    .umh-grid-3-columns,
    .umh-grid-4-columns {
        grid-template-columns: 1fr;
    }
    
    .umh-home-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: flex-start;
    }
    
    .umh-stat {
        font-size: 13px;
        min-width: 0;
        flex-shrink: 1;
    }
    
    .umh-home-actions {
        flex-direction: column;
    }
    
    .umh-call-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .umh-grid-2-columns,
    .umh-grid-3-columns,
    .umh-grid-4-columns {
        grid-template-columns: 1fr;
    }
    
    .umh-home-image {
        height: 180px;
    }
    
    .umh-home-content {
        padding: 15px;
    }
    
    .umh-home-title {
        font-size: 16px;
    }
}

/* Loading State */
.umh-homes-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation for cards appearing */
.umh-home-card {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Stagger animation for multiple cards */
.umh-home-card:nth-child(1) { animation-delay: 0.1s; }
.umh-home-card:nth-child(2) { animation-delay: 0.2s; }
.umh-home-card:nth-child(3) { animation-delay: 0.3s; }
.umh-home-card:nth-child(4) { animation-delay: 0.4s; }
.umh-home-card:nth-child(5) { animation-delay: 0.5s; }
.umh-home-card:nth-child(6) { animation-delay: 0.6s; }

/* Filter Styles */
.umh-filters-section {
    background: var(--umh-bg-card);
    border: 1px solid var(--umh-border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.umh-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--umh-border-color);
}

.umh-filters-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--umh-text-color);
}

.umh-clear-filters-btn {
    background: var(--umh-button-muted);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.umh-clear-filters-btn:hover {
    background: var(--umh-button-muted-hover);
}

.umh-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.umh-filter-group {
    display: flex;
    flex-direction: column;
}

.umh-filter-label {
    font-weight: 600;
    color: var(--umh-text-color);
    margin-bottom: 10px;
    font-size: 14px;
}

.umh-radio-group,
.umh-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.umh-radio-option,
.umh-checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--umh-text-color);
}

.umh-radio-option input[type="radio"],
.umh-checkbox-option input[type="checkbox"] {
    display: none;
}

.umh-radio-custom,
.umh-checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--umh-border-color);
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.umh-checkbox-custom {
    border-radius: 3px;
}

.umh-radio-option input[type="radio"]:checked + .umh-radio-custom {
    border-color: var(--umh-primary);
    background: var(--umh-primary);
}

.umh-radio-option input[type="radio"]:checked + .umh-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.umh-checkbox-option input[type="checkbox"]:checked + .umh-checkbox-custom {
    border-color: var(--umh-primary);
    background: var(--umh-primary);
}

.umh-checkbox-option input[type="checkbox"]:checked + .umh-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.umh-radio-text,
.umh-checkbox-text {
    flex: 1;
}

.umh-radio-option:hover .umh-radio-custom,
.umh-checkbox-option:hover .umh-checkbox-custom {
    border-color: var(--umh-primary);
}

/* Dropdown Styles */
.umh-dropdown {
    position: relative;
    display: inline-block;
}

.umh-dropdown-select {
    background: white;
    border: 2px solid var(--umh-border-color);
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--umh-text-color);
    cursor: pointer;
    min-width: 200px;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-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;
    padding-right: 40px;
}

.umh-dropdown-select:hover {
    border-color: var(--umh-primary);
}

.umh-dropdown-select:focus {
    outline: none;
    border-color: var(--umh-primary);
}

.umh-dropdown-select option {
    padding: 8px 12px;
    font-size: 14px;
}



.umh-results-count {
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid var(--umh-border-color);
}

.umh-results-text {
    font-size: 16px;
    color: var(--umh-text-color);
}

.umh-results-number {
    font-weight: 600;
    color: var(--umh-primary);
}

/* Responsive filter styles */
@media (max-width: 768px) {
    .umh-filters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .umh-filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .umh-clear-filters-btn {
        align-self: flex-end;
    }
} 