/**
 * استایل‌های صفحه تکی شهر (کلیدسازی)
 * طراحی جدید مطابق با طرح مرجع
 */

/* ریست و متغیرهای CSS */
@font-face {
    font-family: 'Dana';
    src: url('../assets/fonts/dana/DanaFaNum-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../assets/fonts/dana/DanaFaNum-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #1d3557; /* آبی تیره مطابق با لوگو */
    --secondary-color: #c69c6d; /* رنگ طلایی مطابق با لوگو */
    --light-color: #f1faee;
    --accent-color: #4CAF50; /* سبز مطابق با سایت اصلی */
    --dark-color: #1d3557;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --keycolor: #D4AF37;
    --keycolor-light: #e9d185;
    --keycolor-dark: #9b802a;
    --dark-text: #333333;
    --light-text: #777777;
    --lighter-text: #999999;
    --lightest-text: #f5f5f5;
    --bg-light: #ffffff;
    --bg-light-alt: #f9f9f9;
    --bg-light-hover: #f5f5f5;
    --border-color: #e0e0e0;
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --font-primary: 'Dana', Tahoma, Arial, sans-serif;
    --card-radius: 16px;
    --info-radius: 8px;
    --button-radius: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.km-single-city {
    font-family: var(--font-primary) !important;
    background-color: #f8f9fa;
    line-height: 1.6;
    color: #333;
    direction: rtl;
    text-align: right;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

.km-single-city h1,
.km-single-city h2,
.km-single-city h3,
.km-single-city h4,
.km-single-city h5,
.km-single-city h6,
.km-single-city p,
.km-single-city span,
.km-single-city a,
.km-single-city button,
.km-single-city input,
.km-single-city textarea,
.km-single-city select,
.km-single-city label,
.km-main-nav,
.km-main-nav a,
.km-mobile-menu,
.km-mobile-menu a,
.km-services-modal,
.km-services-modal * {
    font-family: var(--font-primary) !important;
}

.km-single-city .fa,
.km-single-city .fas,
.km-services-modal .fa,
.km-services-modal .fas,
.km-main-nav .fa,
.km-main-nav .fas,
.km-mobile-menu .fa,
.km-mobile-menu .fas {
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 900 !important;
}

.km-single-city .far,
.km-services-modal .far,
.km-main-nav .far,
.km-mobile-menu .far {
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 400 !important;
}

.km-single-city .fab,
.km-services-modal .fab,
.km-main-nav .fab,
.km-mobile-menu .fab {
    font-family: 'Font Awesome 5 Brands' !important;
    font-weight: 400 !important;
}

/* اضافه کردن ریست برای تگ های وردپرس */
.km-single-city p {
    margin: 0 0 15px;
    padding: 0;
}

.km-single-city h1, 
.km-single-city h2, 
.km-single-city h3, 
.km-single-city h4, 
.km-single-city h5, 
.km-single-city h6 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.km-single-city ul, 
.km-single-city ol {
    margin: 0 20px 15px 0;
    padding: 0;
}

.km-single-city a {
    text-decoration: none;
    transition: var(--transition);
}

.km-single-city a:hover {
    color: var(--primary-color);
}

.km-single-city img {
    max-width: 100%;
    height: auto;
}
div#button-contact-vr {
    display: none !important;
}

.km-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* هدر و تایتل */
.km-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2e5c8a 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.km-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 0;
}

.km-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.km-header-title {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.km-header-desc {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* نان دراپ */
.km-breadcrumb {
    background-color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.km-breadcrumb ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.km-breadcrumb li {
    margin-left: 0.5rem;
    position: relative;
    white-space: nowrap;
}

.km-breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-right: 0.5rem;
    color: #ccc;
}

/* بخش اطلاعات شهر */
.km-city-info-section {
    background-color: #f9fafb; /* bg-gray-50 */
    padding: 32px 24px; /* Adjust padding */
    border-radius: 12px;
    margin-bottom: 40px;
    border: 1px solid #e5e7eb; /* border-gray-200 */
}

.km-city-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Align title and potential elements */
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.km-page-title {
    font-size: 24px; /* text-xl or text-2xl */
    font-weight: 700; /* font-bold */
    color: #854d0e; /* text-amber-800 or similar brown/gold */
    margin: 0;
    position: relative;
    padding-bottom: 8px;
}

/* Optional: Add an underline effect like the image */
.km-page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background-color: #f59e0b; /* text-amber-500 */
    border-radius: 1.5px;
}

.km-city-description {
    color: #4b5563; /* text-gray-600 */
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 32px; /* mb-8 */
}

.km-city-description p {
    margin-top: 0;
    margin-bottom: 0; /* Remove default paragraph margin */
}

/* بخش آمار شهر */
.km-city-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.km-city-stat-item {
    background-color: #ffffff; /* bg-white */
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    border: 1px solid #f3f4f6; /* border-gray-100 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.km-city-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.km-stat-icon {
    font-size: 28px; /* text-3xl */
    color: #4b5563; /* text-gray-600 */
    margin-bottom: 12px;
    display: inline-block;
}

/* Specific icon colors (optional) */
.km-city-stat-item.active-locksmiths .km-stat-icon {
    color: #2563eb; /* text-blue-600 */
}

.km-city-stat-item.services-24hr .km-stat-icon {
    color: #ca8a04; /* text-yellow-600 */
}

.km-city-stat-item.covered-areas .km-stat-icon {
    color: #16a34a; /* text-green-600 */
}

.km-stat-number {
    font-size: 36px; /* text-4xl */
    font-weight: 700; /* font-bold */
    color: #1f2937; /* text-gray-800 */
    display: block;
    margin-bottom: 4px;
    line-height: 1.2;
}

.km-stat-label {
    font-size: 14px; /* text-sm */
    color: #6b7280; /* text-gray-500 */
    display: block;
}

/* دکمه همکاری با ما */
.km-collaboration-container {
    margin-top: 20px;
}

.km-collaborate-btn {
    background: linear-gradient(45deg, var(--keycolor-dark), var(--keycolor));
    color: white;
    border: none;
    border-radius: var(--button-radius);
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.km-collaborate-btn:hover {
    background: linear-gradient(45deg, var(--keycolor), var(--keycolor-light));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* مودال همکاری */
.km-collaboration-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.km-collaboration-modal.active {
    opacity: 1;
    visibility: visible;
}

.km-collaboration-container {
    background-color: white;
    border-radius: var(--card-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.km-collaboration-modal.active .km-collaboration-container {
    transform: translateY(0);
}

.km-collaboration-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.km-collaboration-header h3 {
    margin: 0;
    color: var(--dark-text);
    font-size: 1.5rem;
}

.km-collaboration-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--light-text);
    cursor: pointer;
    transition: var(--transition-fast);
}

.km-collaboration-close:hover {
    color: var(--dark-text);
    transform: scale(1.1);
}

.km-collaboration-content {
    padding: 20px;
}

.km-collaboration-form .km-form-group {
    margin-bottom: 20px;
}

.km-collaboration-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--dark-text);
}

.km-collaboration-form .required {
    color: #e74c3c;
    margin-right: 5px;
}

.km-collaboration-form input,
.km-collaboration-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    transition: var(--transition-fast);
    font-size: 1rem;
}

.km-collaboration-form input:focus,
.km-collaboration-form textarea:focus {
    border-color: var(--keycolor);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.km-submit-btn {
    background: linear-gradient(45deg, var(--keycolor-dark), var(--keycolor));
    color: white;
    border: none;
    border-radius: var(--button-radius);
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-normal);
    width: 100%;
    margin-top: 10px;
}

.km-submit-btn:hover {
    background: linear-gradient(45deg, var(--keycolor), var(--keycolor-light));
    transform: translateY(-2px);
}

.km-form-response {
    margin-top: 15px;
    text-align: center;
}

.km-success-message {
    color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid #2ecc71;
}

.km-error-message {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid #e74c3c;
}

.km-loading {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

/* مودال نقشه */
.km-map-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.km-map-modal.active {
    opacity: 1;
    visibility: visible;
}

.km-map-container {
    background-color: white;
    border-radius: var(--card-radius);
    max-width: 800px;
    width: 90%;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.km-map-modal.active .km-map-container {
    transform: translateY(0);
}

.km-map-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.km-map-header h3 {
    margin: 0;
    color: var(--dark-text);
    font-size: 1.25rem;
}

.km-map-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--light-text);
    cursor: pointer;
    transition: var(--transition-fast);
}

.km-map-close:hover {
    color: var(--dark-text);
    transform: scale(1.1);
}

.km-map-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--card-radius) var(--card-radius);
}

#openstreetmap {
    width: 100%;
    height: 100%;
}

.km-google-directions {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: white;
    color: var(--dark-text);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
    z-index: 500;
}

.km-google-directions i {
    margin-left: 8px;
    color: #4285F4;
}

.km-google-directions:hover {
    background-color: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* نمایش/مخفی سازی خدمات بیشتر */
.km-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.km-service-tag.service-hidden {
    display: none;
}

.km-service-tag.service-hidden.visible {
    display: inline-block;
}

.km-show-more-services {
    color: var(--keycolor);
    font-size: 0.9rem;
    margin-top: 8px;
    cursor: pointer;
    display: inline-block;
    transition: var(--transition-fast);
}

.km-show-more-services:hover {
    color: var(--keycolor-dark);
    text-decoration: underline;
}

/* فیلتر محله‌ها */
.km-filter-section {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.km-filter-container {
    display: flex;
    flex-direction: column;
}

.km-filter-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.km-neighborhood-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.km-neighborhood-btn {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.km-neighborhood-btn:hover {
    background-color: #eaeaea;
}

.km-neighborhood-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* بخش کلیدسازی‌ها */
.km-locksmiths-section {
    margin-bottom: 2rem;
}

.km-section-title {
    font-size: 24px;
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

/* مودال نقشه */
.km-map-container {
    width: 100%;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
}

.km-map-error {
    padding: 20px;
    background-color: #f8d7da;
    color: #721c24;
    text-align: center;
    border-radius: 5px;
}

.km-map-address {
    padding: 20px;
    background-color: #f8f9fa;
    color: #333;
    text-align: center;
    border-radius: 5px;
}

/* طراحی جدید کارت کلیدسازی */
.km-locksmith-card {
    background-color: white;
    border-radius: var(--card-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.km-locksmith-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.km-gold-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 100%;
    background-color: var(--keycolor);
    border-top-right-radius: var(--card-radius);
    border-bottom-right-radius: var(--card-radius);
}

.km-pattern-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' transform='rotate(45)'%3E%3Cpath d='M10,30 L20,20 L25,25 L20,30 L25,35 L20,40 L10,30' fill='none' stroke='%23e0e0e0' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

.km-card-header {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.km-service-badge {
    background-color: #e74c3c;
    color: white;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

.km-service-badge i {
    margin-left: 6px;
}

.km-locksmith-info {
    text-align: center;
}

.km-locksmith-name {
    color: var(--keycolor);
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.km-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.km-rating-stars {
    color: var(--keycolor);
}

.km-rating-count {
    color: #777;
    font-size: 14px;
}

.km-key-icon {
    color: var(--keycolor);
    font-size: 32px;
    background-color: rgba(218, 165, 32, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.km-card-content {
    padding: 25px;
    position: relative;
    z-index: 1;
}

.km-contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.km-info-item {
    display: flex;
    align-items: flex-start;
}

.km-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 15px;
    flex-shrink: 0;
}

.km-info-icon.address {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.km-info-icon.phone {
    background-color: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.km-info-icon.hours {
    background-color: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.km-info-text h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.km-info-text p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 5px;
}

.km-services-section {
    margin-bottom: 25px;
}

.km-services-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.km-service-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    display: inline-block;
    margin-bottom: 5px;
}

.km-service-tag.key {
    background-color: rgba(241, 196, 15, 0.2);
}

.km-service-tag.lock {
    background-color: rgba(230, 126, 34, 0.2);
}

.km-service-tag.car {
    background-color: rgba(52, 152, 219, 0.2);
}

.km-service-tag.security {
    background-color: rgba(155, 89, 182, 0.2);
}

.km-service-tag.door {
    background-color: rgba(46, 204, 113, 0.2);
}

.km-service-tag.remote {
    background-color: rgba(41, 128, 185, 0.2);
}

.km-service-tag.safe {
    background-color: rgba(192, 57, 43, 0.2);
}

.km-service-tag.alarm {
    background-color: rgba(211, 84, 0, 0.2);
}

.km-locksmith-actions {
    display: flex;
    gap: 15px;
}

.km-action-btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.km-action-btn i {
    margin-left: 8px;
}

.km-map-btn {
    background-color: #ecf0f1;
    color: #333;
    border: 1px solid #ddd;
}

.km-map-btn:hover {
    background-color: #ddd;
}

.km-call-btn {
    background-color: #2c3e50;
    color: white;
    border: none;
    text-decoration: none;
}

.km-call-btn:hover {
    background-color: #34495e;
    color: white;
    text-decoration: none;
}

/* استایل‌های جدید برای لودر */
.km-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.km-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ddd;
    border-radius: 50%;
    border-top-color: var(--keycolor);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* نمایش پیام "کلیدسازی وجود ندارد" */
.km-no-locksmiths {
    background-color: #f8f9fa;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 20px;
}

.km-no-locksmiths p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* بخش خدمات */
.km-services-about-section {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.km-section-title {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.km-section-title h2 {
    font-size: 1.8rem;
    margin-bottom: 0;
    color: var(--secondary-color);
}

.km-section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background-color: #e1e1e1;
    margin-right: 1rem;
}

.km-services-about-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.km-services-about-section ul {
    list-style-type: disc;
    margin-right: 1.5rem;
    margin-bottom: 1.5rem;
}

.km-services-about-section li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* بخش سوالات متداول */
.km-faq-container {
    margin: 30px 0;
    width: 100%;
}

.km-faq-item {
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.km-faq-question {
    position: relative;
    padding: 15px 40px 15px 20px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.km-faq-question:hover {
    background-color: #f0f0f0;
}

/* Removing the right-side + sign */
.km-faq-question:after {
    content: none;
    display: none;
}

.km-faq-item.active {
    background-color: #f5f5f5;
}

.km-faq-item.active .km-faq-question {
    background-color: #e8e8e8;
}

.km-faq-item.active .km-faq-question:after {
    content: none;
    display: none;
}

.km-faq-answer {
    overflow: hidden;
    height: 0;
    padding: 0;
    transition: height 0.4s ease, padding 0.4s ease;
    line-height: 1.6;
}

/* Make sure focus states are visible for accessibility */
.km-faq-question:focus {
    outline: 2px solid #4a90e2;
    outline-offset: -2px;
}

/* Add support for RTL languages */
html[dir="rtl"] .km-faq-question:after {
    right: auto;
    left: 20px;
}

/* محتوای اصلی شهر */
.km-city-content {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.km-city-content p,
.km-city-content ul,
.km-city-content ol,
.km-city-content h1,
.km-city-content h2,
.km-city-content h3,
.km-city-content h4,
.km-city-content h5,
.km-city-content h6 {
    margin-bottom: 15px;
}

.km-city-content h2 {
    font-size: 22px;
    color: var(--secondary-color);
}

.km-city-content h3 {
    font-size: 20px;
    color: var(--secondary-color);
}

.km-city-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.km-city-content a:hover {
    text-decoration: underline;
}

.km-city-content img,
.km-city-content figure {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 10px;
}

.km-city-content figcaption {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 5px;
}

/* صفحه بندی */
.km-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.km-pagination-list {
    display: flex;
    gap: 10px;
}

.km-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 5px;
    background-color: white;
    color: var(--dark-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.km-pagination-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.km-pagination-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* واکنش‌گرایی */
@media (max-width: 992px) {
    .km-contact-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .km-header-title {
        font-size: 1.8rem;
    }
    
    .km-header-desc {
        font-size: 1rem;
    }
    
    .km-container {
        padding: 0 15px;
    }
    
    .km-city-info-section {
        padding: 20px 15px;
    }
    
    .km-page-title {
        font-size: 20px;
    }
    
    .km-city-stats {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .km-city-stat-item {
        padding: 15px 10px;
    }
    
    .km-stat-icon {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    /* Make locksmith cards responsive */
    .km-new-locksmith-card {
        margin-bottom: 15px;
    }
    
    .km-card-header {
        padding: 15px 12px;
        flex-wrap: wrap;
    }
    
    .km-locksmith-name {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .km-locksmith-info {
        width: 100%;
        margin-top: 8px;
    }
    
    .km-contact-section {
        padding: 12px;
    }
    
    .km-info-item {
        margin-bottom: 12px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .km-info-icon {
        margin-bottom: 8px;
        margin-left: 0;
    }
    
    /* Fix for neighborhoods filter */
    .km-neighborhoods-filter {
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 0;
        margin-bottom: 15px;
    }
    
    .km-neighborhood-btn {
        margin: 0 5px 5px 0;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Services modal fixes */
    .km-modal-content {
        width: 95%;
        max-width: 100%;
        margin: 10px auto;
        padding: 15px;
    }
    
    .km-modal-header {
        padding: 10px 15px;
    }
    
    .km-modal-body {
        padding: 10px 15px;
    }
    
    /* Map modal adjustments */
    #map-container {
        height: 300px;
    }
    
    /* FAQ section */
    .km-faq-item {
        padding: 12px;
    }
    
    .km-faq-question {
        font-size: 16px;
    }
    
    .km-faq-answer {
        font-size: 14px;
        padding: 10px;
    }
    
    /* Footer section */
    .km-city-footer {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .km-header-title {
        font-size: 1.5rem;
    }
    
    .km-city-stats {
        grid-template-columns: 1fr;
    }
    
    .km-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .km-lock-icon {
        margin-left: 0;
        margin-bottom: 10px;
    }
    
    .km-locksmith-info {
        align-items: center;
    }
    
    .km-24-badge {
        margin-top: 8px;
    }
    
    /* Fix for services display */
    .km-services-tags {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .km-service-tag {
        margin: 3px;
    }
    
    /* Fix for footer buttons */
    .km-card-footer {
        flex-direction: column;
    }
    
    .km-card-btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Kilid Market additive upgrade components */
:root {
    --km-upgrade-bg: #F5F5F7;
    --km-upgrade-surface: #FFFFFF;
    --km-upgrade-soft: #FAFAFB;
    --km-upgrade-text: #111111;
    --km-upgrade-muted: #6B7280;
    --km-upgrade-border: #E5E7EB;
    --km-upgrade-gold: #C9A227;
    --km-upgrade-navy: #0F172A;
    --km-upgrade-success: #22C55E;
    --km-upgrade-info: #3B82F6;
    --km-upgrade-error: #EF4444;
    --km-upgrade-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.km-city-ad-section {
    margin: 0 0 24px;
}

.km-city-stats {
    display: none !important;
}

.km-city-ad-banner {
    width: 100%;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    background: var(--km-upgrade-surface);
    cursor: pointer;
    box-shadow: var(--km-upgrade-shadow);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.km-city-ad-banner:hover,
.km-city-ad-banner:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
    outline: none;
}

.km-city-ad-banner img {
    width: 100%;
    display: block;
    aspect-ratio: 6.1 / 1;
    object-fit: cover;
}

.km-collaborate-btn {
    position: fixed !important;
    right: 20px !important;
    left: auto !important;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1000 !important;
    min-height: 52px;
    padding: 0 20px !important;
    gap: 8px;
    border-radius: 18px !important;
    background: var(--km-upgrade-navy) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22) !important;
}

.km-collaborate-btn:hover,
.km-collaborate-btn:focus-visible {
    color: #fff !important;
    background: #111827 !important;
    transform: translateY(-2px);
}

.km-card-title-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.km-locksmith-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.km-trust-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #F8FAFC;
    border: 1px solid var(--km-upgrade-border);
    color: var(--km-upgrade-text);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.km-trust-badge i {
    font-size: 17px;
}

.km-trust-badge-exact_address i {
    color: var(--km-upgrade-info);
}

.km-trust-badge-km_blue_tick i,
.km-trust-badge-identity_verified i {
    color: var(--km-upgrade-info);
}

.km-trust-badge-business_license i {
    color: var(--km-upgrade-success);
}

.km-trust-badge-city_top_specialist i {
    color: var(--km-upgrade-gold);
}

.km-trust-badge::after {
    content: attr(title);
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    width: max-content;
    max-width: 230px;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--km-upgrade-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.7;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
    z-index: 10;
    pointer-events: none;
}

.km-trust-badge:hover::after,
.km-trust-badge:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.km-service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.km-service-tag {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #F8FAFC;
    color: #374151;
    font-size: 12px;
}

.km-btn-review,
.km-btn-reviews {
    background: #F8FAFC;
    color: var(--km-upgrade-navy);
    border: 1px solid var(--km-upgrade-border);
}

.km-btn-review:hover,
.km-btn-reviews:hover {
    background: #EEF2F7;
    color: var(--km-upgrade-navy);
}

.km-services-modal {
    padding: 16px;
    backdrop-filter: blur(6px);
}

.km-services-modal.active .km-modal-content {
    transform: translateY(0);
    opacity: 1;
}

.km-modal-content {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--km-upgrade-shadow);
    transform: translateY(12px);
    opacity: 0.98;
}

.km-modal-lead {
    color: var(--km-upgrade-muted);
    line-height: 1.9;
    margin-bottom: 18px;
}

.km-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.km-form-group input,
.km-form-group textarea,
.km-form-group select,
.km-collaboration-form input,
.km-collaboration-form textarea {
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid var(--km-upgrade-border);
    background: var(--km-upgrade-soft);
    color: var(--km-upgrade-text);
}

.km-form-group textarea,
.km-collaboration-form textarea {
    min-height: 112px;
    resize: vertical;
}

.km-form-group input:focus,
.km-form-group textarea:focus,
.km-form-group select:focus,
.km-collaboration-form input:focus,
.km-collaboration-form textarea:focus {
    border-color: var(--km-upgrade-gold);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.12);
    outline: none;
}

.km-form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--km-upgrade-text);
}

.km-form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 4px;
    accent-color: var(--km-upgrade-navy);
    flex: 0 0 auto;
}

.km-form-check-card {
    padding: 14px;
    border: 1px solid var(--km-upgrade-border);
    border-radius: 18px;
    background: #F8FAFC;
}

.km-form-check-card label {
    margin: 0;
    font-weight: 800;
}

.km-form-check-card span {
    display: block;
    margin-top: 4px;
    color: var(--km-upgrade-muted);
    font-size: 13px;
    font-weight: 500;
}

.km-inline-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--km-upgrade-info);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.km-btn:disabled,
.km-submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    transform: none !important;
}

.km-rules-content {
    color: #374151;
    line-height: 2;
}

.km-hidden-field {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.km-map-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #F8FAFC;
    border: 1px solid var(--km-upgrade-border);
}

.km-map-summary-card {
    text-align: center;
    padding: 24px;
    color: var(--km-upgrade-text);
}

.km-map-summary-card i {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 18px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--km-upgrade-info);
    font-size: 24px;
}

.km-map-summary-card h3 {
    margin: 0 0 8px;
    color: var(--km-upgrade-text);
}

.km-review-item {
    padding: 16px;
    border: 1px solid var(--km-upgrade-border);
    border-radius: 18px;
    background: #fff;
    margin-bottom: 12px;
}

.km-review-item-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--km-upgrade-text);
}

.km-review-item-header span {
    color: var(--km-upgrade-muted);
    font-size: 12px;
}

.km-review-stars {
    display: flex;
    gap: 4px;
    margin: 8px 0;
    color: #D1D5DB;
}

.km-review-stars .active {
    color: var(--km-upgrade-gold);
}

.km-review-text {
    color: #374151;
    line-height: 1.9;
}

.km-review-text p {
    margin: 0;
}

.km-modal-empty {
    text-align: center;
    color: var(--km-upgrade-muted);
    padding: 24px 8px;
}

@media (max-width: 768px) {
    .km-city-ad-banner {
        border-radius: 16px;
    }

    .km-city-ad-banner img {
        aspect-ratio: 3.4 / 1;
    }

    .km-action-buttons {
        grid-template-columns: 1fr;
        display: grid;
        gap: 10px;
    }

    .km-collaborate-btn {
        right: 16px !important;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        min-height: 50px;
    }

    .km-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .km-trust-badge {
        min-height: 36px;
    }

    .km-modal-content {
        border-radius: 22px;
    }
}
