/* Premium Portal - Modern iOS-inspired Design */
:root {
    --primary-color: #0071e3;
    --secondary-color: #34c759;
    --dark-color: #1d1d1f;
    --light-color: #f5f5f7;
    --border-color: #d2d2d7;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-start: #0071e3;
    --gradient-end: #42a5f5;
    --card-border-radius: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    color: var(--dark-color);
    background-color: #f9f9fb;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 1px 6px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo span {
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sorting-filters {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.sorting-filters select, 
.sorting-filters button {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 14px;
    color: var(--dark-color);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.sorting-filters select:hover,
.sorting-filters button:hover {
    border-color: var(--primary-color);
}

.sorting-filters select:focus,
.sorting-filters button:focus {
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.2);
    border-color: var(--primary-color);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.property-card {
    background-color: #fff;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

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

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.property-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.property-details {
    padding: 24px;
}

.property-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.property-location {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.property-location i {
    margin-right: 6px;
    color: var(--primary-color);
}

.property-specs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.spec {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spec-value {
    font-weight: 600;
    font-size: 16px;
}

.spec-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.property-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.price span {
    font-size: 14px;
    font-weight: 400;
    color: #666;
}

.view-details {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.view-details:hover {
    background-color: #005bbf;
}

.property-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.amenity {
    background-color: #f5f5f7;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
}

.amenity i {
    margin-right: 4px;
    font-size: 12px;
    color: var(--primary-color);
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    gap: 8px;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination a.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section ul {
    list-style-type: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #a1a1a6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #a1a1a6;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 900px) {
    .properties-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .sorting-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .property-specs {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .spec {
        flex-basis: 48%;
    }
}

/* Loading animation */
.loader {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.loader div {
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 5px;
    animation: bounce 0.8s infinite alternate;
}

.loader div:nth-child(2) {
    animation-delay: 0.2s;
}

.loader div:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    to {
        transform: translateY(-10px);
    }
}

/* Property view transitions */
.view-toggle {
    display: flex;
    gap: 10px;
}

.view-toggle button {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.view-toggle button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.view-toggle button i {
    font-size: 16px;
}

/* For grid view / list view toggle */
.properties-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.property-card-list {
    display: grid;
    grid-template-columns: 300px 1fr;
    background-color: #fff;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.property-card-list .property-image {
    height: 100%;
}

.property-card-list .property-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.property-card-list .property-specs {
    margin-top: auto;
    border-bottom: none;
    padding-bottom: 0;
}

@media (max-width: 768px) {
    .property-card-list {
        grid-template-columns: 1fr;
    }
    
    .property-card-list .property-image {
        height: 200px;
    }
}
