/* Optimized Service Page Spacing Fix
 * Clean spacing and breadcrumb fixes based on working industry page patterns
 * Features: becloud-breadcrumb, breadcrumb-nav, accessibility, performance optimizations
 * Requirements: 1.1, 1.2, 1.3, 2.1, 2.2, 2.3
 */

/* ===== CLEAN SPACING FIXES ===== */

/* Remove excessive top spacing from service pages */
.service-page-header,
.service-hero-section,
.subpage-header,
.detail-hero-section {
    padding-top: 2rem;
    margin-top: 0;
}

/* Ensure hero sections start properly */
.hero-section,
.service-hero-section {
    margin-top: 0;
    padding-top: 2rem;
}

/* ===== BREADCRUMB STYLING (FOLLOWING INDUSTRY PAGE PATTERN) ===== */

/* BeCloud breadcrumb section - matches industry page structure */
.becloud-breadcrumb {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Breadcrumb navigation styling */
.breadcrumb-nav {
    font-size: 0.875rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    color: rgba(102, 126, 234, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 400;
}

.breadcrumb-link:hover {
    color: rgba(102, 126, 234, 1);
    text-decoration: none;
}

.breadcrumb-current {
    color: #333;
    font-weight: 500;
}

.breadcrumb-separator {
    margin: 0 0.75rem;
    color: rgba(102, 126, 234, 0.4);
    font-size: 0.75rem;
}

/* Legacy breadcrumb support */
.breadcrumb-section,
.page-breadcrumbs,
.breadcrumb,
.breadcrumbs,
nav[aria-label="breadcrumb"]:not(.breadcrumb-nav),
.o_breadcrumb,
.website_breadcrumb {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 1rem 1.5rem;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Legacy breadcrumb link styling */
.breadcrumb-section a,
.page-breadcrumbs a,
.breadcrumb a,
.breadcrumbs a,
nav[aria-label="breadcrumb"]:not(.breadcrumb-nav) a,
.o_breadcrumb a,
.website_breadcrumb a {
    color: rgba(102, 126, 234, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.breadcrumb-section a:hover,
.page-breadcrumbs a:hover,
.breadcrumb a:hover,
.breadcrumbs a:hover,
nav[aria-label="breadcrumb"]:not(.breadcrumb-nav) a:hover,
.o_breadcrumb a:hover,
.website_breadcrumb a:hover {
    color: rgba(102, 126, 234, 1);
}

/* ===== STRATEGIC ASSESSMENT REFINEMENTS ===== */

/* Tone down prominent underlines */
.strategic-assessment .underline,
.strategic-assessment .text-decoration-underline,
.strategic-assessment a[style*="text-decoration: underline"] {
    text-decoration: none;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    padding-bottom: 2px;
    transition: border-bottom-color 0.3s ease;
}

.strategic-assessment .underline:hover,
.strategic-assessment .text-decoration-underline:hover,
.strategic-assessment a[style*="text-decoration: underline"]:hover {
    border-bottom-color: rgba(102, 126, 234, 0.6);
}

/* Strategic assessment buttons */
.strategic-assessment .btn,
.strategic-assessment .button {
    border: 1px solid rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.1);
    color: rgba(102, 126, 234, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.strategic-assessment .btn:hover,
.strategic-assessment .button:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.6);
    color: rgba(102, 126, 234, 1);
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .service-page-header,
    .service-hero-section,
    .subpage-header,
    .detail-hero-section {
        padding-top: 1.5rem;
    }
    
    .becloud-breadcrumb {
        padding: 0.75rem 0;
    }
    
    .breadcrumb-nav {
        font-size: 0.8125rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.5rem;
    }
    
    .breadcrumb-list {
        flex-wrap: wrap;
        gap: 0.25rem 0;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .service-page-header,
    .service-hero-section,
    .subpage-header,
    .detail-hero-section {
        padding-top: 1.75rem;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Use transform for better performance */
.breadcrumb-link,
.breadcrumb-current {
    will-change: color;
}

/* Optimize animations */
.breadcrumb-link {
    transform: translateZ(0); /* Force hardware acceleration */
}

/* ===== CLEAN LAYOUT FIXES ===== */

/* Ensure proper content flow */
.service-hero-content,
.hero-content,
.detail-hero-content {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* Remove any conflicting margins */
.service-title-section,
.page-title-section {
    margin-top: 0;
    padding-top: 1rem;
}

/* ===== NO OVERLAYS OR ABSOLUTE POSITIONING ===== */

/* Ensure all elements use normal document flow */
.service-page-header,
.service-hero-section,
.subpage-header,
.detail-hero-section,
.breadcrumb-section,
.page-breadcrumbs,
.becloud-breadcrumb {
    position: static;
    z-index: auto;
}

/* Clean container styling */
.becloud-container,
.container {
    position: relative;
}

/* Ensure no pseudo-element overlays */
.detail-hero-section::before,
.service-hero-section::before,
.becloud-container::before {
    display: none !important;
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */

/* Focus states for breadcrumb links */
.breadcrumb-link:focus {
    outline: 2px solid rgba(102, 126, 234, 0.8);
    outline-offset: 2px;
    border-radius: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .breadcrumb-link {
        color: #0066cc;
    }
    
    .breadcrumb-current {
        color: #000;
        font-weight: 600;
    }
    
    .becloud-breadcrumb {
        border-bottom: 2px solid #ccc;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .breadcrumb-link {
        transition: none;
    }
    
    .strategic-assessment .underline,
    .strategic-assessment .text-decoration-underline,
    .strategic-assessment a[style*="text-decoration: underline"] {
        transition: none;
    }
}