/* =========================================
   Reset & Base Styles
   ========================================= */
:root {
    /* Light Theme Variables */
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --primary-dark: #1d4ed8;
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

.dark-theme {
    /* Dark Theme Variables */
    --primary: #3b82f6;
    --primary-light: #1e293b;
    --primary-dark: #60a5fa;
    --bg-body: #020617;
    --bg-surface: #0f172a;
    --bg-surface-alt: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================
   Components
   ========================================= */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

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

/* =========================================
   Navbar
   ========================================= */
.navbar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    font-family: var(--font-heading);
}

.nav-logo {
    height: 2.5rem;
    width: auto;
    border-radius: 0.375rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
}

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

@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
    }

    .nav-links {
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-alt) 100%);
    padding: 6rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* =========================================
   Sections
   ========================================= */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* =========================================
   Apartments Grid
   ========================================= */
.apartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.apartment-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.apartment-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.apartment-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    padding: 1.5rem 1.5rem 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    height: 250px;
}

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

.photos img:first-child:last-child {
    grid-column: span 2;
}

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

.description {
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 1rem;
    flex-grow: 1;
}

.apartment-details {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    background-color: var(--bg-surface-alt);
}

.apartment-details span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

/* =========================================
   Contact Section
   ========================================= */
.section-contact {
    background-color: var(--bg-surface-alt);
}

.contact-card {
    background-color: var(--bg-surface);
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-header {
    margin-bottom: 2.5rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: left;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: background-color 0.2s;
}

.contact-item:hover {
    background-color: var(--bg-surface-alt);
}

.icon {
    font-size: 1.5rem;
    background-color: var(--primary-light);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-content {
    text-align: center;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* =========================================
   Utilities / Animations
   ========================================= */
.animate-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
}