/**
 * Service Pages Overlap Fix
 * Hizmet sayfalarındaki üst üste binme sorunlarını düzeltir
 */

/* ============================================
   SERVICE SINGLE SPACING FIXES
   ============================================ */

/* Service single main spacing */
.single-service .service-single {
    padding-top: 100px !important; /* Header altında yeterli boşluk */
    margin-top: 0 !important;
}

/* Breadcrumb spacing for service pages */
.single-service .breadcrumb,
.single-service .xb-breadcrumb,
.single-service .breadcrumb-area {
    padding-top: 140px !important;
    margin-bottom: 40px !important;
}

/* Service archive page spacing */
.post-type-archive-service .main-content,
.archive.tax-service_category .main-content {
    padding-top: 100px !important;
}

/* ============================================
   HEADER OVERLAP FIXES FOR SERVICE
   ============================================ */

/* Sticky header compensation */
body.single-service.has-sticky-header {
    padding-top: 80px !important;
}

/* Fixed header için içerik kaydırma */
.single-service .vt-header-main.sticky ~ .service-single,
.single-service .header-area.sticky ~ .service-single {
    margin-top: 80px !important;
}

/* ============================================
   SERVICE CONTENT LAYOUT
   ============================================ */

/* Service detail container */
.service-detail-container,
.service-details-wrapper {
    position: relative;
    z-index: 1;
    background: #ffffff;
    padding: 30px 0;
}

/* Sidebar positioning */
.service-sidebar,
.service-detail-sidebar {
    position: relative;
    z-index: 10;
    margin-top: 0;
}

/* Service content area */
.service-content-area {
    position: relative;
    z-index: 5;
}

/* ============================================
   MOBILE RESPONSIVE FIXES
   ============================================ */

@media (max-width: 991px) {
    /* Tablet spacing */
    .single-service .service-single {
        padding-top: 80px !important;
    }
    
    .single-service .breadcrumb {
        padding-top: 100px !important;
    }
    
    /* Sidebar mobile düzeni */
    .service-sidebar {
        margin-top: 40px !important;
    }
}

@media (max-width: 767px) {
    /* Mobile spacing */
    .single-service .service-single {
        padding-top: 70px !important;
    }
    
    .single-service .breadcrumb {
        padding-top: 80px !important;
        padding-bottom: 20px !important;
    }
    
    /* Container padding mobile */
    .service-single .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Service cards mobile */
    .service-card,
    .service-item {
        margin-bottom: 20px !important;
    }
}

/* ============================================
   SERVICE GRID OVERLAP FIXES
   ============================================ */

/* Service grid items */
.service-grid .service-item {
    position: relative;
    z-index: 1;
    margin-bottom: 30px;
}

.service-grid .service-item:hover {
    z-index: 10; /* Hover'da üste çık */
}

/* Service card overlays */
.service-card-overlay {
    z-index: 2;
}

.service-card-content {
    position: relative;
    z-index: 3;
}

/* ============================================
   SPECIFIC ELEMENT FIXES
   ============================================ */

/* Service hero/banner area */
.service-banner,
.service-hero {
    margin-top: 0 !important;
    position: relative;
    z-index: 1;
}

/* Service title section */
.service-title-section {
    padding: 20px 0;
    background: #ffffff;
    position: relative;
    z-index: 2;
}

/* Service features/icons */
.service-features {
    position: relative;
    z-index: 1;
    padding: 40px 0;
}

/* Service CTA section */
.service-cta {
    position: relative;
    z-index: 5;
    margin-top: 40px;
}

/* ============================================
   ADMIN BAR COMPENSATION
   ============================================ */

.admin-bar.single-service .service-single {
    padding-top: 132px !important; /* 100px + 32px admin bar */
}

@media (max-width: 782px) {
    .admin-bar.single-service .service-single {
        padding-top: 146px !important; /* 100px + 46px mobile admin bar */
    }
}

/* ============================================
   TRANSITION EFFECTS
   ============================================ */

/* Smooth transitions */
.service-single,
.service-item,
.service-card {
    transition: all 0.3s ease;
}

/* ============================================
   UTILITY OVERRIDES FOR SERVICE
   ============================================ */

/* Force fixes for problematic elements */
.single-service .sticky-header {
    z-index: 9990 !important;
}

.single-service .service-content {
    position: relative !important;
    z-index: 1 !important;
}

.single-service .sidebar {
    position: relative !important;
    z-index: 10 !important;
}

/* Clear floats */
.service-single::after,
.service-content::after {
    content: "";
    display: table;
    clear: both;
}

/* ============================================
   DEBUG HELPERS (Remove in production)
   ============================================ */

/* Overlap debugging */
.debug-service-overlap {
    outline: 2px solid blue !important;
}

.debug-service-overlap::before {
    content: "Service Element";
    position: absolute;
    top: 0;
    left: 0;
    background: blue;
    color: white;
    padding: 2px 5px;
    font-size: 10px;
    z-index: 99999;
}