/* Property Management System - Modern Redesign */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;700&display=swap');

/* CSS Custom Properties */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f5f5f5;
    --accent-color: #007bff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --background-primary: #ffffff;
    --background-secondary: #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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Use DM Sans across the public site */
    --font-primary: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-primary);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Ensure core text elements use DM Sans */
h1, h2, h3, h4, h5, h6,
body, p, a, li, span, div,
input, textarea, select, button {
    font-family: var(--font-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    min-height: 44px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--background-secondary);
    border-color: var(--primary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    padding: 16px 0;
}

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

.nav-brand a {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.nav-brand i {
    font-size: 28px;
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 0;
    position: relative;
    font-size: 15px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

.login-btn {
    background: var(--primary-color);
    color: white !important;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    border: 1px solid var(--primary-color);
}

.login-btn:hover {
    background: transparent;
    color: var(--primary-color) !important;
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
    padding: 8px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--background-primary) 0%, var(--background-secondary) 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    margin-top: 80px;
    padding: 80px 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 24px;
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    margin-bottom: 48px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}

.hero-stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Search Form */
.search-form {
    background: white;
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    margin-top: 32px;
    border: 1px solid var(--border-color);
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

.search-field {
    position: relative;
}

.search-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.search-field i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 2;
    font-size: 16px;
}

.search-field input,
.search-field select {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: var(--background-primary);
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    font-size: 15px;
}

.search-btn:hover {
    background-color: rgba(26, 26, 26, 0.9);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Featured Properties Section */
.featured-properties {
    padding: 80px 0;
    background: var(--background-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    color: var(--primary-color);
    margin-bottom: 16px;
    font-weight: 800;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.6;
}

/* Enhanced Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 28px;
    margin-bottom: 64px;
    padding: 0;
}

.property-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    cursor: pointer;
    height: fit-content;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(26, 26, 26, 0.1);
}

.property-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.property-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.property-status {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.property-type {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.property-content {
    padding: 28px;
    background: white;
    position: relative;
}

.property-price {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.8px;
    line-height: 1.2;
}

.property-title {
    margin-bottom: 16px;
}

.property-title a {
    color: #2d3748;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.4;
    display: block;
    transition: color 0.3s ease;
    text-decoration: none;
}

.property-title a:hover {
    color: #667eea;
    text-decoration: none;
}

.property-location {
    color: #718096;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
}

.property-location i {
    color: #e53e3e;
    font-size: 16px;
}

.property-features {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.property-features i {
    color: #667eea;
    font-size: 16px;
}

.property-actions {
    margin-top: 0;
    display: flex;
    gap: 12px;
}

.property-actions .btn {
    flex: 1;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    padding: 14px 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.property-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.property-actions .btn-secondary {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #4a5568;
}

.property-actions .btn-secondary:hover {
    background: #f7fafc;
    border-color: #667eea;
    color: #667eea;
}

/* Footer - HomeSpace Inspired Design */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 80px 0 0;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footer-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23footer-pattern)"/></svg>');
    opacity: 0.3;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.footer-logo .logo-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    margin-right: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.footer-section h4 {
    margin-bottom: 32px;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 32px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 16px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
    padding-left: 20px;
}

.footer-links li a::before {
    content: '→';
    position: absolute;
    left: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: #667eea;
}

.footer-links li a:hover {
    color: white;
    padding-left: 25px;
}

.footer-links li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
}

.social-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    border-color: transparent;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
}

.contact-item i {
    width: 20px;
    text-align: center;
    color: #667eea;
    margin-top: 2px;
    font-size: 1.1rem;
}

.contact-item:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px 0;
    position: relative;
    z-index: 2;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #667eea;
}

.footer-bottom-links span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-bottom-links strong {
    color: #667eea;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: var(--background-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-info {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .properties-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .properties-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 20px;
    }

    .property-content {
        padding: 24px;
    }

    .property-price {
        font-size: 24px;
    }

    .property-title a {
        font-size: 18px;
    }
}
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero {
        padding: 60px 0;
        margin-top: 70px;
    }

    .hero-stats {
        gap: 32px;
    }

    .search-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .search-form {
        padding: 24px;
    }

    .properties-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .property-card {
        border-radius: 12px;
    }

    .property-image {
        height: 250px;
    }

    .property-content {
        padding: 20px;
    }

    .property-price {
        font-size: 22px;
    }

    .property-title a {
        font-size: 16px;
    }

    .property-features {
        gap: 12px;
    }

    .property-features span {
        font-size: 13px;
        padding: 6px 10px;
    }

    .property-actions {
        flex-direction: column;
        gap: 8px;
    }

    .property-actions .btn {
        font-size: 13px;
        padding: 12px 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .footer-brand {
        max-width: none;
    }

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links li a::before {
        display: none;
    }

    .footer-links li a:hover {
        padding-left: 20px;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-bottom-links {
        justify-content: center;
    }

    .featured-properties {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 48px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .navbar {
        padding: 12px 0;
    }

    .hero {
        margin-top: 60px;
        padding: 40px 0;
    }

    .hero-stats {
        gap: 24px;
        flex-direction: column;
        align-items: center;
    }

    .search-form {
        padding: 20px;
        margin-top: 24px;
    }

    .property-content {
        padding: 20px;
    }

    .footer {
        padding: 48px 0 24px;
    }

    .footer-content {
        gap: 24px;
    }
}
