/**
 * Properties Listing Page Styles
 * Styling for property grid, cards, and pagination
 */

/* Page Header Styles */
.page-header {
    background-color: #f5f7fa;
    padding: 80px 0 40px;
    margin-bottom: 40px;
    text-align: center;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 15px;
    color: #1e3a8a;
}

.page-header p {
    font-size: 18px;
    color: #4b5563;
    max-width: 700px;
    margin: 0 auto;
}

/* Pagination and Properties Count Wrapper */
.pagination-and-count {
    margin-top: 40px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

/* Properties Count */
.properties-count {
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

/* Properties Grid */
.properties-grid {
    padding: 30px 0 60px;
    display: flex;
    flex-direction: column;
}

.properties-grid__container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    margin-bottom: 40px;
}

@media (max-width: 1100px) {
    .properties-grid__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .properties-grid__container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Property Card */
.property-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.property-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.property-card__image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.property-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-card__image img {
    transform: scale(1.05);
}

.property-card__featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #10b981;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 1;
}

.property-card__content {
    padding: 16px 20px 20px;
}

.property-card__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e3a8a;
    line-height: 1.4;
}

.property-card__location {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.property-card__location svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.property-card__details {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.property-card__detail {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #4b5563;
}

.property-card__detail svg {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.property-card__price {
    margin-bottom: 8px;
}

.property-card__price .price {
    font-size: 18px;
    font-weight: 600;
    color: #1e3a8a;
}

.property-card__price .per-night {
    font-size: 14px;
    color: #6b7280;
}

.property-card__price .contact-price {
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
}

.property-card__type {
    display: inline-block;
    font-size: 12px;
    color: #6b7280;
    padding: 4px 8px;
    background-color: #f3f4f6;
    border-radius: 4px;
}

/* No Properties Message */
.no-properties {
    text-align: center;
    padding: 60px 0;
}

.no-properties h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #1e3a8a;
}

.no-properties p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    width: 100%;
}

.pagination__container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination__numbers {
    display: flex;
    gap: 5px;
}

.pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 14px;
    color: #4b5563;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination__item:hover {
    background-color: #f3f4f6;
    color: #1e3a8a;
}

.pagination__item--current {
    background-color: #1e3a8a;
    color: white;
}

.pagination__item--current:hover {
    background-color: #1e3a8a;
    color: white;
}

.pagination__item--prev,
.pagination__item--next {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pagination__item--prev svg,
.pagination__item--next svg {
    width: 16px;
    height: 16px;
}

/* Loading State for Async Operations */
.loading .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}