/* Modern EVCEP Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
}

/* Leaflet default marker üzerinde seçili (yeşil) efekt */
.leaflet-marker-icon.selected-marker {
    /* Kırmızı ton için filtre ayarı */
    filter: hue-rotate(140deg) saturate(1.6) brightness(1.05);
    transform: translateY(-2px) scale(1.03);
    transition: filter 0.2s ease, transform 0.2s ease;
    z-index: 1001;
}

/* Header Styles */
header {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 100%;
    max-width: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo h1 {
    color: #2563eb;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.logo span {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 400;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 25px;
    padding: 0.5rem;
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    outline: none;
}

.search-bar button {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.search-bar button:hover {
    background: #1d4ed8;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.login-btn {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn:hover {
    color: #2563eb;
    border-color: #2563eb;
}

.add-listing-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-listing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* Main Container */
.container {
    display: flex;
    margin-top: 70px;
    height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar.collapsed {
    width: 50px;
    overflow: hidden;
}

.sidebar.collapsed .filters-content {
    opacity: 0;
    pointer-events: none;
}

.sidebar.collapsed .filters h2 {
    opacity: 0;
}

.sidebar.collapsed .filters-toggle {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.sidebar.collapsed .filters-toggle:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.filters {
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.filters-header:hover {
    background: #f8fafc;
    margin: 0 -1.5rem 1.5rem -1.5rem;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
}

.filters h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    transition: opacity 0.3s ease;
}

.filters-toggle {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    position: relative;
}

.filters-toggle:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.filters-toggle i {
    transition: transform 0.3s ease;
}

.filters-toggle.collapsed {
    transform: rotate(180deg);
}

.filters-toggle.collapsed i {
    transform: rotate(0deg); /* Counter-rotate the icon to keep it upright */
}

/* Vertical text for collapsed state */
.filters-vertical-text {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.3s ease 0.2s; /* Delay to appear after collapse */
    cursor: pointer;
    user-select: none;
    padding: 0.5rem 0;
}

.filters-vertical-text span {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    line-height: 1;
    padding: 1px 0;
    transition: color 0.3s ease;
}

.sidebar.collapsed .filters-vertical-text {
    display: flex;
    opacity: 1;
}

.sidebar.collapsed .filters-vertical-text:hover span {
    color: #2563eb;
}

.filters-content {
    transition: all 0.3s ease;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
}

.dropdown-btn {
    width: 100%;
    padding: 0.75rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.dropdown-btn:hover {
    border-color: #2563eb;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu li {
    padding: 0.75rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dropdown-menu li:hover {
    background: #f1f5f9;
}

.dropdown-menu li.selected {
    background: #dbeafe;
    color: #1e40af;
}

/* Select Box */
.select-box {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.select-box:focus {
    outline: none;
    border-color: #2563eb;
}

/* Price and Area Range */
.price-range, .area-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-unit {
    position: relative;
    flex: 1;
}

.range-input {
    width: 100%;
    padding: 0.75rem;
    padding-right: 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.range-input:focus {
    outline: none;
    border-color: #2563eb;
}

.unit {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.apply-filters, .reset-filters {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.apply-filters {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
}

.apply-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.reset-filters {
    background: transparent;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.reset-filters:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    background: #f8fafc;
}

/* Listings Sidebar (Sağ taraf) */
.listings-sidebar {
    width: 350px;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}



/* Listings Panel */
.listings-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.listings-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.listings-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.listings-count {
    color: #64748b;
    font-size: 0.9rem;
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.listings-expand-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.listings-expand-btn:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    transform: scale(1.05);
}

/* Expanded Listings Modal */
.expanded-listings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.expanded-listings-modal.active {
    display: block;
}

.expanded-listings-content {
    background: white;
    margin: 2% auto;
    border-radius: 16px;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
    position: relative;
}

.expanded-listings-content > *:not(.expanded-listings-container) {
    flex-shrink: 0;
}

.expanded-listings-content .expanded-listings-container {
    flex-shrink: 1;
    flex-grow: 1;
    min-height: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expanded-listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
    flex-shrink: 0;
}

.expanded-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.expanded-header-left h2 {
    margin: 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.expanded-listings-count {
    color: #64748b;
    font-size: 0.9rem;
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.expanded-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.expanded-view-options {
    display: flex;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.view-option-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-option-btn:hover {
    background: #f8fafc;
    color: #2563eb;
}

.view-option-btn.active {
    background: #2563eb;
    color: white;
}

.expanded-sort-dropdown {
    position: relative;
}

.expanded-sort-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    transition: all 0.3s ease;
    min-width: 150px;
    justify-content: space-between;
}

.expanded-sort-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.expanded-sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.expanded-sort-menu.active {
    display: block;
}

.expanded-sort-menu li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.expanded-sort-menu li:hover {
    background: #f8fafc;
    color: #2563eb;
}

.close-expanded-btn {
    background: #ef4444;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.close-expanded-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.expanded-listings-container {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Grid View - Flexbox wrap kullanarak */
.expanded-listings-container.grid-view {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    align-content: flex-start !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    position: relative !important;
}

.expanded-listings-container.grid-view .expanded-listing-card {
    position: relative !important;
    width: calc((100% - 3rem) / 3) !important;
    min-width: 280px !important;
    max-width: 400px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

/* Responsive grid */
@media (max-width: 1200px) {
    .expanded-listings-container.grid-view .expanded-listing-card {
        width: calc((100% - 1.5rem) / 2) !important;
    }
}

@media (max-width: 768px) {
    .expanded-listings-container.grid-view .expanded-listing-card {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

/* List View */
.expanded-listings-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.expanded-listings-container.list-view .expanded-listing-card {
    flex-direction: row;
    max-width: none;
    display: flex;
}

.expanded-listings-container.list-view .expanded-listing-card .listing-image {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    object-fit: cover;
}

.expanded-listings-container.list-view .expanded-listing-card .listing-content {
    flex: 1;
    padding: 1.5rem;
}

/* Expanded Listing Card - Normal listing-card'dan bağımsız */
.expanded-listing-card {
    background: white !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    height: auto !important;
    min-height: 0 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
    float: none !important;
    clear: none !important;
}

.expanded-listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

.expanded-listing-card .listing-image {
    width: 100%;
    height: 200px;
    max-width: 100%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
}

.expanded-listing-card .listing-content {
    padding: 1.5rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
}

.expanded-listing-card .listing-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.expanded-listing-card .listing-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2563eb;
    margin: 0 0 0.5rem 0;
}

.expanded-listing-card .listing-address {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.expanded-listing-card .listing-features {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #64748b;
    flex-wrap: wrap;
}

.expanded-listing-card .listing-features span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.expanded-listing-card .listing-features i {
    font-size: 0.8rem;
    color: #2563eb;
}



.modern-sort {
    position: relative;
    padding: 0 1.5rem;
    padding-bottom: 1rem;
    flex-shrink: 0;
}

.sort-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: space-between;
}

.sort-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.sort-dropdown {
    position: absolute;
    top: 100%;
    left: 1.5rem;
    right: 1.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    list-style: none;
    z-index: 1000;
    display: none;
    margin: 0;
    padding: 0;
}

.sort-dropdown.active {
    display: block;
}

.sort-dropdown li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.sort-dropdown li:hover {
    background: #f8fafc;
}

.sort-dropdown li:first-child {
    border-radius: 8px 8px 0 0;
}

.sort-dropdown li:last-child {
    border-radius: 0 0 8px 8px;
}

.listings-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem 1.5rem;
}

/* Listing Card - Expanded listing card'lardan ayrı tutmak için */
.listings-container .listing-card,
.listings-sidebar .listing-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Expanded listing card'ların listing-card stillerinden etkilenmemesi için */
.expanded-listings-container .expanded-listing-card {
    margin-bottom: 0 !important;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

/* Haritadan seçilen ilana görsel vurgu (animasyonlu) */
.listing-card.highlight {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3), 0 8px 25px rgba(37, 99, 235, 0.25);
    background: #eff6ff;
    animation: listingHighlightPulse 1.2s ease-out;
}

@keyframes listingHighlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
        background: #dbeafe;
    }
    40% {
        transform: scale(1.01);
        box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2);
        background: #eff6ff;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3), 0 8px 25px rgba(37, 99, 235, 0.15);
        background: #ffffff;
    }
}

.listing-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    flex-shrink: 0;
}

.listing-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.listing-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.listing-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2563eb;
    margin: 0;
}

.listing-address {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.listing-address::before {
    content: '📍';
    font-size: 0.8rem;
}

.listing-features {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.listing-features span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.listing-features i {
    font-size: 0.75rem;
    color: #2563eb;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #64748b;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ef4444;
}

.modal h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.auth-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gmail-btn, .phone-btn {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.gmail-btn:hover {
    border-color: #ea4335;
    color: #ea4335;
}

.phone-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: #64748b;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.register-link {
    text-align: center;
    margin-top: 1rem;
}

.register-link p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.register-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Profile Dropdown */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #374151;
}

.profile-btn:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.profile-name {
    font-weight: 500;
    color: #1e293b;
}

.profile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.profile-menu.active {
    display: block;
}

.profile-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.profile-menu a:hover {
    background: #f8fafc;
    color: #2563eb;
}

.profile-menu a i {
    width: 16px;
    text-align: center;
    color: #64748b;
}

.profile-menu a:hover i {
    color: #2563eb;
}

.menu-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 0.5rem 0;
}

/* Profile Modal */
.profile-modal .modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
}

.profile-modal-content {
    display: flex;
    flex-direction: column;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0;
    padding: 0 2rem;
    background: #f8fafc;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: white;
}

.tab-content {
    display: none;
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

/* Profile Info */
.profile-info {
    display: flex;
    gap: 2rem;
    max-width: 800px;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.change-avatar-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.change-avatar-btn:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.profile-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.save-profile-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.save-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* Listings Header */
.listings-header, .favorites-header, .messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.listings-header h3, .favorites-header h3, .messages-header h3 {
    margin: 0;
    color: #1e293b;
}

.add-new-listing-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.add-new-listing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.favorites-count, .messages-count {
    color: #64748b;
    font-size: 0.9rem;
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

/* My Listings Container */
.my-listings-container, .favorites-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* No Messages */
.no-messages {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.no-messages i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.no-messages p {
    font-size: 1.1rem;
    margin: 0;
}

/* Listing Actions */
.listing-actions, .favorite-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.edit-listing-btn, .delete-listing-btn, .view-stats-btn, 
.remove-favorite-btn, .view-listing-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    min-width: 80px;
}

.edit-listing-btn:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.delete-listing-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.view-stats-btn:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.remove-favorite-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.view-listing-btn:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Responsive Profile Modal */
@media (max-width: 768px) {
    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-avatar-section {
        min-width: auto;
    }
    
    .profile-tabs {
        flex-wrap: wrap;
        padding: 0 1rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .my-listings-container, .favorites-container {
        grid-template-columns: 1fr;
    }
    
    .listing-actions, .favorite-actions {
        flex-direction: column;
    }
    
    .edit-listing-btn, .delete-listing-btn, .view-stats-btn, 
    .remove-favorite-btn, .view-listing-btn {
        flex: none;
    }
}

.hidden {
    display: none;
}

/* Listing Details Modal */
.listing-details-modal {
    display: none;
    position: fixed;
    z-index: 3000 !important; /* Expanded listings modal'ından daha yüksek */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.listing-details-content {
    background-color: white;
    margin: 2% auto;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.listing-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.listing-details-close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #64748b;
    transition: color 0.3s ease;
}

.listing-details-close:hover {
    color: #ef4444;
}

.listing-details-body {
    display: flex;
    flex-direction: column;
}

.listing-image-container {
    position: relative;
    height: 300px;
}

.listing-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prev-image, .next-image {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.prev-image {
    left: 1rem;
}

.next-image {
    right: 1rem;
}

.prev-image:hover, .next-image:hover {
    background: rgba(0, 0, 0, 0.7);
}

.listing-info {
    padding: 1.5rem;
}

.listing-description-container .listing-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.listing-description-container .listing-address {
    color: #64748b;
    margin-bottom: 1rem;
}

.listing-description-container .listing-description {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-options {
    border-top: 1px solid #f1f5f9;
    padding-top: 1.5rem;
}

.contact-options h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-method:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.contact-method i {
    color: #2563eb;
    width: 20px;
    text-align: center;
}

/* Add Listing Modal */
.modern-listing-modal {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.modal-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e293b;
}

/* Form Progress */
.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #2563eb;
    color: white;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
}

.progress-step.active .step-label {
    color: #2563eb;
}

.progress-line {
    width: 60px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 1rem;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.step-content h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.step-description {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.required {
    color: #ef4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    position: relative;
    transition: border-color 0.3s ease;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #2563eb;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #2563eb;
    border-radius: 50%;
}

.input-with-icon {
    position: relative;
}

.input-icon-right {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 500;
}

/* Photo Upload */
.photo-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.photo-upload-area:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.upload-placeholder i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.upload-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin: 0.5rem 0;
}

.upload-hint {
    display: block;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Map Container Modern */
.map-container-modern {
    margin-top: 1.5rem;
}

.map-container-modern label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.modern-map {
    height: 300px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.map-hint {
    color: #64748b;
    font-size: 0.85rem;
    text-align: center;
}

/* Summary */
.summary-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.summary-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.summary-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.btn-secondary {
    background: #64748b;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        order: 1;
        position: relative;
    }
    
    .sidebar.collapsed {
        width: 100%;
        height: 60px;
        overflow: hidden;
    }
    
    .sidebar.collapsed .filters {
        padding: 1rem 1.5rem;
    }
    
    .sidebar.collapsed .filters-toggle {
        position: static;
        transform: none;
    }
    
    .map-container {
        height: 50vh;
        order: 2;
    }
    
    .listings-sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
        order: 3;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .listings-panel {
        height: auto;
        max-height: 40vh;
    }
    
    .listing-card {
        flex-direction: row;
    }
    
    .listing-image {
        width: 100px;
        height: 80px;
    }
    
    .listing-content {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
    }
    
    .search-bar {
        display: none;
    }
    
    .auth-buttons {
        gap: 0.5rem;
    }
    
    .auth-buttons button {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .sidebar {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.collapsed {
        height: 50px;
    }
    
    .filters {
        padding: 1rem;
    }
    
    .filters-header {
        margin-bottom: 1rem;
    }
    
    .filters-header:hover {
        margin: 0 -1rem 1rem -1rem;
        padding: 0.5rem 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 1rem;
    }
    
    .modern-listing-modal {
        max-height: 95vh;
    }
    
    .listings-sidebar {
        max-height: 35vh;
    }
    
    .listing-card {
        flex-direction: column;
    }
    
    .listing-image {
        width: 100%;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo span {
        display: none;
    }
    
    .container {
        height: calc(100vh - 70px);
    }
    
    .sidebar.collapsed {
        height: 45px;
    }
    
    .map-container {
        height: 45vh;
    }
    
    .listings-sidebar {
        max-height: 30vh;
    }
    
    .listings-header {
        padding: 1rem;
    }
    
    .listings-header h3 {
        font-size: 1.1rem;
    }
    
    .modern-sort {
        padding: 0 1rem 0.75rem;
    }
    
    .listings-container {
        padding: 0 1rem 1rem;
    }
    
    .listing-content {
        padding: 0.75rem;
    }
    
    .listing-features {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .form-progress {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .progress-line {
        display: none;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Notification Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Leaflet Map Customizations */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
    margin: 15px;
    font-family: 'Inter', sans-serif;
}

.custom-marker {
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}