/* Font Imports */
@font-face {
    font-family: 'IRANSansWeb';
    src: url('../fonts/IRANSansWeb.eot');
    src: url('../fonts/IRANSansWeb.eot?#iefix') format('embedded-opentype'),
         url('../fonts/IRANSansWeb.woff') format('woff'),
         url('../fonts/IRANSansWeb.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'IRANSansWeb', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    letter-spacing: 0.5px;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.user-nav {
    display: flex;
    padding: 20px;
    margin: 20px;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 1.5px 7px rgba(0,0,0,0.03);
    border-radius: 14px;
    transition: box-shadow 0.2s;
}

.user-nav-logo-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
    justify-content: flex-start; /* Align left when buttons exist 🌟 */
    width: auto; /* Allow natural width when buttons are present 📏 */
}

/* Hide user-nav-buttons when not logged in 🚫 */
.user-nav-buttons {
    display: none; /* Hidden by default 🚪 */
}

/* Show user-nav-buttons when logged in ✅ */
.user-nav-buttons.logged-in {
    display: flex;
    align-items: center;
}

/* Center user-nav-logo-title when only child (no buttons) 🎯 */
.user-nav > .user-nav-logo-title:only-child {
    justify-content: center; /* Center when no buttons 🚀 */
    width: 100%; /* Full width for centering 📏 */
}

.user-nav-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: 2px solid #eee;
}

.user-nav-text {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
}

.user-nav-title {
    font-size: 2rem;
    font-weight: bold;
    color: #2d3748;
    letter-spacing: 1px;
    font-family: inherit;
}

.user-nav-subtitle {
    font-size:12px;
    color:#888;
    margin-top:2px
}

.user-nav-buttons {
    display: flex;
    align-items: center;
}

.user-nav p {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 0;
}

.user-nav a {
    color: #4c6ef5;
    text-decoration: none;
    margin: 0 0.75rem;
    padding: 0.25rem 0;
    transition: all 0.2s ease;
    position: relative;
}

.user-nav a:hover {
    color: #3b5bdb;
}

.user-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #3b5bdb;
    transition: width 0.3s ease;
}

.user-nav a:hover::after {
    width: 100%;
}

a {
    text-decoration: none;
    color: #4c6ef5;
    transition: color 0.2s ease;
}

a:hover {
    color: #3b5bdb;
}

/* Header Styles */
h1 {
    font-size: 40px;
    font-weight: 600;
    text-align: center;
    margin: 5px;
    letter-spacing: -0.5px;
    color: #1d1d1f;
}

/* Container Layout */
.container {
    margin: 10px auto;
    padding: 0 5px;
    display: flex;
    flex-direction: row;
    gap: 40px;
    width: 100%;
}

/* Sidebar Styles */
.sidebar {
    margin-right: 12px;
    min-width: 380px;
    flex: 0 0 280px;
    position: sticky;
    top: 20px;
    height: fit-content;
    padding: 24px;
    background-color: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Base styles for search form */
.search-container {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
    min-width: 0;
}

#search-input {
    flex: 1;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: auto;
    min-width: 0;
    font-size: large;
    font-family: 'IRANSansWeb', sans-serif;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#search-input:focus {
    border-color: #2a2de9;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

/* --- Updated Search Button Styles --- */
#search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: start;
    padding: 10px 30px;
    background: linear-gradient(135deg, #ec3a04, #f1077c);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 550;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
    justify-content: center;
}

#search-form button:hover {
    background: linear-gradient(135deg, #f1077c, #ec3a04);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

#search-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Optional: If search button includes an icon */
#search-form button .search-button-icon {
    width: 30px;
    height: 30px;
    margin-left: 20px;
    margin-bottom: 7px;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
    justify-content: center;
}

#search-form button:hover .search-button-icon {
    transform: scale(1.1);
}

/* --- Map Button Styles --- */
.map-button {
    display: inline-flex;
    align-items: center;
    justify-content: start;
    padding: 10px 30px;
    margin-left: 30px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #e76a04, #f31606);
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    font-size: 18px;
    font-weight: 550;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
}

.map-button:hover {
    background: linear-gradient(135deg, #f31606, #e76a04);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.map-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.map-button-icon {
    width: 30px;
    height: 30px;
    margin-left: 20px;
    margin-bottom: 7px;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
}

.map-button:hover .map-button-icon {
    transform: scale(1.1);
}

#clear-search {
    padding: 10px 20px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.price-range-container {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
}

.price-range-values {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    padding: 12px;
    gap: 10px;
}

.price-range-values > div {
    flex: 1 1 45%;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.price-range-values label {
    font-size: 14px;
    font-weight: 600;
    color: #6e6e73;
    white-space: nowrap;
    text-align: right;
}

.price-input {
    width: 100%;
    max-width: 140px;
    padding: 8px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-family: 'IRANSansWeb', sans-serif;
    font-size: 14px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    direction: ltr;
}

.price-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.price-input::placeholder {
    font-family: 'IRANSansWeb', sans-serif;
    color: #a2a2a7;
}

#price-range-slider {
    margin: 20px 0;
}

.noUi-horizontal {
    direction: rtl;
}

.filter-section h3 {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
}

.filter-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #6e6e73;
}

.filter-group select {
    padding: 12px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    background-color: #fff;
    font-family: 'IRANSansWeb', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    color: #1d1d1f;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23424245' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.button-align {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

button {
    padding: 12px 24px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'IRANSansWeb', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover {
    background-color: #004499;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    background-color: #a2a2a7;
    cursor: not-allowed;
}

#apply-filters {
    width: 100%;
    background: linear-gradient(135deg, #ff7b4b, #ff5e90);
}

#apply-filters:hover {
    background: linear-gradient(135deg, #ff5e90, #ff7b4b);
}

#clear-filters {
    padding: 12px 24px;
    background: linear-gradient(135deg, #e7bd04, #f38406);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'IRANSansWeb', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#clear-filters:hover {
    background: linear-gradient(135deg, #f38406, #e7bd04);
}

/* Main Content Area */
.main-content {
    flex: 1;
    position: relative;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 32px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 12px;
    z-index: 10;
    font-weight: 500;
}

/* Property List */
.property-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    animation: fadeIn 0.5s ease-out;
    min-height: 800px;
    width: 100%;
    padding: 0 12px;
}

.property-list.loading {
    opacity: 0.5;
    pointer-events: none;
}

.property-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.property-link:hover {
    transform: translateY(-8px);
}

.property {
    width: 100%;
    background-color: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: 100%;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
    text-align: right;
    direction: rtl;
}

.property:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.property-cover {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    order: -1;
    flex-shrink: 0;
}

.property-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

.property:hover .property-cover img {
    transform: scale(1.05);
}

.property-content {
    padding: 18px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.property h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #1d1d1f;
    line-height: 1.4;
    padding-right: 4px;
    padding-top: 2px;
    text-align: center;
}

.property p {
    margin: 6px 0;
    font-size: 14px;
    color: #6e6e73;
    line-height: 1.5;
    padding-right: 8px;
}

.property p strong {
    color: #1d1d1f;
    font-weight: 600;
    margin-left: 5px;
}

/* Location and size line */
.property p:nth-of-type(1) {
    color: #424245;
    margin-bottom: 12px;
}

/* Category line */
.property p:nth-of-type(2) {
    margin-bottom: 15px;
}

.area-filter {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
}

.area-filter:hover {
    color: #004080;
}

.property-link .area-filter {
    position: relative;
    z-index: 2;
}

/* Price sections */
.price-info {
    text-align: center;
    background-color: #f6f7f5;
    font-size: 15px;
    padding: 10px 15px;
    margin: 8px 20px !important;
    border-radius: 18px;
}

.price-info strong {
    color: #1a73e8 !important;
}

.price-info + .price-info {
    margin-top: -4px !important;
}

.property-date-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 12px 3px 3px 5px;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
}

.property-date-time p {
    margin: 0;
    font-size: 13px;
    white-space: nowrap;
}

.property-date-time .tel a {
    color: #1a73e8;
    text-decoration: none;
}

.property-date-time .tel a:hover {
    text-decoration: underline;
}

.property-link {
    text-decoration: none;
    display: block;
    color: inherit;
}

/* Admin Link Styles */
.admin-links {
    background-color: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-top: 24px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.admin-links a {
    margin-right: 12px;
}

/* User Status Bar */
body > p {
    text-align: center;
    padding: 12px;
    background-color: #fff;
    border-bottom: 1px solid #d2d2d7;
    margin-bottom: 24px;
}

/* Error Messages */
.error-message {
    padding: 40px;
    text-align: center;
    font-size: 18px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.error-message h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.filter-group .switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    margin: 5px 0;
}

.filter-group .switch-label span:first-child {
    flex-grow: 1;
    color: #6e6e73;
}

.switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
    margin-left: 10px;
}

.switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E9E9EA;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.slider.round {
    border-radius: 31px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1.25);
    box-shadow: 0 1px 2px rgba(0,0,0,0.15), 0 0 0 0.5px rgba(0,0,0,0.05);
}

.slider.round:before {
    border-radius: 50%;
}

.switch input[type="checkbox"]:checked + .slider {
    background-color: #34C759;
}

.switch input[type="checkbox"]:focus + .slider {
    box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.4);
}

.switch input[type="checkbox"]:checked + .slider:before {
    transform: translateX(20px);
}

/* Styles from realtor.php */
.success, .error { 
    padding: 1rem; /* Consistent padding 🌟 */
    margin: 1.5rem 0; /* Consistent margin 🌟 */
    border-radius: 0.75rem; /* Consistent border-radius 🌟 */
    border: 2px solid; /* Consistent border 🌟 */
    transition: opacity 0.5s ease-in-out; /* Consistent transition 🌟 */
}
.success { 
    background-color: #dcfce7; /* Original color */
    color: #166534; /* Original color */
    border-color: #22c55e; /* Consistent border color 🌟 */
}
.error { 
    background-color: #fee2e2; /* Original color */
    color: #b91c1c; /* Original color */
    border-color: #ef4444; /* Consistent border color 🌟 */
}
.panel-section { 
    background: #f8f9fa; 
    border: 1px solid #dee2e6; 
    border-radius: 8px; 
    padding: 20px; 
    margin: 20px 30px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
}
.plan-info { 
    border-left: 4px solid #007bff; 
}
.plan-info.basic-plan { 
    border-left-color: #6c757d; 
}
.plan-info.premium-plan { 
    border-left-color: #28a745; 
    background: #d4edda; 
}
.plan-info.expired-plan { 
    border-left-color: #dc3545; 
    background: #f8d7da; 
}
.alert-section { 
    margin: 20px 30px; 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid; 
    font-size: 1.1em; 
    line-height: 1.6; 
}
.alert-info { 
    background-color: #e7f5fe; 
    border-color: #b8e1fc; 
    color: #0c5460; 
}
.alert-danger { 
    background-color: #f8d7da; 
    border-color: #f5c6cb; 
    color: #721c24; 
}
.alert-warning { 
    background-color: #fff3cd; 
    border-color: #ffeaa7; 
    color: #856404; 
}
.add-new {
    background: #2196f3;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem; /* Consistent padding 🌟 */
    border: none; /* Consistent border 🌟 */
    border-radius: 0.75rem; /* Consistent border-radius 🌟 */
    font-size: 1rem; /* Consistent font-size 🌟 */
    font-weight: 600; /* Consistent font-weight 🌟 */
    cursor: pointer; /* Consistent cursor 🌟 */
    transition: all 0.2s ease; /* Consistent transition 🌟 */
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.15); /* Consistent shadow 🌟 */
}

.add-new:hover {
    color: #d5e406;
    background: #02467e;
    transform: translateY(-2px); /* Consistent hover effect 🌟 */
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.25); /* Consistent shadow 🌟 */
}

.add-new:active {
    transform: translateY(0); /* Consistent active effect 🌟 */
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.15); /* Consistent shadow 🌟 */
}

.add-new.disabled {
    background: #cccccc;
    color: #666666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem; /* Consistent padding 🌟 */
    border: none; /* Consistent border 🌟 */
    border-radius: 0.75rem; /* Consistent border-radius 🌟 */
    font-size: 1rem; /* Consistent font-size 🌟 */
    font-weight: 600; /* Consistent font-weight 🌟 */
    cursor: not-allowed; /* Consistent cursor 🌟 */
    transition: all 0.2s ease; /* Consistent transition 🌟 */
    box-shadow: 0 2px 6px rgba(204, 204, 204, 0.15); /* Consistent shadow 🌟 */
    pointer-events: none;
}

.add-new.disabled:hover {
    background: #cccccc;
    transform: none; /* No transform on hover for disabled 🌟 */
    box-shadow: 0 2px 6px rgba(204, 204, 204, 0.15); /* Consistent shadow 🌟 */
}

.add-new.disabled:active {
    transform: none; /* No transform on active for disabled 🌟 */
    box-shadow: 0 2px 6px rgba(204, 204, 204, 0.15); /* Consistent shadow 🌟 */
}


.btn-upgrade {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.2rem;
    background: #ffc107;
    color: #856404;
    text-decoration: none;
    border-radius: 12px;
    font-weight: bolder;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(76, 110, 245, 0.2);
    position: relative;
    overflow: hidden;
    min-width: 220px;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    margin: 0.5rem; 
}

.btn-upgrade:hover {
    background: #e0a800;
    color: #131312;
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(179, 255, 0, 0.25); 
}

.btn-upgrade:active {
    transform: translateY(0); 
    box-shadow: 0 2px 4px rgba(255, 251, 7, 0.15); 
}

/* Styles from realtor_public.php */
.profile-container { 
    max-width: 1200px; 
    margin: 20px auto; 
    background: white; 
    padding: 20px; 
    border-radius: 10px; 
    box-shadow: 0 0 10px rgba(0,0,0,0.1); 
}
.profile-header { 
    display: flex; 
    align-items: flex-start; 
    margin-bottom: 30px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid #eee; 
}
.avatar { 
    width: 200px; 
    height: 200px; 
    border-radius: 10px; 
    margin-left: 20px; 
    object-fit: cover; 
}
.profile-info { 
    flex: 1; 
}
.profile-info p { 
    margin: 10px 0; 
}
.profile-info strong { 
    display: inline-block; 
    width: 120px; 
    color: #2c3e50; 
}
.profile-info a { 
    color: #3498db; 
    text-decoration: none; 
}
.profile-info a:hover { 
    text-decoration: underline; 
}
.map-container { 
    height: 400px; 
    margin: 20px 0; 
    border-radius: 8px; 
    overflow: hidden; 
}
#map { 
    height: 100%; 
    width: 100%; 
}
.btn-back { 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 0.875rem 1.75rem; /* Consistent padding 🌟 */
    border: none; /* Consistent border 🌟 */
    border-radius: 0.75rem; /* Consistent border-radius 🌟 */
    font-size: 1rem; /* Consistent font-size 🌟 */
    font-weight: 600; /* Consistent font-weight 🌟 */
    cursor: pointer; /* Consistent cursor 🌟 */
    transition: all 0.2s ease; /* Consistent transition 🌟 */
    background: #3498db; /* Original color */
    color: #ffffff; /* Original color */
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.15); /* Consistent shadow 🌟 */
    margin-top: 20px; /* Original margin */
}
.btn-back:hover { 
    background: #18a1e0; /* Original hover color */
    transform: translateY(-2px); /* Consistent hover effect 🌟 */
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.25); /* Consistent shadow 🌟 */
}
.btn-back:active { 
    transform: translateY(0); /* Consistent active effect 🌟 */
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.15); /* Consistent shadow 🌟 */
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #e9ebe9;
    color: rgb(8, 151, 247);
    border-radius: 8px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.footer p:last-child {
    margin-top: 18px; /* Adjust this value as needed */
}

/* Scoped link styles */
.tel a,
a.area-filter,
footer a {
    text-decoration: none !important;
    color: #4c6ef5;
    transition: color 0.2s cubic-bezier(.4,0,.2,1), background 0.2s cubic-bezier(.4,0,.2,1);
    position: relative;
}

.tel a:hover,
a.area-filter:hover,
footer a:hover {
    color: #2541b2;
    font-weight: 600;
}

.tel a:not(.btn-view-all):not(.button):not(button)::after,
a.area-filter:not(.btn-view-all):not(.button):not(button)::after,
footer a:not(.btn-view-all):not(.button):not(button)::after {
    content: '';
    display: block;
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, #4c6ef5 0%, #2541b2 100%);
    transform: scaleX(0);
    transition: transform 0.2s cubic-bezier(.4,0,.2,1);
    border-radius: 2px;
}

.tel a:hover:not(.btn-view-all):not(.button):not(button)::after,
a.area-filter:hover:not(.btn-view-all):not(.button):not(button)::after,
footer a:hover:not(.btn-view-all):not(.button):not(button)::after {
    transform: scaleX(1);
}


@media (min-width: 1100px) {
    .property-list {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 16px;
        margin: 0;
        width: 100%;
    }

    .property {
        max-height: 560px;
    }

    .property-cover {
        height: 260px;
    }

    .property-content {
        padding: 24px;
    }

    .property h2 {
        font-size: 19px;
    }

    .property p {
        font-size: 15px;
    }
}

@media (max-width: 960px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        flex: 0 0 auto;
        margin: auto;
        width: 100%;
        position: static;
        margin-bottom: 24px;
    }
    
    .property-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        margin: 16px;
        width: calc(100% - 32px);
        padding-left: 0;
    }

    #search-form {
        max-width: 800px;
        padding: 14px;
        background: #f8f9fa;
        border-radius: 6px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    }

    #search-form:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .property {
        animation: fadeIn 0.5s ease-out forwards;
    }
}

@media (max-width: 1099px) and (min-width: 641px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        flex: 0 0 auto;
        margin: auto;
        width: 100%;
        position: static;
        margin-bottom: 24px;
    }
    
    .property-list {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        margin: 0;
        width: 100%;
        padding: 0 16px;
    }
    
    .property {
        max-height: 520px;
    }

    #search-form {
        max-width: 800px;
        padding: 14px;
        background: #f8f9fa;
        border-radius: 6px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    }

    #search-form:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 32px;
        margin: 24px 0;
    }
    .sidebar {
        margin: auto;
    }
    .property-list {
        grid-template-columns: 1fr;
        margin: 0;
        width: 100%;
        padding: 0 16px;
    }
    .property {
        min-height: 400px;
        max-height: 480px;
        margin: 0 auto;
        max-width: 100%;
    }
    .property-content {
        flex-grow: 1;
        min-height: 0;
        overflow: hidden;
    }
    .property-cover {
        height: 180px;
    }
    .search-container {
        flex-direction: column !important;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }
    .map-button {
        margin-left: 0;
        align-self: center;
        width: auto;
        margin-bottom: 10px;
    }
    #search-form {
        flex-direction: column !important;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }
    #search-input {
        width: 100%;
        margin-bottom: 0;
    }
    #search-form button {
        width: 100%;
        flex-grow: 0;
        min-width: unset;
        box-sizing: border-box;
        justify-content: center;
    }
    #clear-search {
        padding: 10px 30px;
        border-radius: 16px;
        font-size: 18px;
        font-weight: 550;
        background: #f44336;
    }
    .price-range-values {
        flex-direction: column;
        align-items: flex-end;
        gap: 15px;
    }
    .price-range-values > div {
        flex: 1 1 100%;
        min-width: 100%;
        flex-direction: column;
        align-items: flex-end;
    }
    .price-input {
        max-width: 100%;
    }
    .user-nav {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .user-nav-logo-title {
        justify-content: center;
        width: 100%;
        margin-bottom: 18px;
    }

    .user-nav-buttons.logged-in {
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .search-container {
        flex-direction: column !important;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }
    .sidebar {
    margin: auto;
    padding: 14px;
    min-width: 224px;
    }
    .map-button {
        margin-left: 0;
        align-self: center;
        width: auto;
        margin-bottom: 10px;
    }
    #search-form {
        flex-direction: column !important;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }
    #search-input {
        width: 100%;
        margin-bottom: 0;
    }
    #search-form button {
        width: 100%;
        flex-grow: 0;
        min-width: unset;
        box-sizing: border-box;
        justify-content: center;
    }
    #clear-search {
        padding: 10px 30px;
        border-radius: 16px;
        font-size: 18px;
        font-weight: 550;
        background: #f44336;
    }
    .price-range-values {
        flex-direction: column;
        align-items: flex-end;
        gap: 15px;
    }
    .price-range-values > div {
        flex: 1 1 100%;
        min-width: 100%;
        flex-direction: column;
        align-items: flex-end;
    }
    .price-input {
        max-width: 100%;
    }
}

/* Animation for page transitions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Persian number styling */
.persian-digits {
    font-feature-settings: "tnum";
}