/* ========================================
   RESPONSIVE STİLLER
   ======================================== */

/* Tablet */
@media (max-width: 991px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .search-box {
        margin-top: -40px;
        padding: 20px;
    }
    
    .property-gallery .main-image img {
        width: 100%;
        height: auto;
    }
    
    .map-container {
        height: 300px;
    }
    
    .street-view-container {
        height: 280px;
    }
}

/* Mobil */
@media (max-width: 767px) {
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero {
        min-height: 300px;
        padding-top: 15px;
    }
    
    .hero-content {
        padding: 15px 0;
    }
    
    .search-box {
        margin-top: -30px;
        padding: 15px;
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .search-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        padding: 10px;
    }
    
    .search-tabs .nav-link {
        padding: 14px 20px;
        min-width: 100px;
        font-size: 14px;
        min-height: 44px; /* Touch-friendly */
        flex: 1;
        text-align: center;
    }
    
    .search-form-content {
        padding: 20px 15px;
    }
    
    .search-box .row {
        margin: 0;
    }
    
    .search-box .row > div {
        margin-bottom: 12px;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Form elemanları için touch-friendly boyutlar */
    .search-box .form-control,
    .search-box .form-select {
        min-height: 44px; /* Minimum touch target size */
        font-size: 16px; /* iOS zoom önleme */
        padding: 12px 16px;
        width: 100%;
    }
    
    .btn-search {
        min-height: 44px; /* Touch-friendly */
        padding: 12px 24px;
        width: 100%;
        font-size: 16px;
    }
    
    /* Arama formu grid düzeni mobilde tek sütun */
    .search-box .row.g-3 > [class*="col-"] {
        width: 100%;
        max-width: 100%;
    }
    
    /* Genel form elemanları */
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px; /* iOS zoom önleme */
    }
    
    /* Butonlar için touch-friendly boyutlar */
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 10px 20px;
    }
    
    .btn-sm {
        min-height: 36px;
        min-width: 36px;
        padding: 8px 16px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .property-card {
        margin-bottom: 15px;
    }
    
    .property-image {
        height: 200px;
    }
    
    .property-price {
        font-size: 1.25rem;
    }
    
    .property-title {
        font-size: 1rem;
    }
    
    .property-features {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .property-gallery .main-image img {
        width: 100%;
        height: auto;
    }
    
    .property-gallery .thumbnails {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .property-gallery .thumb {
        flex-shrink: 0;
        width: 80px;
        height: 60px;
    }
    
    .property-info-box {
        padding: 15px;
    }
    
    .property-info-box h4 {
        font-size: 1rem;
    }
    
    .info-list li {
        flex-direction: column;
        gap: 5px;
    }
    
    .map-container {
        height: 250px;
    }
    
    .street-view-container {
        height: 220px;
    }
    
    .map-tabs {
        flex-wrap: wrap;
    }
    
    .map-tab {
        flex: 1;
        text-align: center;
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .col-lg-4,
    .footer .col-lg-2,
    .footer .col-lg-3 {
        margin-bottom: 30px;
    }
    
    .breadcrumb {
        font-size: 14px;
    }
    
    .pagination .page-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Admin Panel Mobil */
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 20px !important;
    }
    
    .category-item {
        padding: 20px 15px !important;
    }
    
    .category-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 28px !important;
        margin-bottom: 15px !important;
    }
    
    .category-name {
        font-size: 16px !important;
    }
    
    /* Navbar Mobil Optimizasyonları */
    .navbar-toggler {
        min-width: 44px;
        min-height: 44px;
        padding: 8px 12px;
        border: 2px solid var(--border);
        border-radius: var(--radius);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(253, 86, 49, 0.1);
        outline: none;
    }
    
    .navbar-toggler-icon {
        width: 24px;
        height: 24px;
    }
    
    .navbar-collapse {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid var(--border);
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 5px;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 16px !important;
        min-height: 44px; /* Touch-friendly */
        display: flex;
        align-items: center;
        border-radius: var(--radius);
        margin: 0 !important;
    }
    
    .navbar-nav .nav-link::after {
        display: none; /* Mobilde alt çizgiyi kaldır */
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background: rgba(253, 86, 49, 0.1);
        color: var(--secondary) !important;
    }
    
    /* Header'daki favori ve karşılaştırma linkleri */
    .header .navbar-collapse .d-flex.align-items-center {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
        width: 100%;
        align-items: stretch !important;
    }

    .header .navbar-collapse .language-selector {
        grid-column: 1 / -1;
        width: 100%;
    }

    .header .navbar-collapse .language-selector .btn-link {
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
        min-height: 44px;
        padding: 12px 16px !important;
        border-radius: var(--radius);
    }

    .header .navbar-collapse .language-selector .btn-link::after {
        display: none !important;
    }

    .header .navbar-collapse .language-selector .dropdown-menu {
        position: static !important;
        inset: auto !important;
        transform: none !important;
        float: none;
        width: 100%;
        max-width: 100%;
        margin-top: 6px;
        margin-bottom: 4px;
        border: 1px solid var(--border);
        box-shadow: none;
    }

    .header .navbar-collapse .language-selector .dropdown-item {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .favorites-link,
    .compare-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px !important;
        border-radius: var(--radius);
    }
    
    .btn-post-listing {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        min-height: 44px;
    }
}

/* Küçük Mobil */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero {
        min-height: 250px;
        padding-top: 10px;
    }
    
    .hero-content {
        padding: 10px 0;
    }
    
    .search-box {
        margin-top: -20px;
        padding: 12px;
        margin-left: 5px;
        margin-right: 5px;
    }
    
    .search-tabs {
        padding: 8px;
        gap: 3px;
    }
    
    .search-tabs .nav-link {
        padding: 12px 16px;
        min-width: 90px;
        font-size: 13px;
    }
    
    .search-form-content {
        padding: 15px 10px;
    }
    
    .property-image {
        height: 200px;
    }
    
    .property-content {
        padding: 15px;
    }
    
    .btn-search {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .city-card {
        padding: 15px !important;
    }
    
    .city-card h5 {
        font-size: 14px;
    }
    
    /* Küçük ekranlarda form elemanları */
    .search-box .form-control,
    .search-box .form-select {
        font-size: 16px; /* iOS zoom önleme için önemli */
        padding: 10px 14px;
    }
    
    /* Navbar brand küçük ekranlarda */
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-brand img {
        max-height: 30px;
        max-width: 150px;
    }
    
    /* Section başlıkları küçük ekranlarda */
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }
    
    /* Kategori grid küçük ekranlarda */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .category-item {
        padding: 15px 10px !important;
    }
    
    .category-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }
    
    .category-name {
        font-size: 14px !important;
    }
    
    /* Property card küçük ekranlarda */
    .property-card {
        margin-bottom: 20px;
    }
    
    .property-title {
        font-size: 0.95rem;
        min-height: 2.8em;
    }
    
    .property-location {
        font-size: 13px;
    }
    
    .property-feature {
        font-size: 12px;
    }
    
    /* Container padding küçük ekranlarda */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Footer küçük ekranlarda */
    .footer {
        padding: 30px 0;
    }
    
    .footer h5,
    .footer h6 {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .footer .col-lg-4,
    .footer .col-lg-2,
    .footer .col-lg-3 {
        margin-bottom: 25px;
    }
}

/* Çok küçük ekranlar (320px-375px) */
@media (max-width: 375px) {
    .hero h1 {
        font-size: 1.3rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .search-box {
        margin-top: -15px;
        padding: 10px;
    }
    
    .search-tabs .nav-link {
        padding: 10px 12px;
        min-width: 80px;
        font-size: 12px;
    }
    
    .search-form-content {
        padding: 12px 8px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .btn {
        font-size: 14px;
        padding: 10px 16px;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .search-box,
    .breadcrumb,
    .pagination,
    .map-tabs,
    #propertyMap,
    #streetView {
        display: none !important;
    }
    
    .property-gallery .main-image {
        height: auto;
        page-break-inside: avoid;
    }
    
    .property-info-box {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========================================
   MOBİL-ÖNCELİKLİ (320–430px) — masaüstünün küçültülmüş kopyası değil
   ======================================== */
@media (max-width: 430px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    body {
        overflow-x: hidden;
    }

    .container,
    .container-fluid {
        padding-left: 14px;
        padding-right: 14px;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 1.35rem;
        line-height: 1.25;
        letter-spacing: -0.02em;
    }

    .hero p {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    h1, .h1 { font-size: 1.375rem; line-height: 1.25; }
    h2, .h2 { font-size: 1.2rem; line-height: 1.3; }
    h3, .h3 { font-size: 1.075rem; line-height: 1.35; }
    .section-title,
    .section-header h2 { font-size: 1.125rem; margin-bottom: 1.25rem; }

    .page-mobile-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px;
    }

    .page-mobile-header .btn {
        width: 100%;
        justify-content: center;
    }

    .row.g-3:not(.emlak-listing-grid) > [class*="col-"]:not(.emlak-listing-col),
    .row.g-4:not(.emlak-listing-grid) > [class*="col-"]:not(.emlak-listing-col),
    #favoritesGrid:not(.emlak-listing-grid) > [class*="col-"]:not(.emlak-listing-col) {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .property-card {
        margin-bottom: 14px;
    }

    .property-image {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .property-image img {
        object-fit: cover;
        object-position: center;
    }

    .property-title {
        font-size: 0.95rem;
        line-height: 1.35;
        min-height: 0;
    }

    .property-price,
    .property-price-overlay {
        font-size: 1.05rem;
    }

    .property-detail-layout {
        flex-direction: column;
        gap: 0;
    }

    .property-detail-main {
        order: 1;
    }

    .property-detail-sidebar {
        order: 2;
    }

    .property-detail-page .property-info-box h1.h3 {
        font-size: 1.15rem;
        line-height: 1.35;
    }

    .property-detail-page .property-price.h2 {
        font-size: 1.35rem !important;
        text-align: left !important;
        margin-top: 0.5rem;
    }

    .property-detail-page .property-info-box .row.align-items-start > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .property-detail-page .property-action-bar {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 12px;
    }

    .property-gallery .main-image-wrapper,
    .property-gallery .main-image {
        aspect-ratio: 4 / 3;
        max-height: none;
    }

    .property-gallery .main-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .property-gallery .thumbnails {
        gap: 8px;
        padding-bottom: 4px;
        margin-top: 10px;
    }

    .property-gallery .thumb {
        width: 72px;
        height: 54px;
        flex: 0 0 72px;
    }

    .property-detail-page .info-list li {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
    }

    .property-detail-page #appointmentForm .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .property-detail-page .form-control,
    .property-detail-page .form-select {
        min-height: 48px;
        font-size: 16px;
    }

    .search-results-col {
        order: 1;
    }

    .search-filters-col {
        order: 2;
    }

    .search-filters-col .card,
    .search-filters-col form {
        border-radius: 12px;
    }

    .search-filters-col .form-control,
    .search-filters-col .form-select {
        min-height: 48px;
        font-size: 16px;
    }

    .table-responsive {
        border: 0;
    }

    .breadcrumb {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    img,
    video,
    iframe {
        max-width: 100%;
    }
}

/* ========================================
   İLAN KART GRİD — mobil 2 kolon (Bootstrap flex override)
   ======================================== */
@media (max-width: 767.98px) {
    .emlak-listing-grid,
    .row.g-4:has(> .emlak-listing-col),
    .row.g-4:has(> [class*="col-"] > .emlak-card),
    .row.g-4:has(> [class*="col-"] > .property-card),
    #favoritesGrid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem 0.65rem;
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
    }

    .emlak-listing-grid > *,
    .row.g-4:has(> .emlak-listing-col) > *,
    .row.g-4:has(> [class*="col-"] > .emlak-card) > *,
    .row.g-4:has(> [class*="col-"] > .property-card) > *,
    #favoritesGrid > * {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Klasik kart — görsel üstü kalabalığı gider, fiyat alta al */
    .emlak-listing-grid .property-image {
        height: auto;
        aspect-ratio: 4/3;
    }

    .emlak-listing-grid .property-price-overlay {
        display: none !important;
    }

    .emlak-listing-grid .property-price-mobile {
        display: block;
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--primary, #1a2332);
        margin: 0 0 6px;
    }

    .emlak-listing-grid .property-badge {
        top: 6px;
        left: 6px;
        padding: 2px 6px;
        font-size: 0.58rem;
        border-radius: 4px;
    }

    .emlak-listing-grid .property-featured {
        top: 28px;
        left: 6px;
        padding: 2px 5px;
        font-size: 0.55rem;
        border-radius: 4px;
    }

    .emlak-listing-grid .property-virtual-tour {
        display: none;
    }

    .emlak-listing-grid .favorite-btn {
        top: 6px;
        right: 6px;
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .emlak-listing-grid .compare-checkbox-wrapper {
        bottom: 6px;
        right: 6px;
    }

    .emlak-listing-grid .compare-label {
        width: 26px;
        height: 26px;
    }

    .emlak-listing-grid .compare-label i {
        font-size: 12px;
    }

    .emlak-listing-grid .property-content {
        padding: 10px;
    }

    .emlak-listing-grid .property-title {
        font-size: 0.82rem;
        min-height: 0;
        margin-bottom: 4px;
    }

    .emlak-listing-grid .property-location {
        font-size: 0.72rem;
        margin-bottom: 8px;
    }

    .emlak-listing-grid .property-features {
        padding-top: 8px;
        gap: 4px;
        flex-wrap: wrap;
    }

    .emlak-listing-grid .property-feature {
        font-size: 0.65rem;
        padding: 0 4px;
        flex: 0 0 auto;
    }

    .emlak-listing-grid .property-feature:not(:last-child)::after {
        display: none;
    }
}
