@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ==========================================================================
   Professional Real Estate Additions - Emerald Theme
   ========================================================================== */

:root {
    /* Emerald Theme Palette */
    --emerald-primary: #1fab89;
    --emerald-dark: #199375;
    --emerald-light: #24cba4;
    --emerald-soft: rgba(31, 171, 137, 0.08);
    --emerald-overlay: rgba(10, 29, 26, 0.85);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1fab89 0%, #199375 100%);
    --gradient-dark: linear-gradient(135deg, #0A1D1A 0%, #102B26 100%);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Text Colors */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    
    /* Backgrounds & Borders */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-soft: #e2e8f0;
    
    /* Shadows & Radii */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(31, 171, 137, 0.2), 0 4px 6px -2px rgba(31, 171, 137, 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-pill: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Overrides */
body {
    font-family: var(--font-body) !important;
    color: var(--text-main);
    background-color: var(--bg-main);
}

h1, h2, h3, h4, h5, h6, .card-heading {
    font-family: var(--font-heading) !important;
    font-weight: 700;
    color: var(--text-main);
}

/* Glassmorphism Utilities */
.bg-glass {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.bg-glass-dark {
    background: rgba(10, 29, 26, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Buttons */
.btn-emerald {
    background: var(--gradient-primary);
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 600 !important;
    font-family: var(--font-heading);
    transition: var(--transition-smooth) !important;
    box-shadow: 0 4px 12px rgba(31, 171, 137, 0.2);
}

.btn-emerald:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: var(--gradient-primary);
}

.btn-emerald-outline {
    background: transparent !important;
    color: var(--emerald-primary) !important;
    border: 2px solid var(--emerald-primary) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.5rem 1.4rem !important;
    font-weight: 600 !important;
    font-family: var(--font-heading);
    transition: var(--transition-smooth) !important;
}

.btn-emerald-outline:hover {
    background: var(--emerald-soft) !important;
    transform: translateY(-2px);
}

/* Topbar Refinements */
.header-area {
    transition: all 0.3s ease;
    z-index: 1040;
}
.header-area.sticky {
    box-shadow: var(--shadow-glass);
}
.navbar-nav .nav-item .nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-main) !important;
    transition: var(--transition-fast);
    position: relative;
}
.navbar-nav .nav-item .nav-link:hover {
    color: var(--emerald-primary) !important;
}

/* Premium Listing Card (Boutique Style) */
.listing-card-pro {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.listing-card-pro:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--emerald-light);
}

.listing-card-pro .card-img-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 65%; /* aspect ratio */
}

.listing-card-pro .card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.listing-card-pro:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.listing-card-pro .badges-wrapper {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.badge-emerald {
    background: var(--emerald-primary);
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.badge-featured {
    background: #ffb020;
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.listing-card-pro .card-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.listing-card-pro .price-tag {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--emerald-primary);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.listing-card-pro .property-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-card-pro .property-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.listing-card-pro .property-features {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-soft);
    padding-top: 1rem;
    margin-top: auto;
}

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

.feature-item i {
    color: var(--emerald-primary);
    font-size: 1.1rem;
}

/* Footer Emerald Theme */
.footer-emerald {
    background: var(--gradient-dark);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.footer-emerald::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.footer-emerald .footer-title {
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-emerald p, .footer-emerald li a {
    color: #94a3b8;
    transition: var(--transition-fast);
}

.footer-emerald li a:hover {
    color: var(--emerald-light);
    padding-left: 5px;
}

/* Hero Search Banner */
.hero-search-area {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glass);
}
.hero-search-area .nav-tabs {
    border: none;
    margin-bottom: -1px;
    position: relative;
    z-index: 2;
}
.hero-search-area .nav-tabs .nav-link {
    border: none;
    background: rgba(255,255,255,0.9);
    border-radius: 12px 12px 0 0;
    padding: 0.8rem 1.5rem;
    color: var(--text-main);
    font-weight: 600;
    font-family: var(--font-heading);
    margin-right: 5px;
    transform: translateY(5px);
    transition: var(--transition-fast);
}
.hero-search-area .nav-tabs .nav-link.active {
    background: #fff;
    color: var(--emerald-primary);
    transform: translateY(0);
}
.hero-search-area .tab-content {
    background: #fff;
    padding: 2rem;
    border-radius: 0 12px 12px 12px;
}

.input-pro {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    background: #f8fafc;
}
.input-pro:focus {
    border-color: var(--emerald-primary);
    box-shadow: 0 0 0 4px var(--emerald-soft);
    background: #fff;
    outline: none;
}

.color-green {
    color: var(--emerald-primary) !important;
}

/* RTL Specific Overrides */
[dir="rtl"] .feature-item {
    flex-direction: row-reverse;
}
[dir="rtl"] .hero-search-area .nav-tabs .nav-link {
    margin-right: 0;
    margin-left: 5px;
}
[dir="rtl"] .footer-emerald li a:hover {
    padding-left: 0;
    padding-right: 5px;
}

/* ==========================================================================
   ATRIUM NATIVE OVERRIDES - FORCING GLOBAL PROFESSIONAL THEME
   ========================================================================== */

/* 1. Global Typography Enforcement */
body, p, a, span, li, div {
    font-family: var(--font-body) !important;
}
h1, h2, h3, h4, h5, h6, .title, .subtitle, .section-title h1, .section-title h2, .section-title p {
    font-family: var(--font-heading) !important;
}

/* 2. Global Button Overrides */
/* Any native button from atrium gets overridden to Emerald design */
.btn-1, .btn-2, .btn-3, .btn-4, .btn-5, .btn-auth, .btn-tabs, .btn-primary, .btn-success {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 600 !important;
    font-family: var(--font-heading) !important;
    transition: var(--transition-smooth) !important;
    box-shadow: 0 4px 12px rgba(31, 171, 137, 0.2) !important;
}

.btn-1:hover, .btn-2:hover, .btn-3:hover, .btn-4:hover, .btn-5:hover, .btn-auth:hover, .btn-tabs:hover, .btn-primary:hover, .btn-success:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-hover) !important;
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
}

/* Exclude the nav-tabs active from getting full gradient if it hurts readability */
.nav-pills .btn-tabs {
    background: transparent !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}
.nav-pills .btn-tabs.active {
    background: var(--emerald-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(31, 171, 137, 0.2) !important;
}

/* 3. Global Input Overrides */
.input-1, .input-2, .input-3, .input-4, .select-1, .select-2, .select-3, .form-control {
    border: 1px solid var(--border-soft) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.8rem 1.2rem !important;
    font-size: 0.95rem !important;
    transition: var(--transition-fast) !important;
    background: #f8fafc !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}

.input-1:focus, .input-2:focus, .input-3:focus, .input-4:focus, .select-1:focus, .select-2:focus, .select-3:focus, .form-control:focus {
    border-color: var(--emerald-primary) !important;
    box-shadow: 0 0 0 4px var(--emerald-soft) !important;
    background: #fff !important;
    outline: none !important;
}

/* 4. Global Listing Card Override */
/* This intercepts the native grid cards and forces our Boutique properties on them */
.listing-card {
    background: var(--bg-card) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-soft) !important;
    overflow: hidden !important;
    transition: var(--transition-smooth) !important;
    box-shadow: var(--shadow-soft) !important;
}

.listing-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-hover) !important;
    border-color: var(--emerald-light) !important;
}

.listing-card .card-body p.title {
    font-family: var(--font-heading) !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

.listing-card .price {
    font-family: var(--font-heading) !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    color: var(--emerald-primary) !important;
}

/* Make image zoom upon hover for the native cards */
.listing-card-img {
    transition: transform 0.5s ease !important;
}
.listing-card:hover .listing-card-img {
    transform: scale(1.05) !important;
}

/* Badge overrides in native cards */
.listing-card .badge {
    background-color: var(--emerald-primary) !important;
    color: #fff !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: var(--radius-pill) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    font-family: var(--font-heading) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

/* Icon features in native cards */
.listing-card .card-body div i {
    color: var(--emerald-primary) !important;
}

/* 5. Search Area Background Overrides */
.search-area-1, .search-area-2, .search-area-3, .search-area-4, .search-area-5 {
    border-radius: var(--radius-lg) !important;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem !important;
    box-shadow: var(--shadow-glass) !important;
}

/* Fix any main nav overrides */
.nav-menu > a {
    font-weight: 600 !important;
}

/* Hide standard topbar if you want a cleaner look, or just style it */
.topbar {
    background-color: var(--emerald-dark) !important;
    color: #fff !important;
}
.topbar a, .topbar span {
    color: #fff !important;
}

/* General Layout Tweaks */
.container {
    max-width: 1320px !important;
}

/* ========================================================================= */
/* NAWY STYLE SEARCH WIDGET
/* ========================================================================= */
.nawy-search-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 0;
    overflow: visible;
}
.nawy-tabs {
    display: flex;
    border-bottom: 1px solid #eaeaea;
}
.nawy-tab {
    flex: 1;
    text-align: center;
    padding: 18px 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: #555;
    cursor: pointer;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
}
.nawy-tab.active {
    color: #005A9C;
}
.nawy-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #005A9C;
}
.nawy-tab:hover {
    background: #f7fafc;
}
.nawy-search-body {
    padding: 24px;
}
.nawy-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 16px;
}
.nawy-input-group i {
    color: #888;
    margin-right: 12px;
    font-size: 1.2rem;
}
.nawy-input-group input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1.05rem;
    font-family: 'Inter', sans-serif;
    color: #333;
}
.nawy-filters-row {
    display: flex;
    gap: 16px;
    align-items: center;
}
.nawy-filter-btn {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 18px;
    background: #fff;
    color: #444;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 500;
}
.nawy-filter-btn:hover {
    border-color: #ccc;
}
.nawy-dropdown-menu {
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eee;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 320px;
    z-index: 1050;
}
.nawy-checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}
.nawy-checkbox-label input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--emerald-primary);
}
.nawy-popover-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
    display: block;
}
.nawy-circle-group {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.nawy-circle-toggle {
    display: none;
}
.nawy-circle-label {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: all 0.2s ease;
}
.nawy-circle-toggle:checked + .nawy-circle-label {
    background: #005A9C;
    color: #fff;
    border-color: #005A9C;
}
.nawy-price-inputs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.nawy-price-inputs input {
    width: 50%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}
.btn-nawy-search {
    background: #005A9C;
    color: white;
    font-weight: 600;
    padding: 12px 0;
    border-radius: 8px;
    flex: 0 0 150px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
    border: none;
}
.btn-nawy-search:hover {
    background: #00457A;
    color: white;
}
/* WHAT ARE YOU LOOKING FOR QUICK LINKS */
.nawy-quick-links-title {
    font-weight: 800;
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.nawy-quick-links-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: none;
}
.nawy-quick-links-row::-webkit-scrollbar { display: none; }
.nawy-quick-card {
    background: #fff;
    border-radius: 12px;
    min-width: 130px;
    padding: 20px 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: #333;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.nawy-quick-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    color: #333;
}
.nawy-quick-icon {
    width: 48px;
    height: 48px;
    background: #f0f4f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #005A9C;
}
.nawy-quick-text {
    font-weight: 700;
    font-size: 0.9rem;
}
@media (max-width: 768px) {
    .nawy-filters-row {
        flex-direction: column;
    }
    .btn-nawy-search {
        flex: 1;
        width: 100%;
        padding: 16px 0;
    }
    .nawy-tab { font-size: 0.95rem; padding: 12px 0; }
}
