/* ProRent - Premium Bootstrap Tema Eklentisi */
/* Bootstrap 5 ile Optimize Edilmiştir & W3C Uyumludur */

/* =========================================
   1. DEĞİŞKENLER VE TEMA ÜSTÜNE YAZMA
   ========================================= */
:root {
    /* Marka Renkleri */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #0f172a;
    --accent-color: #eab308;

    /* Metin ve Arka Plan */
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;

    /* Bootstrap Üstüne Yazılanlar */
    --bs-primary: #2563eb;
    --bs-body-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --bs-body-bg: var(--bg-light);

    /* Premium Animasyon Değişkenleri */
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
    font-family: var(--bs-body-font);
    color: var(--text-dark);
    /* Yazı tipi yedeğinin düzen kaymasına neden olmamasını sağlayın */
    font-display: swap;
    overflow-x: hidden;
    /* Küresel olarak yatay kaydırmayı engelle */
    width: 100%;
    position: relative;

    /* Global Animasyon Kaldırıldı - Kartlar ayrı ayrı açılacak */
}

@keyframes revealFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Kartların başlangıç hali (JS ile tetiklenecek) */
.feature-card,
.vehicle-card,
.blog-card,
.card-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

/* Görünür hale geldiğinde */
.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#availabilityStatus {
    position: relative;
    z-index: 100 !important;
}

/* Bootstrap satırlarının taşmaya neden olması için düzeltme */
.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--bs-gutter-y));
    margin-right: calc(-0.5 * var(--bs-gutter-x));
    margin-left: calc(-0.5 * var(--bs-gutter-x));
}

.container,
.container-fluid {
    position: relative;
    /* overflow: hidden kaldırıldı - menü taşmalarını engelliyordu */
}

/* =========================================
   2. NAVBAR VE BAŞLIK (HEADER)
   ========================================= */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    transition: var(--transition-smooth);
    /* CLS önleme için yükseklik rezerve et */
    min-height: 76px;
    z-index: 1030;
    /* Bootstrap fixed-top değeri */
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -0.5px;
}

.navbar-brand img {
    /* Logonun düzen kaymasına neden olmamasını sağlayın */
    aspect-ratio: 3 / 1;
    object-fit: contain;
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Dil Seçici Dropdown Üstüne Yazma */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    display: none;
    z-index: 1050 !important;
    /* Her zaman üstte kalsın */
}

.dropdown-menu.show {
    animation: dropdownFade 0.3s ease-out forwards;
    display: block !important;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   SAYFA ÜSTÜ YÜKLEME BARI (LOADING BAR)
   ========================================= */
.top-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    /* Increased height */
    background: linear-gradient(90deg, #dc2626, #fca5a5);
    /* Bright Red-Orange Gradient */
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
    /* Glow effect */
    z-index: 10000;
    transition: width 0.3s ease;
}

.loading-bar-finished {
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}


/* =========================================
   3. HERO (KAHRAMAN) VE BÖLÜMLER
   ========================================= */
.hero-section {
    position: relative;
    background-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.8)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    /* Mobil performans için background-attachment: fixed kaldırıldı */
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: white;
    margin-top: -76px;
    padding-top: 76px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    /* Boyama performansını artır */
    contain: layout style paint;
}

.hero-content {
    animation: fadeInUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .hero-section {
        height: auto;
        padding-bottom: 5rem;
        clip-path: none;
    }
}

/* =========================================
   4. KARTLAR (Özellikler, Araçlar, Blog)
   ========================================= */
.feature-card,
.vehicle-card,
.blog-card,
.auth-card {
    transition: var(--transition-bounce);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover,
.vehicle-card:hover,
.blog-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12) !important;
    border-color: var(--primary-color);
}

/* Özellik Detayları */
.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-bounce);
}

.feature-card:hover .feature-icon {
    background: var(--primary-color);
    color: white;
    transform: rotate(10deg);
}

/* Araç Detayları */
.vehicle-img {
    height: 240px;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.vehicle-card:hover .vehicle-img {
    transform: scale(1.1);
}

.bg-light-subtle {
    background-color: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

.group-hover-arrow:hover .bi-arrow-right {
    transform: translateX(5px);
}

.transition-transform {
    transition: transform 0.3s ease;
}

/* Blog Detayları */
.blog-img {
    height: 200px;
    object-fit: cover;
}

/* =========================================
   5. KİMLİK DOĞRULAMA (AUTO) SAYFALARI
   ========================================= */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem 0;
}

.auth-cover {
    background-size: cover;
    background-position: center;
}

/* =========================================
   6. YARDIMCI ARAÇLAR VE ÖZELLİKLER
   ========================================= */
.hover-scale {
    transition: var(--transition-bounce);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.text-justify {
    text-align: justify;
}

/* Form Floating İnce Ayarları */
.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: var(--primary-color);
    opacity: 0.8;
}

/* Özel Kaydırma Çubuğu (Scrollbar) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Galeri Düzeltmeleri */
.main-gallery-container {
    min-height: 500px;
}

#mainImage {
    height: 500px;
    object-fit: cover;
}

/* Kaydırma çubuklarını gizle ama işlevselliği koru */
.overflow-auto::-webkit-scrollbar {
    display: none;
}

.overflow-auto {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Metin taşmalarını düzelt */
h1,
h2,
h3,
h4,
h5,
h6 {
    word-break: break-word;
}

/* =========================================
   7. MOBİL OPTİMİZASYONLAR
   ========================================= */

@media (max-width: 768px) {
    .main-gallery-container {
        min-height: 250px !important;
    }

    .hero-section {
        padding-top: 100px;
        padding-bottom: 3rem;
        height: auto;
        min-height: auto;
    }

    .display-4 {
        font-size: 2.25rem;
    }

    .btn-lg {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    /* Mobilde butonları alt alta diz */
    .hero-content .d-flex {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .hero-content .btn {
        width: 100%;
        margin: 0 !important;
    }

    /* Mobilde Araç Detay Galerisi */
    #mainImage {
        height: 300px !important;
        /* Mobilde daha kısa */
        object-fit: cover !important;
    }

    .thumbnail-item {
        width: 60px !important;
        height: 45px !important;
    }

    /* Boşluk ayarlamaları */
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    /* Blog ve İçerik Kartları */
    .content-card {
        padding: 1.25rem !important;
        border-radius: 1.5rem !important;
    }

    .blog-detail-hero {
        padding-top: 100px;
        padding-bottom: 40px;
        min-height: auto;
    }

    .blog-article-body {
        font-size: 1rem;
        line-height: 1.6;
    }

    .blog-excerpt {
        font-size: 1.1rem !important;
        padding: 1rem !important;
    }
}

/* Chrome, Safari, Edge için mobil kaydırma çubuğu düzeltmesi */
@media (max-width: 576px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .display-5 {
        font-size: 1.75rem;
    }
}