/* Emlak Portal - Funda Style */

/* Import Montserrat (Proxima Nova benzeri, Türkçe tam destek) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

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

:root {
    --primary-orange: #dc2626;
    --primary-blue: #1a73e8;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #f8f9fa;
    --border-color: #e0e0e0;
    --white: #ffffff;
}

body {
    font-family: 'Montserrat', 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark-gray);
    background: var(--white);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #e94e1b 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

.logo:hover .logo-icon {
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

.logo-icon svg {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text {
    display: flex;
    align-items: center;
}

.logo-primary {
    color: var(--primary-orange);
    font-weight: 800;
}

.logo-secondary {
    color: var(--dark-gray);
    font-weight: 800;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--primary-orange);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.favorites-icon {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    transition: all 0.3s;
    text-decoration: none;
}

.favorites-icon:hover {
    border-color: var(--primary-orange);
    background: #fff5f0;
    transform: scale(1.1);
}

.favorites-icon svg {
    color: var(--dark-gray);
    transition: all 0.3s;
}

.favorites-icon:hover svg {
    color: var(--primary-orange);
    stroke-width: 2.5;
}

.favorites-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-orange);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.header-actions .btn-primary {
    background: var(--primary-orange);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.header-actions .btn-primary:hover {
    background: #b91c1c;
    color: var(--white);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--dark-gray);
    margin: 5px 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-blue), #0d5bb5);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* Search Box */
.search-box {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

/* Toggle Buttons (Funda Style) */
.search-toggle-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    max-width: 40%;
}

.toggle-btn {
    flex: 1;
    padding: 14px 20px;
    background: var(--light-gray);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn:hover {
    border-color: var(--primary-orange);
    background: #fff;
}

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

.toggle-btn.active:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Kiralık Butonu - Mavi Renk */
button.toggle-btn.btn-kiralik.active {
    background: #176edd !important;
    background-color: #176edd !important;
    color: white !important;
    border-color: #176edd !important;
}

button.toggle-btn.btn-kiralik.active:hover {
    background: #1359c2 !important;
    background-color: #1359c2 !important;
    border-color: #1359c2 !important;
}

button.toggle-btn.btn-kiralik:hover {
    border-color: #176edd !important;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 15px;
}

.search-form select,
.search-form input {
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.search-form select:focus,
.search-form input:focus {
    outline: none;
    border-color: var(--primary-orange);
}

.btn-search {
    background: var(--primary-orange);
    color: var(--white);
    padding: 14px 35px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-search:hover {
    background: #b91c1c;
}

/* Categories Section */
.categories-section {
    padding: 60px 0;
    background: var(--light-gray);
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
    font-weight: 700;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-orange);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-gray);
}

/* Listings Section */
.listings-section {
    padding: 60px 0;
}

.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.listings-count {
    color: var(--medium-gray);
    font-size: 16px;
}

.sort-select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.listing-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.listing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.1);
}

.listing-card:hover .listing-meta span {
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.listing-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--light-gray);
    transition: transform 0.5s ease;
}

.listing-card:hover .listing-image {
    transform: scale(1.08);
}

.listing-image-wrapper {
    overflow: hidden;
    position: relative;
}

.listing-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #e94e1b 100%);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    backdrop-filter: blur(4px);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(220, 38, 38, 0.5);
    }
}

.listing-content {
    padding: 22px;
}

.listing-price-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.listing-price {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #e94e1b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.listing-old-price {
    font-size: 15px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 600;
    position: relative;
}

.listing-old-price::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: #ef4444;
    transform: translateY(-50%) rotate(-8deg);
}

.listing-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark-gray);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 51px;
}

.listing-location {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.listing-location svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 2px solid #f3f4f6;
    font-size: 11px;
    color: #6b7280;
    margin-left: -10px;
}

.listing-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 6px 10px;
    background: #f9fafb;
    border-radius: 6px;
    transition: all 0.3s;
}

.listing-meta span svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: #9ca3af;
}

/* Cities Section */
.cities-section {
    padding: 60px 0;
    background: var(--light-gray);
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.city-link {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.city-link:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 50px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-orange);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* Responsive */
@media (max-width: 768px) {
    /* Header Mobile */
    .header .container {
        position: relative;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo {
        position: relative;
        font-size: 22px;
        z-index: 100;
        gap: 10px;
    }

    .logo-icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .logo-icon svg {
        width: 26px;
        height: 26px;
    }

    .header-actions {
        display: none !important;  /* Hide all header actions on mobile */
    }

    /* Hide favorites icon on mobile */
    .favorites-icon {
        display: none !important;
    }

    /* Hide login button on mobile */
    .header-actions .btn-primary {
        display: none !important;
    }

    /* Hide user menu on mobile */
    .user-menu {
        display: none !important;
    }

    /* Original styles kept for reference but overridden by display:none
    .header-actions {
        position: absolute;
        right: 70px;
        top: 50%;
        transform: translateY(-50%);
        gap: 10px;
        z-index: 100;
    }

    .favorites-icon {
        width: 38px;
        height: 38px;
    }

    .favorites-icon svg {
        width: 20px;
        height: 20px;
    }
    */

    .header-actions .btn-primary {
        padding: 8px 16px;
        font-size: 13px;
    }

    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 101;
    }

    .nav {
        position: fixed;
        display: flex;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 80px 30px 30px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        align-items: stretch;
    }

    .nav.active {
        right: 0;
    }

    .nav a {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 16px;
    }

    .nav .btn-primary {
        margin-top: 20px;
        text-align: center;
        padding: 12px 15px;
        font-size: 14px;
    }

    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .search-form select,
    .search-form input,
    .search-form button {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 14px;
        padding: 12px 14px;
    }

    .search-box {
        padding: 20px;
    }

    .search-toggle-buttons {
        flex-direction: row;
        max-width: 100%;
        gap: 8px;
    }

    .toggle-btn {
        width: auto;
        font-size: 13px;
        padding: 10px 14px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .listing-location {
        font-size: 14px;
    }

    .listing-location svg {
        width: 16px;
        height: 16px;
    }

    .listing-meta {
        font-size: 13px;
    }

    .listing-meta span svg {
        width: 16px;
        height: 16px;
    }

    .cities-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .section-title {
        font-size: 26px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: var(--text-color);
}

.user-menu-toggle:hover {
    border-color: var(--primary-orange);
    background: #fff5f0;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.user-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 1px solid #f1f5f9;
}

.user-menu-dropdown a:first-child {
    border-radius: 12px 12px 0 0;
}

.user-menu-dropdown a:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.user-menu-dropdown a:hover {
    background: #f8fafc;
    color: var(--primary-orange);
    padding-left: 25px;
}

@media (max-width: 768px) {
    .user-menu {
        position: static;
    }
    
    .user-menu-toggle span:not(.favorites-badge) {
        display: none;
    }
    
    .user-menu-dropdown {
        right: auto;
        left: 0;
    }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: #d1fae5;
    color: #065f46;
}

.toast-error .toast-icon {
    background: #fee2e2;
    color: #991b1b;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 20px;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.active .modal-content {
    transform: scale(1);
}

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

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-body {
    padding: 25px;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e94e1b, #d43d0a);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(233, 78, 27, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    font-size: 24px;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
}
