/* Real Estate Listing Styles - Responsive Grid */
.re-list {
    width: 100%;
    margin-bottom: 3rem;
}

.re-grid {
    display: grid;
    gap: 1.5rem;
    list-style: none;
    margin: 2rem 0;
    padding: 0;
    /* Mobile: 1 column (default) */
    grid-template-columns: 1fr;
}

/* Tablet: 2 columns (768px and up) */
@media (min-width: 768px) {
    .re-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Desktop: 3 columns (1024px and up) */
@media (min-width: 1024px) {
    .re-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

.re-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    list-style-type: none;
    max-width: 100%;
}

.re-card article {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-transition: transform 0.2s ease, box-shadow 0.2s ease;
    -moz-transition: transform 0.2s ease, box-shadow 0.2s ease;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.re-card article:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.re-card article a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.re-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0f0f0;
}

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

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

.re-card h3,
.re-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 1rem 1rem 0.5rem;
    color: #1a1a1a;
}

.re-address {
    font-size: 0.875rem;
    color: #666;
    margin: 0 1rem 0.5rem;
    line-height: 1.5;
}

.re-meta {
    font-size: 0.875rem;
    color: #666;
    margin: 0 1rem 0.5rem;
    line-height: 1.5;
    font-weight: 400;
}

.re-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c5f2d;
    margin: 0.5rem 1rem 1rem;
}

.re-more {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
}

.re-more .re-linktext {
    color: #2c5f2d;
    font-weight: 600;
    text-decoration: underline;
}

.re-more .re-linktext:hover {
    text-decoration: none;
}

/* Filters styling */
.re-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.re-filters input[type="search"],
.re-filters input[type="text"],
.re-filters input[type="number"] {
    flex: 1 1 200px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.re-filters input[type="search"]:focus,
.re-filters input[type="text"]:focus,
.re-filters input[type="number"]:focus {
    outline: none;
    border-color: #2c5f2d;
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

.re-filters button {
    padding: 0.75rem 2rem;
    background: #2c5f2d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-transition: background 0.2s ease;
    -moz-transition: background 0.2s ease;
    transition: background 0.2s ease;
}

.re-filters button:hover {
    background: #234a24;
}

/* Pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 3rem 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    background: #2c5f2d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    -webkit-transition: background 0.2s ease;
    -moz-transition: background 0.2s ease;
    transition: background 0.2s ease;
}

.pagination a:hover {
    background: #234a24;
}

.pagination span {
    font-weight: 600;
    color: #666;
}

/* Mobile specific adjustments */
@media (max-width: 767px) {
    .re-card h3,
    .re-title {
        font-size: 1rem;
    }

    .re-price {
        font-size: 1.125rem;
    }

    .re-filters {
        flex-direction: column;
    }

    .re-filters input[type="search"],
    .re-filters input[type="text"],
    .re-filters input[type="number"],
    .re-filters button {
        width: 100%;
    }
}
