/* 1. GLOBAL DEĞİŞKENLER & BASE */
:root {
    --primary: #0052FF;
    --secondary: #00C2FF;
    --primary-gradient: linear-gradient(135deg, #0052FF 0%, #00C2FF 100%);
    --dark: #0A192F;
    --dark-navy: #0F172A;
    --text: #475569;
    --bg: #F8FAFC;
    --white: #FFFFFF;
    --gold: #B8860B;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --glow-shadow: 0 8px 20px rgba(0, 82, 255, 0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo, .oc-section-label { font-family: 'Readex Pro', sans-serif; }
a { text-decoration: none !important; transition: 0.3s; }

/* 2. HEADER (page-header.php) */
.main-header-wrapper {
    background: var(--white);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-bar { height: 75px; }

.main-header-wrapper .logo img { height: 45px; width: auto; }

/* Arama Çubuğu Optimizasyonu */
.head-search { display: flex; align-items: center; }

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #94a3b8;
    z-index: 5;
    font-size: 16px;
}

.header-search-input {
    height: 46px;
    padding-left: 45px !important;
    border-radius: 50px !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.3s ease;
}

.header-search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.15) !important;
    outline: none;
}

/* Sağ Menü İkonları */
.gradient-icon {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 22px;
}

.user-avatar-circle {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.count-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #FF3B30;
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.head-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    position: relative;
}

.nav-link-item {
    color: var(--text);
    padding: 15px 20px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid transparent;
}

.nav-link-item.active, .nav-link-item:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* 3. HERO SECTION (index.php) */
.hero {
    background: linear-gradient(135deg, var(--dark-navy) 0%, var(--primary) 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
}

.hero h1 { font-size: 42px; margin-bottom: 15px; }
.hero h1 span { color: var(--secondary); }
.hero p { font-size: 18px; opacity: 0.9; margin-bottom: 40px; }

.search-box {
    background: var(--white);
    padding: 10px;
    border-radius: 50px;
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.search-input {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-right: 1px solid #eee;
}

.search-input i { color: var(--primary); margin-right: 10px; }
.search-input select, .search-input input {
    border: none; outline: none; width: 100%; font-size: 16px; background: transparent;
}

.btn-search {
    background: var(--dark-navy);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
}

/* 4. KATEGORİ BAR (index.php) */
.categories-bar { background: var(--white); padding: 15px 0; border-bottom: 1px solid #eee; }
.cat-item {
    display: inline-block;
    padding: 10px 25px;
    margin-right: 10px;
    background: #f1f5f9;
    border-radius: 50px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.cat-item.active, .cat-item:hover { background: var(--primary); color: white; }

/* 5. BARİYERLİ KLİNİK KARTLARI (index.php) */
.section-title { margin: 50px 0 30px; text-align: center; }
.clinic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

.clinic-barrier-card {
    position: relative;
    height: 320px;
    border-radius: 40px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    background: #eee;
    transition: 0.4s ease;
}

.clinic-barrier-card:hover { transform: translateY(-5px); }

.card-image-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    z-index: 1;
}

.info-barrier {
    position: relative;
    z-index: 5;
    background: var(--white);
    width: 100%;
    min-height: 120px;
    border-radius: 35px;
    display: grid;
    grid-template-columns: 1.8fr 1fr 1.2fr;
    padding: 20px 25px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.barrier-left h3 {
    font-size: 24px;
    font-weight: 800;
    color: #002D72;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loc-sub { font-size: 14px; color: var(--primary); font-weight: 600; }
.stars-gold { font-size: 14px; color: var(--gold); font-weight: 700; }

.barrier-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-left: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    padding: 0 10px;
}

.b-cat-inline {
    font-size: 10px;
    border: 1px solid var(--gold);
    color: #002D72;
    padding: 2px 8px;
    border-radius: 5px;
    margin-bottom: 5px;
}

.b-marka, .b-model { font-size: 13px; color: var(--gold); font-weight: 600; line-height: 1.2; }

.barrier-right { text-align: right; }
.price-gold { font-size: 28px; font-weight: 900; color: var(--gold); line-height: 1; }
.price-sub { font-size: 10px; color: var(--gold); font-weight: 600; }

.ps-badge-v2 {
    position: absolute; top: 20px; right: 20px;
    background: var(--white); color: var(--primary);
    padding: 6px 15px; border-radius: 50px;
    font-size: 11px; font-weight: 800; z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 6. OFF-CANVAS (page-offcanvas.php) */
.offcanvas { width: 320px !important; }
.oc-section-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #94a3b8; }
.offcanvas-modern-menu { list-style: none; padding: 0 15px; }
.offcanvas-modern-menu li a {
    display: flex; align-items: center; padding: 14px 15px;
    color: var(--dark-navy) !important; font-size: 15px; font-weight: 500;
    border-radius: 12px; margin-bottom: 2px;
}
.offcanvas-modern-menu li a:hover { background: #f1f5f9; color: var(--primary) !important; }
.offcanvas-modern-menu li a .arrow-icon { font-size: 10px; opacity: 0.3; margin-left: auto; }

/* 7. FOOTER & MOBİL NAV (page-footer.php) */
footer { background: var(--white); }
.pact-menu { display: flex; list-style: none; gap: 20px; padding: 15px; }
.pact-item a { color: var(--text); font-size: 13px; font-weight: 600; }

.mobil-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: var(--white); border-top: 1px solid #eee;
    z-index: 999; display: none;
}

.mb-menu { display: flex; list-style: none; padding: 10px 0; margin: 0; }
.mb-menu li { flex: 1; text-align: center; }
.mb-menu li a { color: var(--text); font-size: 11px; font-weight: 600; position: relative; }
.mb-menu .icon { font-size: 20px; margin-bottom: 2px; }
.mb-menu .num {
    position: absolute; top: -5px; right: 15px;
    background: var(--primary); color: white;
    font-size: 9px; padding: 2px 6px; border-radius: 50px;
}

.wa-me {
    position: fixed; bottom: 85px; right: 20px;
    background: #25d366; color: white;
    padding: 10px 20px; border-radius: 50px;
    font-weight: 700; z-index: 998;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    display: flex; align-items: center; gap: 10px;
}

/* 8. RESPONSIVE */
@media (max-width: 992px) {
    .clinic-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
    .search-box { flex-direction: column; border-radius: 25px; }
    .search-input { border-right: none; border-bottom: 1px solid #eee; padding: 15px; }
    .info-barrier { grid-template-columns: 1.5fr 1fr; }
    .barrier-mid { display: none; }
}

@media (max-width: 768px) {
    .d-n-md { display: none !important; }
    .mobil-nav { display: block; }
    body { padding-bottom: 70px; }
    .clinic-barrier-card { height: 260px; border-radius: 30px; }
    .barrier-left h3 { font-size: 20px; }
    .price-gold { font-size: 24px; }
}


/* Mobil Scroll Header Dönüşümü */
@media (max-width: 768px) {
    /* Normal durumda favicon gizli kalsın */
    .scroll-favicon { display: none !important; }

    /* Sayfa kaydırıldığında (JS ile eklenecek class) */
    .main-header-wrapper.sticky-active {
        padding: 5px 0;
        height: 60px;
    }

    /* 1. Menü butonunu gizle */
    .main-header-wrapper.sticky-active .h-bar {
        display: none !important;
    }

    /* 2. Logoyu küçült favicon yap */
    .main-header-wrapper.sticky-active .main-logo {
        display: none !important;
    }
    .main-header-wrapper.sticky-active .scroll-favicon {
        display: block !important;
        height: 32px !important;
        width: auto;
        margin-left: 15px;
    }

    /* 3. Arama çubuğunu genişlet ve öne çıkar */
    .main-header-wrapper.sticky-active .head-search {
        display: block !important;
        padding-right: 15px;
    }
    
    .main-header-wrapper.sticky-active .header-search-input {
        height: 40px !important;
        background-color: #f1f5f9 !important;
    }

    /* 4. Sağ taraftaki menü öğelerini (Saved, Login vs) scroll anında mobilde gizle (opsiyonel, istersen kalsın) */
    .main-header-wrapper.sticky-active .head-menu {
        display: none !important;
    }
}


/* --- MOBIL SCROLL TRANSFORMATION --- */
@media (max-width: 768px) {
    /* 1. Normal Durumda Arama Çubuğunu Gizle (Opsiyonel: Başta logo görünsün istiyorsan) */
    /* .head-search { display: none; } */

    /* 2. Scroll Olduğunda Header Değişimi */
    .header-scrolled {
        position: fixed !important;
        top: 0;
        width: 100%;
        height: 60px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
        background: #fff !important;
        z-index: 9999;
    }

    .header-scrolled .header-top-bar { height: 60px !important; }

    /* Menü Butonunu ve Sağ Menüyü Gizle */
    .header-scrolled .h-bar, 
    .header-scrolled .head-menu { 
        display: none !important; 
    }

    /* Ana Logoyu Gizle, Faviconu Göster */
    .header-scrolled .main-logo { 
        display: none !important; 
    }
    .header-scrolled .scroll-favicon {
        display: block !important;
        width: 32px !important;
        height: 32px !important;
        margin-left: 10px;
        object-fit: contain;
    }

    /* Arama Çubuğunu Header'a Yay */
    .header-scrolled .head-search {
        display: flex !important;
        flex: 1;
        padding: 0 !important;
    }

    .header-scrolled .header-search-input {
        height: 40px !important;
        background: #f1f5f9 !important;
        border-radius: 12px !important;
        font-size: 14px;
    }

    .header-scrolled .search-icon {
        font-size: 14px;
    }
}

/* Masaüstünde Arama Her Zaman Görünsün */
@media (min-width: 992px) {
    .head-search { display: flex !important; }
}



