:root {
    --primary: #0056b3;
    --primary-dark: #003d7a;
    --secondary: #f8f9fa;
    --accent: #ffc107;
    --text-main: #212529;
    --text-muted: #6c757d;
    --bg-light: #ffffff;
    --bg-dark: #121212;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--secondary);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

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

/* Header & Nav */
.top-bar {
    background: #002d5a;
    color: white;
    font-size: 0.85rem;
    height: 35px;
    overflow: hidden;
}

.text-ticker {
    position: relative;
    height: 35px;
    width: 300px;
}

.ticker-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.ticker-item.active {
    opacity: 1;
    transform: translateY(0);
}

.ticker-item.exit {
    opacity: 0;
    transform: translateY(-20px);
}

.top-social a {
    color: white;
    margin-left: 15px;
    text-decoration: none;
    transition: var(--transition);
}

.top-social a:hover {
    color: var(--accent);
}

header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo span {
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
}

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

.contact-btn {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.contact-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.waving-flag {
    height: 35px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: wave 3s ease-in-out infinite;
    transform-origin: left center;
}

@keyframes wave {
    0% { transform: rotate(0deg) skewY(0deg); }
    25% { transform: rotate(2deg) skewY(1deg); }
    50% { transform: rotate(0deg) skewY(0deg); }
    75% { transform: rotate(-2deg) skewY(-1deg); }
    100% { transform: rotate(0deg) skewY(0deg); }
}

/* Hero Section */
.hero {
    height: 90vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 0;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1.2s ease;
}

/* Search Bar Redesign */
.search-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    display: flex;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

.search-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 140px;
}

.search-field label {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-field select, 
.search-field input {
    border: 2px solid #f0f0f0;
    padding: 12px 15px;
    border-radius: 10px;
    outline: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
    background: #fff;
}

.search-field select:focus, 
.search-field input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.05);
}

.search-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 0 45px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.3);
}

.search-btn i {
    font-size: 1.2rem;
}

/* Section Styling */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.section-title .underline {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid #eee;
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.listing-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    max-width: 450px;
    width: 100%;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.listing-img {
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.listing-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.listing-price {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 800;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.listing-content {
    padding: 20px;
}

.listing-content h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.listing-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.listing-features {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: white;
    padding: 80px 0 30px;
}

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

.footer-section h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #777;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
form input, form textarea {
    transition: var(--transition);
}

form input:focus, form textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
}

/* Mobile Responsive Adjustments */
@media (max-width: 1024px) {
    .search-container {
        flex-wrap: wrap;
        gap: 15px;
    }
    .search-field {
        min-width: calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    /* Top Bar */
    .top-bar { display: none !important; }

    /* Header & Nav - Kesin Müdahale */
    header { padding: 5px 0 !important; }
    
    nav {
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 10px 0 !important;
    }
    
    .logo {
        font-size: 1.1rem !important;
        margin-bottom: 5px !important;
    }
    
    .nav-links {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 15px !important;
        width: 100% !important;
        padding: 10px 0 !important;
        border-top: 1px solid #eee !important;
        font-size: 0.85rem !important;
    }
    
    .contact-btn {
        width: 100% !important;
        text-align: center !important;
        padding: 12px !important;
        font-size: 0.9rem !important;
        display: block !important;
    }

    /* Hero Section */
    .hero {
        padding: 30px 0 !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .hero-content h1 {
        font-size: 1.4rem !important;
    }

    /* Detail Page Gallery - Kesin Çözüm */
    .detail-container {
        padding: 15px 0 !important;
        display: block !important; /* Grid'i bozup alt alta dizelim */
    }

    .gallery-main {
        height: 250px !important;
        background-size: cover !important; /* Boşluk kalmaması için şart */
        background-position: center !important;
        border-radius: 8px !important;
        margin-bottom: 10px !important;
        width: 100% !important;
    }
    
    .gallery-thumbs {
        display: flex !important;
        gap: 8px !important;
        overflow-x: auto !important;
        padding-bottom: 10px !important;
    }
    
    .thumb {
        width: 80px !important;
        height: 60px !important;
        flex-shrink: 0 !important;
    }

    .property-header h1 {
        font-size: 1.3rem !important;
        line-height: 1.4 !important;
    }
    
    .price-badge {
        font-size: 1.2rem !important;
        margin: 15px 0 !important;
        display: inline-block !important;
    }
    
    .detail-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    .agent-sidebar {
        margin-top: 30px !important;
        width: 100% !important;
    }
}

/* Detail Page Styles */
.detail-container {
    padding: 40px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
}

@media (max-width: 992px) {
    .detail-container {
        grid-template-columns: 1fr;
    }
    
    .agent-sidebar {
        order: 2;
    }
    
    .property-content {
        order: 1;
    }
}

.gallery-main {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #f8f9fa;
    background-position: center;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.gallery-main:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev { left: 20px; }
.gallery-nav.next { right: 20px; }

.gallery-thumbs {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #eee;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.gallery-thumbs::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.thumb {
    flex: 0 0 calc(25% - 12px);
    min-width: 150px;
    height: 100px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumb:hover, .thumb.active {
    border-color: var(--primary);
}

.property-info h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.property-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    color: var(--text-muted);
}

.price-tag {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.feature-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.feature-item label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.feature-item span {
    font-weight: 700;
    font-size: 1.1rem;
}

.description {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    line-height: 1.8;
}

.agent-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.agent-card-detail {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.agent-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.detail-btn {
    display: block;
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 10px;
    transition: var(--transition);
}

.btn-call { background: var(--primary); color: white; }
.btn-whatsapp { background: #25d366; color: white; }

.btn-call:hover { background: var(--primary-dark); }
.btn-whatsapp:hover { background: #128c7e; }

@media (max-width: 992px) {
    .detail-container {
        grid-template-columns: 1fr;
    }
    
    .agent-sidebar {
        position: static;
    }

    .gallery-main {
        height: 300px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

/* Admin Dashboard Styles */
.admin-body {
    background: #f4f7f6;
    display: flex;
}

.admin-sidebar {
    width: 280px;
    height: 100vh;
    background: #1a2226;
    color: white;
    position: fixed;
    padding: 30px 0;
}

.admin-sidebar .logo {
    padding: 0 30px 40px;
    color: white;
}

.admin-menu {
    list-style: none;
}

.admin-menu li {
    padding: 15px 30px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.admin-menu li:hover, .admin-menu li.active {
    background: var(--primary);
    color: white;
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
}

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

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.admin-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-form-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-form-group input, 
.admin-form-group select, 
.admin-form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.admin-form-group input:focus { border-color: var(--primary); }

.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }

@media (max-width: 992px) {
    .admin-sidebar { width: 80px; }
    .admin-sidebar .logo span, .admin-menu li span { display: none; }
    .admin-main { margin-left: 80px; }
}

@media (max-width: 768px) {
    .admin-body {
        flex-direction: column !important;
    }
    
    .admin-sidebar {
        width: 100% !important;
        height: auto !important;
        position: static !important;
        padding: 15px 0 !important;
        border-bottom: 1px solid #333;
    }
    
    .admin-sidebar .logo {
        padding: 0 20px 15px !important;
        text-align: center;
        font-size: 1rem !important;
    }
    
    .admin-menu {
        display: flex !important;
        overflow-x: auto !important;
        padding: 0 10px !important;
        gap: 5px !important;
    }
    
    .admin-menu li {
        padding: 10px 15px !important;
        white-space: nowrap !important;
        font-size: 0.8rem !important;
        border-radius: 6px !important;
    }
    
    .admin-menu li span {
        display: inline !important;
    }
    
    .admin-main {
        margin-left: 0 !important;
        padding: 20px 15px !important;
    }
    
    .admin-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        margin-bottom: 25px !important;
    }
    
    .admin-header h1 {
        font-size: 1.4rem !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .admin-form-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .admin-card {
        padding: 20px 15px !important;
    }

    .admin-table th, .admin-table td {
        padding: 10px !important;
        font-size: 0.85rem !important;
    }
}
