/* === General Styles & Variables === */
:root {
    --primary-color: #2c3e50; /* Navy Blue */
    --secondary-color: #1abc9c; /* Turquoise */
    --light-gray: #f4f6f9;
    --dark-gray: #34495e;
    --text-color: #555;
    --white-color: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Vazirmatn', sans-serif;
    margin: 0;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
}

button, input, select, textarea {
    font-family: 'Vazirmatn', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

.btn {
    padding: 12px 25px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: #16a085;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.3);
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 8px auto 0;
    border-radius: 2px;
}

/* === Header === */
.site-header {
    background-color: var(--white-color);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header .logo {
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.site-header .logo i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-left: 10px;
}

.site-header .logo h1 {
    margin: 0;
    font-size: 1.5rem;
}

.site-header .main-nav a {
    margin-right: 25px;
    font-weight: 500;
    color: var(--dark-gray);
}

/* === Main Content & Sections === */
.site-main {
    padding: 20px 0;
}

.search-trigger-section {
    text-align: center;
    background: var(--white-color);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.search-trigger-section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0;
}

.properties-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.properties-section {
    background-color: var(--white-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.properties-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#search-results-section .properties-list-single-column {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* === Compact Property Card (Corrected) === */
.property-card {
    background-color: var(--white-color);
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 15px 20px; 
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    border-color: var(--secondary-color);
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-date {
    font-size: 0.8rem;
    color: #95a5a6;
    flex-shrink: 0;
    margin-right: 10px;
}

.card-info-item {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: var(--text-color);
}

.card-info-item i {
    margin-left: 8px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.card-info-item.price {
    font-weight: bold;
    color: var(--primary-color);
}

.card-info-item.price strong {
    font-weight: 700;
}

.card-badges {
    display: flex;
    gap: 8px;
}

.badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 50px;
    font-weight: 500;
}

.exchange-badge {
    background-color: #e8f4fd;
    color: #3498db;
}

.exchange-badge i {
    margin-left: 4px;
}

.property-card .btn-primary {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.property-card-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius);
    height: 120px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.no-results-message {
    text-align: center;
    padding: 40px;
}

/* === Footer === */
.site-footer {
    background-color: var(--primary-color);
    color: #bdc3c7;
    padding: 20px 0;
    text-align: center;
}

.site-footer h3 {
    color: var(--white-color);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.site-footer .contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}

.site-footer .contact-info span {
    font-size: 1.1rem;
}

.site-footer .contact-info i {
    margin-left: 8px;
    color: var(--secondary-color);
}

.site-footer .social-media a {
    color: #bdc3c7;
    font-size: 1.5rem;
    margin: 0 15px;
}

.site-footer .social-media a:hover {
    color: var(--secondary-color);
}

/* === Floating Call Button === */
.floating-call-btn {
    position: fixed;
    top: 30%; /* انتقال به وسط عمودی */
    left: 20px;
    transform: translateY(-50%); /* تنظیم دقیق موقعیت برای مرکزیت کامل */
    width: 60px;
    height: 60px;
    background-color: dodgerblue;
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.4);
    z-index: 100;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(52, 152, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}
/* === Modal Styles === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.modal-close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

#advanced-search-form .details-section {
    margin-bottom: 25px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 20px;
}
#advanced-search-form .details-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
#advanced-search-form h4 {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 15px;
}
#advanced-search-form .details-section,
#request-property-form .details-section {
    margin-bottom: 25px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 20px;
}
#advanced-search-form .details-section:last-child,
#request-property-form .details-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
#advanced-search-form h4,
#request-property-form h4 {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 15px;
}
#advanced-search-form .details-grid,
#request-property-form .details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
#advanced-search-form .form-group,
#request-property-form .form-group {
    display: flex;
    flex-direction: column;
}
#advanced-search-form .form-group label,
#request-property-form .form-group label {
    margin-bottom: 8px;
    font-weight: 500;
}
#advanced-search-form .form-group input,
#advanced-search-form .form-group select,
#request-property-form .form-group input,
#request-property-form .form-group select {
    width: 90%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
#advanced-search-form .range-input-group,
#request-property-form .range-input-group {
    display: flex;
    gap: 10px;
}
#advanced-search-form .checkbox-group,
#request-property-form .checkbox-group {
    flex-direction: row;
    align-items: center;
}
#advanced-search-form .checkbox-group input,
#request-property-form .checkbox-group input {
    width: auto;
    margin-left: 10px;
}

.modal-header-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.btn-modal-save {
    background-color: var(--secondary-color);
    color: var(--white-color);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    min-width: 200px;
    font-size: 1.2rem;
}

.modal-content.modal-content-large {
    max-width: 900px; /* این خط اطمینان می‌دهد که مودال‌های بزرگ‌تر، عرض بیشتری داشته باشند */
}

#submit-property-modal.active {
    z-index: 1005; /* اطمینان از اینکه مودال ثبت ملک روی دیگر عناصر نمایش داده شود */
}

.modal-header-actions .btn-modal-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    min-width: unset; /* بازنویسی حداقل عرض برای این دکمه */
}
.modal-header-actions .btn-modal-secondary:hover {
    background-color: #5a6268;
}

/* New styles for the property submission form */
#submit-property-form.add-property-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
    gap: 20px; /* Spacing between form groups */
}

#submit-property-form.add-property-form .form-group {
    margin-bottom: 0; /* Reset margin as gap handles spacing */
    display: flex; /* Make form-group a flex container for label and input */
    flex-direction: column;
}

#submit-property-form.add-property-form .form-group label {
    margin-bottom: 8px; /* Space between label and input */
    font-size: 0.95rem;
    font-weight: 500; /* Slightly bolder labels */
    color: var(--dark-gray);
}

#submit-property-form.add-property-form input:not([type="radio"]),
#submit-property-form.add-property-form select,
#submit-property-form.add-property-form textarea {
    width: 100%; /* Fill the grid column */
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    transition: border-color 0.3s, box-shadow 0.3s;
}

#submit-property-form.add-property-form input:not([type="radio"]):focus,
#submit-property-form.add-property-form select:focus,
#submit-property-form.add-property-form textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(26, 188, 156, 0.2);
    outline: none;
}

#submit-property-form.add-property-form textarea {
    height: 100px; /* Default height for textareas */
    resize: vertical; /* Allow vertical resizing */
}

#submit-property-form.add-property-form .transaction-type {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Space between radio button groups */
    margin-top: 5px;
}

#submit-property-form.add-property-form .transaction-type label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: normal; /* Override the general label font-weight */
    color: var(--text-color);
    cursor: pointer;
}

#submit-property-form.add-property-form .transaction-type input[type="radio"] {
    margin-left: 8px; /* Space between radio button and its label text */
    width: auto; /* Reset width for radio buttons */
}

#submit-property-form.add-property-form .form-group.full-width {
    grid-column: 1 / -1; /* Span across all columns */
}

/* Specific styles for price fields to ensure they align correctly */
#submit-property-form.add-property-form .price-field {
    display: flex; /* Ensure price fields are flex for label/input */
    flex-direction: column;
}

/* Ensure double-width class works for pricing description */
#submit-property-form.add-property-form .double-width {
    grid-column: span 2; /* Span two columns */
}

/* Adjustments for the checkbox group at the bottom */
#submit-property-form.add-property-form .form-group.full-width[style*="flex-direction: row"] {
    flex-direction: row !important; /* Ensure it remains row for checkboxes */
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

#submit-property-form.add-property-form .form-group.full-width[style*="flex-direction: row"] label {
    margin-bottom: 0;
}

#submit-property-form.add-property-form .form-group.full-width[style*="flex-direction: row"] input[type="checkbox"] {
    width: auto;
    margin-left: 10px;
}

@media (max-width: 600px) {
    #submit-property-form.add-property-form {
        grid-template-columns: 1fr; /* Single column on smaller screens */
    }
    #submit-property-form.add-property-form .double-width {
        grid-column: 1 / -1; /* Full width on small screens */
    }
}

.image-modal .modal-content {
    max-width: 700px;
    z-index: 1011; /* اطمینان از اینکه مودال تصاویر روی مودال ثبت ملک نمایش داده شود */
}

.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-upload-box {
    border: 2px dashed #bdc3c7;
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}

.image-upload-box:hover {
    border-color: var(--secondary-color);
    background-color: #f9f9f9;
}

.image-upload-box i {
    font-size: 2.5rem;
    color: #95a5a6;
}

.image-upload-box p {
    margin: 10px 0 5px;
    font-size: 1rem;
    color: var(--dark-gray);
}

.image-upload-box small {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.image-preview-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    min-height: 100px;
}

.image-preview-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    aspect-ratio: 1 / 1;
}

.image-preview-container.new-image {
    border: 2px solid #27ae60;
}

.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btn-delete-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(231, 76, 60, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1rem;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-delete-image:hover {
    background-color: #e74c3c;
}

/* Styles for the new Location Link Modal */
.location-link-modal-overlay {
    z-index: 1010; /* Higher than the main submit modal (1005) */
}

.location-link-modal-overlay .modal-content {
    max-width: 500px;
}

.location-link-modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

.location-link-modal-body p.instructions {
    text-align: right;
    line-height: 1.8;
    margin-bottom: 10px;
}

.location-link-modal-body .btn,
.location-link-modal-body .btn-modal-save {
    width: 100%;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
    font-size: 1rem;
    min-width: unset;
}
.location-link-modal-body a.btn{
    text-align: center;
}
.location-link-modal-body #location-url-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    direction: ltr;
    text-align: left;
}

.location-link-modal-body .error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none; /* Hidden by default */
}

/* === Property Details Page Styles (Corrected) === */
.details-container {
    background-color: var(--white-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.details-header {
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.details-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 0;
}

.property-code-box {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 8px 15px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 15px;
    font-size: 0.9rem;
    border: 2px solid var(--white-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.property-code-box span {
    margin-left: 8px;
}

.property-code-box strong {
    font-size: 1.1rem;
    font-weight: bold;
}

.details-image-gallery-trigger {
    text-align: center;
    margin-bottom: 40px;
}

.details-primary-grid {
    display: grid;
    gap: 5px; /* کاهش فاصله بین آیتم‌ها */
    margin-bottom: 20px;
    grid-template-columns: repeat(2, 1fr); /* پیش‌فرض موبایل: ۲ ستون */
}

.details-primary-grid .grid-item {
    background-color: var(--light-gray);
    padding: 15px 10px; /* کاهش پدینگ داخلی برای فشرده‌سازی */
    border-radius: var(--border-radius);
    text-align: center;
}

.details-primary-grid .grid-item strong {
    display: block;
    font-size: 1.1rem; /* کمی کوچک‌تر کردن فونت مقدار */
    color: var(--primary-color);
    margin-top: 5px;
}

.details-primary-grid .grid-item i {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: block;
}

.details-primary-grid .grid-item span {
    display: block;
    color: var(--text-color);
    font-size: 0.9rem;
}


.details-price-section {
    margin-bottom: 40px;
}

.details-price-section .grid-item.price {
       background-color: var(--dark-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: space-around;
}

.details-price-section .grid-item.price i {
    font-size: 1.8rem;
    /* display: block و margin ها حذف شدند چون Flexbox آنها را کنترل می‌کند */
}

.details-price-section .grid-item.price span {
    font-size: 1.1rem; /* کمی بزرگتر کردن فونت عنوان */
}

.details-price-section .grid-item.price strong {
    font-size: 1.4rem;
}

.details-price-section .grid-item.price i,
.details-price-section .grid-item.price span,
.details-price-section .grid-item.price strong {
    color: var(--white-color);
}




.details-section h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.details-section h3 i {
    margin-left: 10px;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px 25px;
}

.feature-item {
    display: flex;
    justify-content: space-between;
    
    background-color: #f8f9fa;  /* یک رنگ خاکستری بسیار روشن و ملایم */
    padding: 12px 15px;         /* پدینگ داخلی برای ایجاد فاصله از لبه‌های کادر */
    border-radius: 6px;         /* گرد کردن گوشه‌های کادر */
    
    border-bottom: none; 
}
.feature-item .label {
    font-weight: 500;
    color: var(--dark-gray);
}

.feature-item .value {
    font-weight: bold;
}

.boolean-true { color: #27ae60; }
.boolean-false { color: #c0392b; }
.boolean-true i, .boolean-false i { margin-left: 5px; }

.floor-details-card {
    background-color: #fdfdfd;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.floor-details-card h4 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.image-viewer-modal .image-viewer-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.image-viewer-modal img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}
.viewer-close {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    text-shadow: 0 1px 5px black;
}
.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.viewer-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
.viewer-nav.prev { left: 10px; border-radius: 5px 0 0 5px; }
.viewer-nav.next { right: 10px; border-radius: 0 5px 5px 0; }

/* === Responsive Styles === */
@media (max-width: 900px) {
    .properties-grid-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .btn-modal-save {
        width: 100%;
    }
    .details-container {
        padding: 10px;
    }
    .details-header h1 {
        font-size: 1.5rem;
    }

    /* Responsive styles for the site header */
    .site-header {
        padding: 10px 0; /* Slightly less vertical padding on mobile */
    }

    .site-header .container {
        flex-direction: column;
        align-items: center; /* Center items horizontally when stacked */
        gap: 10px; /* Space between logo and nav */
    }

    .site-header .logo h1 {
        font-size: 1.3rem; /* Smaller font for logo title */
    }

    .site-header .logo i {
        font-size: 1.8rem; /* Slightly smaller icon */
    }

    .site-header .main-nav {
        margin-top: 0; /* Reset margin-top, gap handles spacing */
        display: flex; /* Ensure nav is a flex container */
        flex-wrap: wrap; /* Allow links to wrap to the next line */
        justify-content: center; /* Center the nav links */
        gap: 10px 15px; /* Vertical and horizontal gap between links */
        padding: 0 10px; /* Add some horizontal padding to the nav itself */
    }

    .site-header .main-nav a {
        margin: 0; /* Reset individual link margins, use gap instead */
        font-size: 0.9rem; /* Smaller font for nav links */
        white-space: nowrap; /* Prevent links from breaking mid-word */
    }

    /* Adjust the submit property button specifically */
    .main-nav #open-submit-property-modal {
        padding: 5px 12px; /* Slightly smaller padding for the button */
        font-size: 0.85rem; /* Smaller font for the button */
        margin-right: 0; /* Reset margin-right, gap handles spacing */
    }

    /* Adjustments for the submit property modal header on small screens */
    #submit-property-modal .modal-header {
        flex-direction: column; /* Stack title and actions */
        align-items: center; /* Center them horizontally */
        padding: 15px 10px; /* Adjust padding */
        gap: 15px; /* Space between title and actions */
    }

    #submit-property-modal .modal-header h3 {
        font-size: 1.3rem; /* Smaller title font */
        margin-bottom: 0; /* Remove default margin */
    }

    #submit-property-modal .modal-header .modal-close {
        position: absolute; /* Keep close button in top-right corner */
        top: 10px;
        right: 10px;
        font-size: 1.8rem; /* Adjust size if needed */
    }

    #submit-property-modal .modal-header .modal-header-actions {
        flex-direction: column; /* Stack buttons vertically */
        width: 100%; /* Make actions container take full width */
        gap: 10px; /* Space between stacked buttons */
    }

    #submit-property-modal .modal-header .modal-header-actions button {
        width: 100%; /* Make each button take full width */
        padding: 10px 15px; /* Adjust button padding */
        font-size: 0.95rem; /* Adjust button font size */
    }
}


@media (min-width: 900px) {
    .details-primary-grid {
       grid-template-columns: repeat(9, minmax(0, 1fr));
    }
}

/* Styles for description boxes */
.description-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 25px;
}
.description-box h3,
.description-box h4, 
.description-box h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
}
.description-box p {
    margin-bottom: 0;
    line-height: 1.8;
    white-space: pre-wrap; /* Preserves line breaks from textarea */
}
.floor-description {
    margin-top: 20px;
}


/* Style for the exchangeable badge on the details page */
.details-extra-info {
    margin-top: -20px; /* Pull it closer to the price section */
    margin-bottom: 40px;
    text-align: center;
}

.exchange-badge-details {
    display: inline-block;
    background-color: #e8f4fd;
    color: #3498db;
    padding: 10px 25px;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: bold;
}

.exchange-badge-details i {
    margin-left: 8px;
}

/* Style for the registration date at the bottom */
.details-footer-info {
    padding-top: 20px;
    margin-top: 10px;
    text-align: center; /* تغییر به وسط‌چین */
    color: #7f8c8d;
    font-size: 0.9rem;
}

.details-footer-info i {
    margin-left: 5px;
}

/* قانون جدید برای عرض 50% بخش قیمت در دسکتاپ */
@media (min-width: 992px) {
    .details-price-section {
        width: 50%;
        /* margin: auto باعث می‌شود باکس در مرکز قرار بگیرد */
        margin-left: auto;
        margin-right: auto;
    }
}

.site-header .logo .site-logo-img {
    max-height: 45px;
    width: auto;
    margin-left: 10px;
}

/* === Style for Request Property Button in Nav === */
.main-nav #open-request-modal {
    border: 1px solid var(--secondary-color);
    padding: 5px 15px;
    border-radius: 50px;
    color: var(--secondary-color);
    font-weight: bold;
    transition: all 0.3s ease;
    margin-right: 25px; /* To maintain spacing */
}

.main-nav #open-request-modal:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
    transform: translateY(-2px);
}

/* Style for new Submit Property button */
.main-nav #open-submit-property-modal {
    background-color: #ffffff; /* Darker on hover */
    color: #16a085;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-right: 25px; /* To maintain spacing */
    border: 1px solid #16a085;
}

.main-nav #open-submit-property-modal:hover {
    background-color: #16a085; /* Darker on hover */
    color: #ffffff;
}