/* ================================
   🎨 PROFESSIONAL WEBSITE DESIGN
   Modern, Clean, Readable & Responsive
   ================================ */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Slight fluid root size respecting user prefs */
    font-size: clamp(16px, 1.05rem + 0.2vw, 18px);
    scroll-behavior: smooth;
    line-height: 1.6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: #1f2937;
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-top: 72px;
}

/* ===== PROFESSIONAL COLOR SYSTEM ===== */
:root {
    /* Primary Colors */
    --primary-navy: #1e293b;
    --primary-slate: #334155;
    --primary-blue: #3b82f6;
    
    /* Accent Colors */
    --accent-gold: #f59e0b;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    
    /* Neutral Colors */
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    
    /* Professional Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-blue) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-gold) 0%, #fbbf24 100%);
    --gradient-hero: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(59, 130, 246, 0.8) 100%);
    
    /* Modern Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* ===== TYPOGRAPHY SYSTEM ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Inter', serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--neutral-800);
    margin-bottom: var(--space-md);
}

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

p {
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
    line-height: clamp(1.7, 1.6 + 0.25vw, 1.9);
    color: var(--neutral-600);
    margin-bottom: clamp(1rem, 2.4vw, 1.5rem);
    max-width: 65ch;
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    /* Responsive gutters: 16px up to 40px */
    padding: 0 clamp(16px, 4vw, var(--space-xl));
}

.section {
    /* More breathing room */
    padding: clamp(3rem, 8vw, 7rem) 0;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(2rem, 6vw, 4rem);
}

.section-title {
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: var(--space-lg);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--neutral-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--neutral-200);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand .logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0;
}

.nav-brand .tagline {
    font-size: 0.875rem;
    color: var(--neutral-500);
    font-weight: 400;
}

.nav-menu {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--neutral-600);
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-blue);
    background-color: var(--neutral-100);
}

.cta-phone {
    background: var(--gradient-accent);
    color: white !important;
    font-weight: 600;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.cta-phone:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--neutral-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    padding: var(--space-4xl) 0;
}

/* New: Full-bleed cover hero with overlay */
.hero--cover {
    padding: 0;
    min-height: clamp(520px, 70vh, 880px);
    display: grid;
    place-items: center;
    background-image: linear-gradient( to bottom, rgba(30,41,59,0.6), rgba(30,41,59,0.2) ), url('/images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero--cover .container {
    width: 100%;
}

.hero--cover .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding: clamp(2rem, 6vw, 4rem) 0;
}

.hero--cover .hero-media { display: none; }

.hero--cover .hero-copy {
    color: white;
    text-align: left;
}
.hero--cover .hero-title { color: white; text-shadow: 0 2px 20px rgba(0,0,0,0.25); }
.hero--cover .hero-subtitle { color: #e5e7eb; }
.hero--cover .feature-badge { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.hero--cover .btn-outline { border-color: #fff; color: #fff; }
.hero--cover .btn-outline:hover { background: #fff; color: #111827; }

/* Clean two-column hero variant */
.hero--clean .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero--clean .hero-copy { max-width: 640px; }

.hero--clean .hero-badge {
    display: inline-block;
    background: var(--neutral-100);
    color: var(--neutral-700);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-lg);
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    text-shadow: none;
}

.hero-subtitle {
    font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
    font-weight: 400;
    color: var(--neutral-600);
    margin-bottom: var(--space-xl);
    max-width: 600px;
}

.hero-features {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.feature-badge {
    background: var(--neutral-100);
    color: var(--neutral-700);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-xl);
    font-weight: 600;
    border: 1px solid var(--neutral-200);
    transition: all 0.3s ease;
}

.feature-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.hero-cta {
    display: flex;
    gap: var(--space-lg);
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero--clean .hero-media { align-self: stretch; }
.hero--clean .hero-media img {
    width: 100%;
    height: 100%;
    min-height: clamp(320px, 50vh, 620px);
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
}

/* ===== BUTTON SYSTEM ===== */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 1.2vw, 1rem) clamp(1rem, 2.4vw, 1.5rem);
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: clamp(0.95rem, 0.6vw + 0.8rem, 1.125rem);
    min-width: 0;
    max-width: 100%;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

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

.btn-outline:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

/* ===== APARTMENTS SECTION ===== */
.apartments-section {
    background: var(--neutral-50);
}

.apartments-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(var(--space-xl), 4vw, var(--space-3xl));
    margin-top: var(--space-2xl);
}

.apartment-card {
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--neutral-200);
    grid-column: span 4;
}

.apartment-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Mark property images explicitly for tests and semantics */
.property-image {
    display: block;
    width: 100%;
    height: auto;
}

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

.card-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--accent-emerald);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
}

.card-content {
    padding: clamp(1.25rem, 3.5vw, 2rem);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: var(--space-sm);
}

.card-description {
    color: var(--neutral-600);
    margin-bottom: var(--space-lg);
    font-size: 1rem;
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.feature {
    background: var(--neutral-100);
    color: var(--neutral-700);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
}

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

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

/* ===== AMENITIES SECTION ===== */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.amenity-card {
    text-align: center;
    padding: clamp(1.25rem, 4vw, 2rem);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--neutral-200);
}

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

.amenity-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    display: block;
}

.amenity-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: var(--space-sm);
}

.amenity-card p {
    color: var(--neutral-600);
    font-size: 1rem;
    margin: 0;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    background: var(--neutral-50);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.contact-details {
    margin-top: var(--space-2xl);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.contact-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    color: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-text h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: var(--space-xs);
}

.contact-text a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.contact-text a:hover {
    text-decoration: underline;
}

.contact-form {
    background: white;
    padding: var(--space-2xl);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
}

.contact-form h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: var(--space-xl);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: var(--space-sm);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: var(--neutral-50);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--neutral-900);
    color: var(--neutral-300);
    padding: var(--space-4xl) 0 var(--space-xl) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
}

.footer-column h4 {
    color: white;
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
}

.footer-column a {
    display: block;
    color: var(--neutral-400);
    text-decoration: none;
    margin-bottom: var(--space-sm);
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--neutral-800);
    color: var(--neutral-500);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    /* Make hero strictly single-column on mobile */
    .hero--clean .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    .hero--clean .hero-cta { justify-content: center; }
    .hero--clean .hero-features { justify-content: center; }

    /* Avoid image splitting/shrinking on phones */
    .hero--clean .hero-media img {
        height: auto;
        min-height: 360px;
        aspect-ratio: 3 / 2;
        object-fit: cover;
        object-position: center;
    }
    .nav-menu {
        /* Mobile menu hidden by default */
        display: none;
        position: absolute;
        top: 64px;
        right: var(--space-md);
        left: var(--space-md);
        background: #ffffff;
        border: 1px solid var(--neutral-200);
        border-radius: var(--radius-lg);
        padding: var(--space-lg);
        flex-direction: column;
        gap: var(--space-md);
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }

    /* Show menu when toggled */
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary, .btn-outline {
        width: 100%;
        max-width: 300px;
    }
    
    .apartments-grid { grid-template-columns: repeat(6, 1fr); gap: clamp(var(--space-lg), 5vw, var(--space-2xl)); }
    .apartment-card { grid-column: span 6; }
    
    .amenities-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
    }
    
    .section {
        padding: clamp(2.5rem, 8vw, 4rem) 0;
    }

    /* Offset for fixed navbar */
    body {
        padding-top: 72px;
    }

    /* Ensure hero text doesn't touch edges */
    .hero-content {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
}

/* Global mobile improvements */
img, video {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scroll on small devices */
html, body {
    overflow-x: hidden;
}

/* Touch target sizing */
.nav-link, .cta-phone, .btn-primary, .btn-secondary, .btn-outline, .mobile-menu-toggle {
    min-height: 48px;
}

@media (max-width: 480px) {
    .container { padding: 0 clamp(20px, 5vw, var(--space-lg)); }
    
    .nav-container {
        padding: var(--space-sm) var(--space-md);
    }
    
    .hero-content {
        padding: var(--space-lg);
    }
    
    .card-content {
        padding: clamp(1rem, 6vw, 1.5rem);
    }
    
    .contact-form {
        padding: var(--space-lg);
    }
    
    .amenity-card {
        padding: var(--space-lg);
    }
    .apartments-grid { grid-template-columns: repeat(4, 1fr); }
    .apartment-card { grid-column: span 4; }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar, .hero-cta, .contact-form {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero {
        min-height: auto;
        padding: var(--space-2xl) 0;
    }
}

/* ===== ADDITIONAL POLISH ===== */
::selection {
    background-color: var(--primary-blue);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Smooth animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}