/* 
 * Reallize - Industrial Premium Design System
 * Focus: High-conversion, B2B, Modern Marketplace
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --primary: #22c55e;
    /* Logistic Green */
    --primary-soft: rgba(34, 197, 94, 0.1);
    --secondary: #0f172a;
    /* Slate 900 - Industrial Navy */
    --secondary-soft: rgba(15, 23, 42, 0.05);
    --accent: #f97316;
    /* Alert Orange for CTA */

    /* Neutral Palette */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Tokens */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --navbar-height: 80px;
    --container-max: 1280px;

    /* Leaflet Overrides */
    --map-pin-color: var(--primary);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.font-heading {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    line-height: 1.2;
    color: var(--secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* Layout Components */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.main-content {
    min-height: calc(100vh - var(--navbar-height));
}

/* Navbar (Glassmorphism) */
.navbar {
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
    max-height: var(--navbar-height);
    overflow: hidden;
}

.nav-logo img {
    height: 40px !important;
    width: auto !important;
    max-height: 40px !important;
    object-fit: contain !important;
    display: block !important;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #1e293b;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--bg-main);
    border-color: var(--secondary);
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: #ea580c;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Hero Section Refactor */
.hero {
    position: relative;
    padding: 8rem 0 4rem;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), url('https://reallize-galpoes-connect.lovable.app/assets/hero-warehouse-DYgMFCsI.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 3rem;
    max-width: 540px;
}

.hero-map_preview {
    position: relative;
    height: 500px;
    background: #1e293b;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-xl);
}

/* Global Form UI */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--secondary);
    display: block;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-control:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.form-control::placeholder {
    color: var(--text-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
}

/* Grid for Form Layouts */
.grid-responsive {
    display: grid;
    gap: 1.5rem;
}

.grid-2-cols {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3-cols {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {

    .grid-2-cols,
    .grid-3-cols {
        grid-template-columns: 1fr;
    }
}


/* Search Bar (Floating & Modern) */
.search-container {
    background: white;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    gap: 0.5rem;
    max-width: 100%;
}

.search-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    border-right: 1px solid var(--border);
}

.search-group:last-of-type {
    border-right: none;
}

.search-group input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    color: var(--text-main);
}

/* Property Cards (Rich UI) */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
}

.property-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-soft);
}

.pc-image {
    position: relative;
    height: 240px;
}

.pc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.pc-content {
    padding: 1.5rem;
}

.pc-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.pc-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pc-meta {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-load 1.5s infinite;
}

@keyframes skeleton-load {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .hero-split {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-map-preview {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .search-container {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .search-group {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem 0;
    }

    .nav-links {
        display: none;
    }
}