/**
 * RELUX - Premium Design System
 *
 * This stylesheet defines the visual identity of the REALUXE brand,
 * using modern CSS variables, fluid layouts, and high-performance transitions.
 * Mirroring the aesthetics of the React/Next.js version while remaining framework-free.
 */

/* 1. DESIGN TOKENS (CSS Variables) */
:root {
    /* Brand Colors - Elite Blue & Gold Palette */
    --color-primary: #1a3a5c;
    --color-primary-light: #2c5282;
    --color-primary-dark: #0f2540;

    --color-accent: #d4af37; /* REALUXE Gold */
    --color-accent-light: #f5d76e;

    /* Semantic Surfaces */
    --color-bg: #f8fafc;
    --color-bg-alt: #f1f5f9;
    --color-surface: #ffffff;

    /* Typography Colors */
    --color-text: #1e293b;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;

    /* Borders & Dividers */
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;

    /* Status Colors */
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;

    /* Premium Elevation (Shadows) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md:
        0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg:
        0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 40px -10px rgba(26, 58, 92, 0.1);

    /* Border Radii */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Typography Scale */
    --font-sans: "Inter", system-ui, -apple-system, sans-serif;
    --font-heading: "Outfit", "Inter", system-ui, sans-serif;

    /* Animation Timings */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease-in-out;
    --transition-slow: 0.4s ease-out;

    /* Layout Constants */
    --container-width: 1280px;
    --header-height: 80px;
}

/* 2. DARK THEME OVERRIDES */
[data-theme="dark"] {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-surface: #1e293b;

    --color-text: #f8fafc;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #64748b;

    --color-border: #334155;
    --color-border-light: #1e293b;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-premium: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Dark mode header */
[data-theme="dark"] .header {
    background-color: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .header.scrolled {
    background-color: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] body:not(.home-page) .header {
    background-color: #1e293b;
}

[data-theme="dark"] .nav-link {
    color: var(--color-text);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link:focus {
    background-color: rgba(248, 250, 252, 0.1);
}

/* Dark mode language switcher */
[data-theme="dark"] .lang-switcher {
    color: var(--color-text-muted);
    border-color: var(--color-border);
    background-color: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .lang-active {
    color: var(--color-accent);
}

[data-theme="dark"] .lang-switcher:hover {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: var(--color-accent);
}

/* 3. BASE RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition:
        background-color var(--transition-base),
        color var(--transition-base);
    max-width: 100%;
    overflow-x: hidden;
}

main {
    padding-top: var(--header-height);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    outline: none;
}

/* 4. LAYOUT COMPONENTS */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* HEADER & NAVIGATION */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    height: var(--header-height);
    z-index: 1000;
    transition: all var(--transition-slow);
    background-color: transparent;
    backdrop-filter: none;
    overflow-x: clip;
}

body.home-page .header:not(.scrolled) {
    background-color: rgba(15, 23, 42, 0.3);
    backdrop-filter: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] body.home-page .header:not(.scrolled) {
    background-color: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header.scrolled {
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: none;
    height: 70px; /* Slimmer header on scroll */
}

.header.scrolled .nav-link {
    color: var(--color-text);
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link:focus {
    color: var(--color-primary);
}

.header.scrolled .nav-link.active {
    color: #ffffff;
    background-color: var(--color-primary);
}

/* Home page header when not scrolled is over dark hero */
body.home-page .header:not(.scrolled) .nav-link,
body.home-page .header:not(.scrolled) .logo-text,
body.home-page .header:not(.scrolled) .theme-btn,
body.home-page .header:not(.scrolled) .menu-btn {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] body.home-page .header:not(.scrolled) .nav-link,
[data-theme="light"] body.home-page .header:not(.scrolled) .logo-text,
[data-theme="light"] body.home-page .header:not(.scrolled) .theme-btn,
[data-theme="light"] body.home-page .header:not(.scrolled) .menu-btn {
    color: #1a1a1a;
    text-shadow: none;
}

body.home-page .header:not(.scrolled) .logo-icon {
    background-color: #ffffff;
    color: var(--color-primary);
}

body.home-page .header:not(.scrolled) .lang-switcher {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] body.home-page .header:not(.scrolled) .lang-switcher {
    border-color: rgba(0, 0, 0, 0.1);
    background-color: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

body.home-page .header:not(.scrolled) .lang-active {
    color: var(--color-accent);
}

[data-theme="light"] body.home-page .header:not(.scrolled) .lang-active {
    color: var(--color-primary);
}

/* On all other pages header is always white */
body:not(.home-page) .header {
    background-color: #ffffff;
    backdrop-filter: none;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-container > * {
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--color-primary);
    text-shadow: none;
}

.logo.has-logo-img .logo-icon {
    display: none;
}

.logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-md);
    background-color: #fff;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 900;
    transition: transform var(--transition-base);
}

.logo:hover .logo-icon {
    transform: rotate(-10deg) scale(1.1);
}

.logo-text {
    color: var(--color-text);
    letter-spacing: -1px;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-shadow: none;
}

.nav-link:hover,
.nav-link:focus,
.nav-link:focus-visible {
    color: var(--color-primary);
    background-color: rgba(26, 58, 92, 0.1);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.nav-link.active {
    color: var(--color-accent);
    font-weight: 800;
    background-color: rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
}

[data-theme="light"] .nav-link.active {
    color: #ffffff;
    background-color: var(--color-primary-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-shadow: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-border);
    background-color: rgba(248, 250, 252, 0.6);
    transition: all var(--transition-fast);
}

.lang-switcher-mobile {
    display: none;
}

.lang-active {
    color: var(--color-accent);
    font-weight: 900;
    text-shadow: none;
}

.lang-switcher:hover {
    background-color: rgba(248, 250, 252, 0.8);
    border-color: var(--color-accent);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

.lang-switcher:active {
    transform: scale(0.95);
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    border: 2px solid var(--color-border);
    background-color: rgba(248, 250, 252, 0.5);
    transition: all var(--transition-fast);
}

.theme-btn:hover {
    background-color: rgba(248, 250, 252, 0.8);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

[data-theme="dark"] .theme-btn {
    background-color: rgba(30, 41, 59, 0.6);
    border-color: var(--color-border);
    color: var(--color-text-muted);
}

[data-theme="dark"] .theme-btn:hover {
    background-color: rgba(30, 41, 59, 0.9);
}

.menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-shadow: none;
}

.menu-btn:hover {
    transform: scale(1.1);
    color: var(--color-primary);
}

.menu-btn:focus,
.menu-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

[data-theme="dark"] .menu-btn {
    color: var(--color-text);
}

/* BUTTON SYSTEM */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.auth-btn-label {
    display: inline-flex;
}

.auth-btn-icon {
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

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

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

/* 5. SECTIONS */

/* HERO SECTION */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10rem 0;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-image: url("data/images/properties/hero-image.jpg"); /* Replace this file with your upgraded hero image */
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    animation: slowZoom 40s linear infinite alternate;
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.5) 0%,
        rgba(15, 23, 42, 0.05) 20%,
        rgba(15, 23, 42, 0.05) 80%,
        rgba(15, 23, 42, 0.5) 100%
    );
    z-index: 1;
}

[data-theme="dark"] .hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.8) 0%,
        rgba(15, 23, 42, 0.4) 20%,
        rgba(15, 23, 42, 0.4) 80%,
        rgba(15, 23, 42, 0.8) 100%
    );
}

.hero-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background-image: url("data/images/hero-budapest.svg");
    background-position: center bottom;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
    filter: brightness(0) invert(1);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4rem;
    width: 100%;
}

.hero-text {
    max-width: 52rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -3px;
    text-transform: uppercase;
}

.hero-subtitle {
    color: var(--color-accent);
    font-style: italic;
    font-weight: 300;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.hero-cta {
    font-size: 0.875rem;
    color: var(--color-accent-light);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* SEARCH WIDGET */
.search-wrapper {
    width: 100%;
    max-width: 66rem;
}

.search-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.search-tab {
    padding: 1rem 3rem;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    transition: all var(--transition-base);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    cursor: pointer;
}

.search-tab:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.search-tab.active {
    background-color: var(--color-surface);
    color: var(--color-primary);
    border-color: var(--color-surface);
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.search-box {
    background-color: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-premium);
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: flex-end;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    text-align: left;
}

.search-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
}

.search-input {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

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

.search-btn {
    width: 100%;
    padding: 0.95rem;
}

/* FEATURED PROPERTIES SECTION */
.featured-section {
    padding: 8rem 0;
    background-color: var(--color-bg);
}

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

.section-title {
    font-size: 2.75rem;
    color: var(--color-text);
    margin-bottom: 1rem;
    letter-spacing: -1.5px;
}

[data-theme="dark"] .section-title {
    color: var(--color-text);
}

.section-subtitle {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
}

/* PROPERTY CARD COMPONENT */
.property-card {
    background-color: var(--color-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--color-border-light);
}

.property-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-premium);
    border-color: var(--color-accent);
}

.card-image-area {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
}

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

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 37, 64, 0.8), transparent);
    opacity: 0.5;
}

.card-tags {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    z-index: 2;
}

.badge {
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--color-primary);
    backdrop-filter: blur(4px);
}

.badge-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.card-price-area {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 2;
    color: #fff;
}

.card-price {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-accent-light);
}

.card-price-sqm {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.2em; /* Ensure consistent alignment */
}

.card-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.card-features {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.feature-item svg {
    color: var(--color-accent);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.property-type {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 1px;
}

.details-link {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--color-primary);
    transition: color var(--transition-fast);
}

.property-card:hover .details-link {
    color: var(--color-accent);
}

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

/* SERVICES SECTION */
.services-section {
    padding: 8rem 0;
    background-color: var(--color-surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.service-card {
    padding: 3rem;
    border-radius: var(--radius-2xl);
    background-color: var(--color-bg);
    transition: all 0.4s ease;
    border: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: scale(1.03);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-premium);
    border-color: var(--color-accent);
}

.service-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-xl);
    background-color: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: transform var(--transition-base);
}

.service-card:hover .service-icon-wrapper {
    transform: rotateY(180deg);
}

.service-card-title {
    font-size: 1.35rem;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
}

.service-card-desc {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.service-link {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--color-primary);
}

/* WHY US SECTION */
.why-us-section {
    padding: 8rem 0;
    background-color: var(--color-bg-alt);
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 4rem;
    text-align: center;
}

.why-us-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.why-us-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #fff;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.why-us-item:hover .why-us-icon-wrapper {
    background-color: var(--color-accent);
    color: #fff;
    transform: scale(1.1);
}

.why-us-item-title {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.why-us-item-desc {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* CONTACT SECTION */
.contact-section {
    padding: 8rem 0;
    background-color: var(--color-surface);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

.contact-form {
    background-color: var(--color-bg);
    padding: 4rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-secondary);
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(26, 58, 92, 0.08);
}

.form-textarea {
    resize: vertical;
    min-height: 160px;
}

.submit-btn {
    width: 100%;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    padding: 2.5rem;
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    border-left: 5px solid var(--color-accent);
    transition: transform var(--transition-base);
}

.info-card:hover {
    transform: translateX(10px);
}

.info-card-title {
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.info-card-text {
    font-size: 1.25rem;
    color: var(--color-text);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.info-card-link {
    font-size: 1.5rem;
    color: var(--color-text);
    font-weight: 800;
    text-decoration: none;
    font-family: var(--font-heading);
}

.info-card-link:hover {
    color: var(--color-accent);
}

/* FOOTER */
.footer {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 6. RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .header-container {
        padding: 0 1rem;
    }

    .logo-text {
        display: none;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }
}

/* Mobile Menu Backdrop Overlay */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.nav-backdrop.visible {
    opacity: 1;
}

@media (max-width: 768px) {
    .menu-btn {
        display: flex;
        z-index: 1001;
        position: relative;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background-color: #ffffff;
        flex-direction: column;
        padding: 6rem 2rem 3rem;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
        z-index: 999;
        gap: 0.5rem;
        overflow-y: auto;
    }

    .nav.open {
        transform: translateX(0);
    }

    .nav-link {
        width: 100%;
        text-align: left;
        font-size: 1.1rem;
        padding: 0.85rem 1.25rem;
        border-radius: var(--radius-md);
        transition: all var(--transition-fast);
        color: var(--color-text);
        text-shadow: none;
    }

    .nav-link:hover,
    .nav-link:focus,
    .nav-link:focus-visible {
        background-color: var(--color-bg-alt);
        color: var(--color-primary);
        outline: 2px solid var(--color-primary);
        outline-offset: -1px;
    }

    .nav-link.active {
        background-color: rgba(212, 175, 55, 0.2);
        color: var(--color-primary);
        font-weight: 800;
    }

    /* Hamburger to X animation */
    .menu-btn svg {
        transition: transform 0.3s ease;
    }

    .menu-btn.active svg {
        transform: rotate(90deg);
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    [data-theme="dark"] .nav {
        background-color: #1e293b;
    }

    .header-actions {
        gap: 0.75rem;
    }

    #auth-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: var(--radius-full);
        padding: 0;
    }

    #auth-btn .auth-btn-label {
        display: none;
    }

    #auth-btn .auth-btn-icon {
        display: inline-flex;
    }

    .lang-switcher-desktop {
        display: none;
    }

    .lang-switcher-mobile {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: auto;
        align-self: stretch;
        border: 1px solid var(--color-border-light);
        border-radius: var(--radius-full);
        background-color: rgba(248, 250, 252, 0.8);
        padding: 0.75rem 1rem;
        box-shadow: none;
    }

    .lang-switcher-mobile:hover {
        background-color: var(--color-bg);
    }

    .search-tabs {
        display: none;
    }

    .hero-title {
        font-size: 2.75rem;
        letter-spacing: -1px;
    }

    .search-box {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .nav {
        width: 100%;
        max-width: 100vw;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .container {
        padding: 0 1rem;
    }
}

@media (min-width: 768px) {
    .search-box {
        border-top-left-radius: 0;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .search-box {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* PAGE HEADER */
.page-header {
    padding: 3rem 0;
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-primary-light) 100%
    );
    color: white;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

/* PAGE CONTENT */
.page-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.profile-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .profile-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

/* PROFILE CARD */
.profile-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-light);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.profile-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
}

.profile-info-item label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info-item p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
}

.profile-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-actions button,
.profile-actions a {
    flex: 1;
    min-width: 120px;
}

/* INQUIRIES CARD */
.inquiries-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-light);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    grid-column: 1 / -1;
}

.inquiries-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.inquiries-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inquiry-item {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: var(--color-bg);
}

.inquiry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.inquiry-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
}

.inquiry-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    background: #dcfce7;
    color: #166534;
    text-transform: uppercase;
}

.inquiry-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.inquiry-details p {
    color: var(--color-text-secondary);
}

.inquiry-details strong {
    color: var(--color-text);
    font-weight: 600;
}

.inquiry-details small {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

/* LANG ACTIVE STATE */
.lang-switcher .lang-active {
    font-weight: 700;
    color: var(--color-primary);
}

.lang-switcher {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-switcher:hover {
    opacity: 0.7;
}

/* BUTTON UTILITIES */
.btn-danger {
    background: var(--color-error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    opacity: 0.9;
}

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

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

/* FORM VALIDATION STYLES */
.input-error {
    border-color: var(--color-error) !important;
    background-color: rgba(239, 68, 68, 0.02) !important;
}

.error-message {
    display: block;
    color: var(--color-error);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* DARK MODE TEXT CONTRAST AUDIT */
[data-theme="dark"] {
    /* Nav and header links */
    .nav-link {
        color: var(--color-text-secondary);
    }

    .nav-link:hover {
        color: var(--color-accent-light);
    }

    .nav-link.active {
        color: #ffffff;
        background-color: var(--color-primary-light);
    }

    /* Card titles */
    .card-title {
        color: var(--color-text);
    }

    .service-card-title {
        color: var(--color-accent-light);
    }

    .why-us-item-title {
        color: var(--color-text);
    }

    /* Button outlines */
    .btn-outline {
        color: var(--color-accent-light);
        border-color: var(--color-accent-light);
    }

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

    /* Form labels */
    .form-label {
        color: var(--color-text-secondary);
    }

    .search-label {
        color: var(--color-text-secondary);
    }

    /* Info cards */
    .info-card {
        background-color: var(--color-surface);
        border-left-color: var(--color-accent);
    }

    .info-card-title {
        color: var(--color-text-muted);
    }

    /* Property details */
    .property-type {
        color: var(--color-text-secondary);
    }

    /* Header scrolled state */
    .header.scrolled {
        background-color: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
    }

    /* Theme button */
    .theme-btn {
        color: var(--color-text-secondary);
        border-color: var(--color-border);
    }

    .theme-btn:hover {
        color: var(--color-accent);
        border-color: var(--color-accent);
    }

    /* Search box */
    .search-box {
        background-color: var(--color-surface);
    }

    /* Contact form */
    .contact-form {
        background-color: var(--color-surface);
        border-color: var(--color-border);
    }

    /* Language switcher */
    .lang-switcher {
        color: var(--color-text-secondary);
    }
}

/* AGENTS SECTION */
.agents-section {
    padding: 8rem 0;
    background-color: var(--color-bg-alt);
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.agent-card-home {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--color-border-light);
}

.agent-card-home:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.agent-photo {
    height: 350px;
    background-size: cover;
    background-position: center;
}

.agent-details {
    padding: 2rem;
    text-align: center;
}

.agent-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.agent-role {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.agent-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--color-text-muted);
}

.agent-social svg {
    cursor: pointer;
    transition: color var(--transition-fast);
}

.agent-social svg:hover {
    color: var(--color-primary);
}
