/**
 * Professional Page Headers & SEO Optimized Layouts
 * EG Solutions WordPress Theme
 */

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
    background: #f8fafc;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

/* Breadcrumbs inside header */
.page-header-section .breadcrumbs {
    background: transparent;
    border-bottom: none;
    padding: 0.75rem 0 0 0;
    margin-bottom: 0.75rem;
    justify-content: center;
}

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

.page-header-section .breadcrumb-list {
    justify-content: center;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: #64748b;
}

/* Breadcrumbs inside header - light colors */
.page-header-section .breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item::after {
    content: '/';
    margin-left: 0.5rem;
    color: #cbd5e1;
}

.page-header-section .breadcrumb-item::after {
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-item:last-child::after {
    display: none;
}

.breadcrumb-item a {
    color: #475569;
    transition: color 0.3s ease;
}

.page-header-section .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb-item a:hover {
    color: #ff7400;
}

.page-header-section .breadcrumb-item a:hover {
    color: #ffffff;
}

.breadcrumb-item.active {
    color: #ff7400;
    font-weight: 500;
}

.page-header-section .breadcrumb-item.active {
    color: #ffffff;
    font-weight: 500;
}

/* ==========================================================================
   Professional Page Headers - Compact & Modern Design
   ========================================================================== */
.page-header-section {
    /* Background color and image are set via inline styles from customizer */
    /* Fallback background color (matches customizer default) */
    background-color: #00132d;
    color: #ffffff;
    padding: 8rem 0 2.5rem;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

/* Account for WordPress admin bar when logged in */
.admin-bar .page-header-section {
    margin-top: 0;
}

.page-header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-pattern.svg') no-repeat center;
    background-size: cover;
    opacity: 0.05;
    z-index: 1;
}

/* Page Header Overlay */
.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.page-header-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.page-description,
.page-subtitle {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.archive-meta,
.search-meta {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.archive-meta .count,
.search-meta .count {
    color: #ffffff;
    font-weight: 700;
}

/* Search Query Highlight */
.search-query {
    color: #ff7400;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.no-results-message {
    margin-top: 1rem;
    font-size: 1.125rem;
}

.search-form-wrapper {
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-form-wrapper .search-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 3rem;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.search-form-wrapper .search-field {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 2rem;
    background: transparent;
    color: var(--dark-color);
}

.search-form-wrapper .search-submit {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: none;
}

.search-form-wrapper .search-submit:hover {
    background: #ec098c;
    color: #ffffff;
    border-color: #ec098c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 9, 140, 0.3);
}

/* ==========================================================================
   Single Post Header
   ========================================================================== */
.single-post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.post-categories {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.post-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #ff7400;
    color: #ffffff;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.post-category:hover {
    background: #e66a00;
    transform: translateY(-2px);
    color: #ffffff;
}

.single-post-header .entry-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

/* ==========================================================================
   Portfolio Header
   ========================================================================== */
.portfolio-header {
    padding-top: 8rem;
}

.portfolio-header-content {
    text-align: center;
}

.portfolio-categories {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.portfolio-category {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 116, 0, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.portfolio-category:hover {
    background: rgba(255, 116, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

.portfolio-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.portfolio-excerpt {
    font-size: 1.25rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.portfolio-details {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.portfolio-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.portfolio-detail strong {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.portfolio-detail span {
    font-size: 1.125rem;
    color: #ffffff;
    font-weight: 500;
}

/* ==========================================================================
   404 Error Page
   ========================================================================== */
.error-404-header {
    background: linear-gradient(135deg, #063376 0%, #ff7400 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-404-number {
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0.5));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
}

.error-404-header .page-title {
    font-size: clamp(2rem, 4vw, 3rem);
}

.error-404-links {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 1rem;
}

.error-404-links h3 {
    margin-bottom: 1.5rem;
    color: #063376;
}

.error-404-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.error-404-links li {
    margin: 0;
}

.error-404-links a {
    display: block;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
    color: #063376;
    transition: all 0.3s ease;
}

.error-404-links a:hover {
    border-color: #ff7400;
    color: #ff7400;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 116, 0, 0.2);
}

/* ==========================================================================
   Page Content Wrapper
   ========================================================================== */
.page-content-wrapper {
    padding: 4rem 0;
}

.page-content-wrapper .entry-content {
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   Archive Meta Information
   ========================================================================== */
.archive-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 3rem;
}

.archive-count {
    font-size: 1rem;
    color: #64748b;
}

.archive-count strong {
    color: #063376;
    font-weight: 700;
}

/* ==========================================================================
   SEO Schema Markup Support
   ========================================================================== */
/* Schema markup structures are handled via semantic HTML */

/* ==========================================================================
   Service Page Styles
   ========================================================================== */
.service-header {
    padding-top: 8rem;
}

.service-header-content {
    text-align: center;
}

.service-icon-large {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1.25rem;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.service-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Service title in page header - white */
.page-header-section .service-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.5rem, 3vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.02em;
}

/* Service excerpt in page header - white */
.page-header-section .service-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto;
}

.service-featured-image {
    margin: 0;
}

.service-featured-image img {
    border-radius: 1rem 1rem 0 0 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Service content on single service pages */
.single-service .service-content,
.single-service-fullwidth .service-content {
    max-width: 100%;
    margin: 0 auto;
}

/* Full-width variant for full-width template */
.single-service-fullwidth .service-content {
    width: 100%;
}

.service-cta {
    background: linear-gradient(135deg, #063376 0%, #ff7400 100%);
    color: #ffffff;
    text-align: center;
}

.service-cta h2 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.service-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Service Cards in Archive */
.service-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.service-card-link:hover {
    color: inherit;
}

.service-card h3 {
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: #ff7400;
}

/* Related Services Section */
.related-services {
    background: #f8fafc;
}

.related-services .section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .page-header-section {
        padding: 6rem 0 2rem;
        margin-top: 0;
    }
    
    .admin-bar .page-header-section {
        margin-top: 0;
    }
    
    .page-title {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }
    
    .page-description,
    .page-subtitle {
        font-size: 1.125rem;
    }
    
    .breadcrumbs {
        font-size: 0.8125rem;
    }
    
    .portfolio-details {
        gap: 2rem;
    }
    
    .service-header,
    .portfolio-header {
        padding-top: 6rem;
    }
    
    .service-icon-large {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .error-404-number {
        font-size: 6rem;
    }
    
    .error-404-links ul {
        grid-template-columns: 1fr;
    }
    
    .search-form-wrapper .search-form {
        flex-direction: column;
        padding: 1rem;
        border-radius: 1rem;
    }
    
    .search-form-wrapper .search-field,
    .search-form-wrapper .search-submit {
        width: 100%;
        border-radius: 0.5rem;
    }
}

/* ==========================================================================
   Single Service Page
   ========================================================================== */
.service-header {
    padding-top: 10rem;
}

.service-header-content {
    text-align: center;
}

.service-icon-large {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1.25rem;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.service-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Service title in page header - white */
.page-header-section .service-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.02em;
}

/* Service excerpt in page header - white */
.page-header-section .service-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.service-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.service-featured-image {
    margin: 0;
}

.service-featured-image img {
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
}

/* Service content wrapper on single service pages */
.single-service .service-content-wrapper,
.single-service-fullwidth .service-content-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

/* Full-width variant for full-width template */
.single-service-fullwidth .service-content-wrapper {
    width: 100%;
}

.service-features {
    padding: 5rem 0;
}

.section-heading {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    color: #063376;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    background: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff7400;
    border-radius: 50%;
    font-size: 2rem;
    color: #ffffff;
    font-weight: bold;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #063376;
}

.feature-desc {
    color: #64748b;
    line-height: 1.6;
}

.service-cta-section {
    background: linear-gradient(135deg, #063376 0%, #ff7400 100%);
    color: #ffffff;
}

.cta-box {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-box h2 {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Single Portfolio Page Updates */
.portfolio-header .page-title,
.service-header .page-title {
    animation: fadeInUp 0.8s ease-out;
}

.portfolio-categories a,
.service-cta-buttons .btn {
    animation: fadeIn 1s ease-out 0.3s both;
}

/* ==========================================================================
   Print Styles for SEO
   ========================================================================== */
@media print {
    .breadcrumbs,
    .page-header-section::before,
    .back-to-top,
    .mobile-menu-toggle {
        display: none;
    }
    
    .page-header-section {
        background: none;
        color: #000;
        padding: 2rem 0;
    }
    
    .page-title {
        color: #000;
    }
}

