body {
    padding-top: 0;
    /* font-family: 'Shabnam','Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
} 

/* 📋 تنظیم فونت برای تمام المان‌ها از جمله فرم‌ها */
body, input, select, textarea, button {
    font-family:  'Shabnam','Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
 

/* ===========================
   Hero Section
=========================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* ################################### */

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 360px;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}


/* Main Content */
.main-content {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}


/* Empty State */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 3rem;
}

.empty-state-content {
    text-align: center;
    max-width: 500px;
}

.empty-state-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 3rem;
    box-shadow: var(--shadow-heavy);
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.empty-state-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}



/* Search Sidebar */
.search-sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
}


/* Advanced Search */
.advanced-search {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow-medium);
    position: relative;
    height: 100%; /* match map height on desktop */
    display: flex;
    flex-direction: column;
}

.advanced-search .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0.75rsem;
    width: 100%;
    align-items: end;
    overflow: auto; /* scroll if taller than container */
}

.advanced-search .input-group {
    grid-column: 1 / -1; /* full width */
}

.advanced-search .input-group.input-text {
    grid-column: 1 / -1; /* full width */
}

@media (max-width: 1024px) {
    /* .advanced-search { height: 300px; }  */
    .advanced-search {
        height: auto; /* ارتفاع خودکار */
    }
}

@media (max-width: 640px) {
    .advanced-search .form-row { grid-template-columns: 1fr; }
    .advanced-search .input-group { grid-column: 1 / -1; }
}

.advanced-search label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
}

.advanced-search select,
.advanced-search input[type="text"] {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    color: var(--text-dark);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}



/* Ensure groups and controls truly stretch to full width */
.advanced-search .input-group,
.advanced-search .input-group > * {
    width: 100%;
}

.advanced-search select:hover,
.advanced-search input[type="text"]:hover {
    border-color: #cbd5e0;
}

.advanced-search select:focus,
.advanced-search input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.advanced-search .search-btn {
    grid-column: span 12;
    margin-top: 0.25rem;
}





/* ===========================
   Search Sidebar
=========================== */

/* فرم طبیعی بدون flex:1 */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.search-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.search-form select,
.search-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    appearance: none;
    transition: all 0.3s;
}

.search-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234a5568' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 14px;
    padding-left: 40px;
    padding-right: 15px;
}

.search-btn {
    background-color: #4e73df;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background-color: #26429c;
}

/* Force full width */
.search-form .form-group,
.search-form .search-btn {
    width: calc(100% - 2px);
    box-sizing: border-box;
}



.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-medium);
}

.search-header h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.search-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group label i {
    color: var(--primary-color);
    width: 16px;
}

.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group select:disabled {
    background: var(--bg-light);
    color: var(--text-light);
    cursor: not-allowed;
}

.search-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-dark-color);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.search-btn:active {
    transform: translateY(0);
}



.results-container {
    display: grid;
    grid-template-rows: 400px 1fr;
    gap: 0;
    height: 100%;

    /* display: grid;
    grid-template-columns: 1.3fr 1fr; 
    gap: 1.5rem;
    align-items: start; */
}

.map-section {
    position: relative;
    background: var(--bg-light);
}

.map-header {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-header h3 {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-controls {
    display: flex;
    gap: 0.5rem;
}

.map-control-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.map-control-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.map-container {
    height: 100%;
    position: relative;
}


#map {
    height: 100%;
    width: 100%;
}


.leaflet-container {
    font-family: inherit;
}

.map-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    z-index: 100;
}



.map-placeholder-content {
    text-align: center;
    color: var(--text-light);
}

.map-placeholder-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

.map-placeholder-content h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.results-section {
    padding: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.results-header h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-count {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}



/* کارت کسب و کار */
.businesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.business-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.business-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.business-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-light);
    position: relative;
}

.business-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
}


.business-image::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
}

.business-info {
    padding: 1rem;
}

.business-name {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.business-type {
    display: inline-block;
    background: var(--gradient-accent);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.business-address,
.business-phone {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.business-address i,
.business-phone i {
    color: var(--primary-color);
    width: 14px;
}

.business-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.7rem;
    transition: all 0.3s ease;
    margin-top: 0.7rem;
}

.business-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    text-decoration: none;
    color: white;
}



/* کارت کسب و کار در نقشه */
.compact-popup {
    direction: rtl;
    text-align: right;
    font-family:  'Shabnam','Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: px;
    line-height: 1.2; 
    padding: 3px;
    width: fit-content;
    min-width: 120px;   
    max-width: 220px;   
    display: inline-block;
    white-space: normal; 
    word-wrap: break-word; 
}

.compact-popup .popup-title {
    font-size: 14px;
    margin: 0 0 4px 0;
    font-weight: bold;
}

.compact-popup .popup-line {
    margin: 0 0 2px 0;
}

.compact-popup .popup-button {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 8px;
    font-size: 12px;
    text-decoration: none;
    background-color: #4e73df;
    color: #fff;
    border-radius: 4px;
    transition: background-color 0.2s;
    white-space: nowrap; /* دکمه کوتاه بماند */
}

.compact-popup .popup-button:hover {
    background-color: #2e59d9;
}




.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* padding: 1rem; */
    background: var(--bg-light);
    border-radius: 10px;
    color: var(--text-dark);
    font-weight: 500;
}

.feature-item i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* Loading and Error States */
/* .loading-state,
.error-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
} */
.loading-state,
.error-state,
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: #fff;
    color: var(--text-light);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}


.loading-state i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-state i {
    font-size: 3rem;
    color: #e53e3e;
    margin-bottom: 1rem;
}

.no-results i {
    color: #a0aec0;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hidden */
.hidden {
    display: none !important;
}



.retry-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Business Markers */
.business-marker {
    background: var(--gradient-primary);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
}


.business-marker.highlight {
    background: var(--gradient-accent);
    transform: scale(1.2);
    box-shadow: var(--shadow-heavy);
}


/* Responsive Design */
@media (max-width: 1200px) {
    .main-layout { grid-template-columns: 1fr; gap: 1rem; }
    .search-sidebar { position: static; order: 2; }
    .main-content { order: 1; }
    .results-container { 
        grid-template-columns: 1fr; 
        grid-template-rows: auto auto; 
    }
}

/* Sticky فقط در دسکتاپ */
@media (min-width: 993px) {
    .search-sidebar {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
    .map-container {
        height: 400px;
    }
}

/* موبایل و تبلت */
@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }

    .search-sidebar {
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
        width: 100%;
        margin-bottom: 20px;
    }

    .businesses-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .map-container {
        height: 350px;
    }
}



@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .businesses-grid {
        grid-template-columns: 1fr;
    }
    
    .empty-state-features {
        grid-template-columns: 1fr;
    }

    .search-form {
        gap: 0;
    }
    .search-form .form-group {
        margin-bottom: 18px;
    }

    .map-container {
        height: 350px;
    }


}


@media (max-width: 576px) {
    .businesses-grid {
        grid-template-columns: 1fr;
    }

    .map-container {
        height: 350px;
    }
}



/* 🌆 Footer base */
footer {
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
    padding-top: 3rem;
    margin-top: 4rem;
    font-family: "IRANSans", "Vazirmatn", sans-serif;
    direction: rtl;
    color: #333;
}
  
footer .container-4xl-w {
max-width: 1300px;
margin: 0 auto;
padding: 0 1.5rem;
}

/* 🧱 ستون‌های بالای فوتر */
footer .flex.flex-wrap.w-full {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 3rem;
gap: 2rem;
}

footer .flex.flex-wrap.w-full > div {
flex: 1 1 250px;
display: flex;
flex-direction: column;
align-items: flex-start;
}

/* تیتر ستون‌ها */
footer p.text-h5,
footer h4.text-h5 {
font-weight: 700;
color: #222;
font-size: 1.1rem;
margin-bottom: 0.8rem;
}

/* لینک‌ها */
footer a {
display: block;
margin-bottom: 0.4rem;
color: #666;
font-size: 0.95rem;
text-decoration: none;
transition: color 0.2s ease;
}

footer a:hover {
color: #000;
}

/* 🌐 شبکه‌های اجتماعی یا آیکن‌ها */
footer .flex.items-center {
display: flex;
flex-direction: row; /* آیکن‌ها کنار هم */
align-items: center;
justify-content: flex-start;
gap: 1rem; /* فاصله بین آیکن‌ها */
}

/* آیکن‌ها در پایین فوتر */
footer .border-complete-200 {
border: 1px solid #ddd;
border-radius: 8px;
}

/* 🧾 توضیحات پایین */
footer .seo {
font-size: 0.9rem;
color: #555;
line-height: 1.8;
max-width: 800px;
}

footer .seo h1 {
font-size: 1.1rem;
font-weight: 700;
margin-bottom: 0.6rem;
color: #111;
}

/* 📱 ناحیه آیکن‌ها و توضیحات */
footer .border-complete-t {
border-top: 1px solid #ddd;
display: flex;
justify-content: space-between;
align-items: flex-start;
flex-wrap: wrap;
padding: 2rem 0;
gap: 2rem;
}

/* متن در سمت راست */
footer .border-complete-t .grow {
flex: 1 1 60%;
}

/* آیکن‌ها در سمت چپ */
footer .border-complete-t .w-full {
flex: 1 1 35%;
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
gap: 1rem;
}

/* ⚖️ کپی‌رایت */
footer .text-caption {
font-size: 0.85rem;
text-align: center;
color: #777;
border-top: 1px solid #ddd;
padding-top: 1.5rem;
margin-top: 2rem;
line-height: 1.8;
}

/* 💡 ریسپانسیو موبایل */
@media (max-width: 1024px) {
footer .border-complete-t {
    flex-direction: column;
    align-items: flex-start;
}

footer .border-complete-t .w-full {
    justify-content: flex-start;
    margin-top: 1rem;
}
}

@media (max-width: 768px) {
footer .flex.flex-wrap.w-full {
    flex-direction: column;
    gap: 2rem;
}

footer .flex.flex-wrap.w-full > div {
    width: 100%;
}

footer .seo {
    margin-top: 2rem;
}

footer .border-complete-t .w-full {
    flex-wrap: wrap;
    justify-content: center;
}
}






