:root {
    /* Color Palette - Professional & High Contrast */
    --primary-900: #0f172a;
    --primary-800: #1e293b;
    --primary-700: #334155;
    --primary-600: #475569;
    --primary-500: #64748b;

    /* Brand Colors - Deep Royal Blue */
    --accent-700: #1d4ed8;
    --accent-600: #2563eb;
    --accent-500: #3b82f6;
    --accent-400: #60a5fa;
    --accent-100: #dbeafe;

    --success-600: #059669;
    --warning-600: #d97706;
    --danger-600: #dc2626;

    --surface-50: #f8fafc;
    --surface-100: #f1f5f9;
    --surface-200: #e2e8f0;
    --surface-300: #cbd5e1;
    --surface-white: #ffffff;

    /* Text Colors - High Readability */
    --text-main: #020617;
    /* Almost black for max contrast */
    --text-muted: #475569;
    /* Darker slate for readability */
    --text-light: #64748b;
    --text-inverse: #ffffff;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Outfit', system-ui, sans-serif;

    /* Shadows - Smooth & Modern */
    --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);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Base size */
}

body {
    font-family: var(--font-sans);
    background-color: var(--surface-50);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    color: var(--primary-900);
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

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

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.text-primary {
    color: var(--accent-600);
}

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

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent-600);
    color: white;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

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

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

.btn-outline:hover {
    border-color: var(--accent-600);
    color: var(--accent-600);
    background-color: var(--surface-white);
}

/* Header & Navigation */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--surface-200);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

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

.brand-logo svg {
    width: 32px;
    height: 32px;
    color: var(--accent-600);
}

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

.nav-link {
    font-weight: 500;
    color: var(--primary-600);
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-900);
    padding: 0.5rem;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 0;
    background: var(--surface-100);
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--surface-200);
}

.breadcrumbs .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--primary-600);
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: var(--accent-600);
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 0.5rem;
    color: var(--surface-300);
}

.breadcrumbs .current {
    color: var(--text-main);
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 8rem 0 6rem;
    background-color: var(--primary-900);
    color: white;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero_bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 1;
}

.hero-bg-pattern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.95));
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--surface-300);
    margin-bottom: 3rem;
    font-weight: 400;
}

/* Search Box */
.search-container {
    background: var(--surface-white);
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 0.5rem;
    box-shadow: var(--shadow-xl);
    max-width: 700px;
    margin: 0 auto;
}

.search-input-group {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    width: 20px;
    height: 20px;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid var(--surface-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
    color: var(--text-main);
    background: var(--surface-50);
}

.search-input:focus {
    background: white;
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px var(--accent-100);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-200);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.card-image {
    height: 220px;
    background: var(--surface-100);
    overflow: hidden;
}

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

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

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

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

.section-bg {
    background-color: var(--surface-100);
}

/* Article */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--surface-200);
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--primary-800);
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    list-style: disc;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    background-color: var(--primary-900);
    color: var(--surface-300);
    padding: 4rem 0 2rem;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-heading {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--surface-300);
    display: block;
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid var(--primary-800);
    padding-top: 2rem;
    text-align: center;
    color: var(--primary-600);
}

/* Responsive / Mobile */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--surface-200);
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-menu .btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-hidden {
        display: none;
    }

    /* Hide desktop-only buttons in mobile menu if needed, or keep them */

    /* Show the 'Add Listing' button in mobile menu properly */
    .nav-menu .btn.mobile-hidden {
        display: inline-flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .search-container {
        flex-direction: column;
        padding: 1rem;
    }

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

    .article-container {
        padding: 1.5rem;
    }

    .section {
        padding: 3rem 0;
    }
}