/* Properties Page */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

.page-header {
    text-align: center;
    padding: 5rem 2rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.page-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
    margin: 0 auto;
    max-width: 1400px;
}

@media (min-width: 1024px) {
    .property-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1023px) and (min-width: 768px) {
    .property-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .property-grid {
        grid-template-columns: 1fr;
    }
}

.property-card {
    background: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #e5e7eb;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.property-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.property-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.property-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.property-card:hover .property-image::before {
    opacity: 1;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.property-info {
    padding: 1.5rem;
}

.property-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.property-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.property-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.property-info .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
    display: block;
}

.property-info .location {
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.property-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-details {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-details:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.no-properties {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 1.125rem;
    color: var(--text-light);
    grid-column: 1 / -1;
    background: var(--bg-light);
    border-radius: 0.5rem;
    margin: 2rem 0;
}

/* Loading skeleton */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
    opacity: 0.7;
}

@keyframes skeleton-loading {
    0% {
        background-color: hsl(200, 20%, 80%);
    }

    100% {
        background-color: hsl(200, 20%, 95%);
    }
}

/* Property Detail Page */
.property-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.property-gallery .main-property-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.property-details-content h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.property-details-content .price {
    font-size: 2em;
    color: #007bff;
    margin-bottom: 10px;
}

.property-details-content .location {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

.property-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.description {
    line-height: 1.7;
    margin-bottom: 20px;
}

.contact-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.btn-contact-agent,
.btn-submit {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#contact-form .form-group {
    margin-bottom: 20px;
}

#contact-form label {
    display: block;
    margin-bottom: 5px;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .property-detail-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }

    .property-detail-layout .property-gallery,
    .property-detail-layout .property-details-content {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
    }
}