/* ============================================
   Modern Breadcrumb Styling
   ============================================ */

/* Page Title Section */
.page-title {
    position: relative;
    padding: 140px 0 60px !important; /* Increased top padding to account for header */
    margin-top: 0;
    background: linear-gradient(135deg, #1d335c 0%, #2d4a7a 50%, #1d335c 100%);
    overflow: hidden;
    z-index: 1;
    clear: both;
}

/* Ensure proper spacing from header - account for header height */
.main-header ~ .page-wrapper .page-title,
.page-wrapper .page-title,
.main-header + .page-title,
header + .page-title {
    margin-top: 0 !important;
    padding-top: 140px !important;
}

/* When sticky header is active, add extra top margin */
body.fixed-header .page-title,
body .fixed-header ~ .page-title {
    margin-top: 0 !important;
    padding-top: 140px !important;
}

/* Ensure proper spacing from header-upper and sticky header */
.header-upper ~ .page-title,
.sticky-header ~ .page-title {
    margin-top: 0 !important;
}

/* Account for header height - ensure no overlap */
.main-header {
    position: relative;
    z-index: 999;
}

/* Ensure page-title doesn't overlap with header */
section.page-title {
    margin-top: 0 !important;
    padding-top: 140px !important;
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
    z-index: 0;
}

.page-title .pattern-layer-one {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

.page-title .auto-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Title Heading */
.page-title h2 {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px 0;
    text-align: center;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    display: inline-block;
    width: 100%;
}

.page-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4a90e2, #ffffff);
    border-radius: 2px;
}

/* Breadcrumb Container */
.page-title .page-breadcrumb {
    list-style: none;
    padding: 0;
    margin: 30px 0 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
}

/* Breadcrumb Items */
.page-title .page-breadcrumb li {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
}

/* Breadcrumb Links */
.page-title .page-breadcrumb li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: capitalize;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.page-title .page-breadcrumb li a::before {
    content: '\f015';
    font-family: 'FontAwesome';
    font-size: 14px;
    opacity: 0.8;
}

.page-title .page-breadcrumb li a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Current Page (Non-link) */
.page-title .page-breadcrumb li:last-child {
    color: #ffffff;
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Breadcrumb Separator */
.page-title .page-breadcrumb li:not(:last-child)::after {
    content: '\f105';
    font-family: 'FontAwesome';
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 300;
}

/* Responsive Design */
@media (max-width: 991px) {
    .page-title {
        padding: 120px 0 50px !important; /* Increased top padding for mobile */
    }
    
    .main-header ~ .page-wrapper .page-title,
    .page-wrapper .page-title,
    section.page-title {
        padding-top: 120px !important; /* Reduced for mobile */
    }
    
    body.fixed-header .page-title,
    body .fixed-header ~ .page-title {
        padding-top: 120px !important;
    }

    .page-title h2 {
        font-size: 36px;
        margin-bottom: 15px;
    }

    .page-title .page-breadcrumb {
        font-size: 14px;
        margin-top: 20px;
        gap: 6px;
    }

    .page-title .page-breadcrumb li a,
    .page-title .page-breadcrumb li:last-child {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 575px) {
    .page-title {
        padding: 100px 0 40px !important; /* Increased top padding for small mobile */
    }
    
    .main-header ~ .page-wrapper .page-title,
    .page-wrapper .page-title,
    section.page-title {
        padding-top: 100px !important; /* Reduced for small mobile */
    }
    
    body.fixed-header .page-title,
    body .fixed-header ~ .page-title {
        padding-top: 100px !important;
    }

    .page-title h2 {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .page-title h2::after {
        width: 60px;
        height: 3px;
    }

    .page-title .page-breadcrumb {
        font-size: 13px;
        margin-top: 15px;
        gap: 4px;
        flex-direction: column;
        align-items: center;
    }

    .page-title .page-breadcrumb li:not(:last-child)::after {
        display: none;
    }

    .page-title .page-breadcrumb li {
        margin: 2px 0;
    }

    .page-title .page-breadcrumb li a,
    .page-title .page-breadcrumb li:last-child {
        padding: 6px 14px;
        font-size: 12px;
    }

    .page-title .page-breadcrumb li a::before {
        font-size: 12px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title h2 {
    animation: fadeInUp 0.6s ease;
}

.page-title .page-breadcrumb {
    animation: fadeInUp 0.8s ease;
}

/* Accessibility */
.page-title .page-breadcrumb li a:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 8px;
}

/* Print Styles */
@media print {
    .page-title {
        background: #ffffff;
        padding: 20px 0;
    }

    .page-title h2 {
        color: #1d335c;
        text-shadow: none;
    }

    .page-title .page-breadcrumb li,
    .page-title .page-breadcrumb li a {
        color: #666;
    }

    .page-title .page-breadcrumb li:last-child {
        background: transparent;
        border: none;
    }
}
