/**
 * All Services Directory - Page Template Styles
 * Template: page-all-services.php
 */

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.vp-services-breadcrumb {
    padding: 44px 16px 36px;
    background: var(--Neutral-100);
}

.vp-services-breadcrumb > div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vp-services-breadcrumb a {
    color: var(--Neutral-800);
    text-decoration: none;
}

.vp-services-breadcrumb a:hover {
    color: var(--Primary-primary);
}

.vp-services-breadcrumb svg {
    vertical-align: middle;
}

.vp-services-breadcrumb .vp-breadcrumb-current {
    color: var(--Primary-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.vp-services-hub-hero {
    padding: 40px 0 60px;
    background: var(--Neutral-100);
}

.vp-services-hub-hero .vp-title-text {
    max-width: 800px;
    margin: 24px auto 0;
}

.vp-services-hub-hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.vp-services-hub-hero-content .vp-sub-title {
    margin-bottom: 8px;
}

.vp-services-hub-hero-content h1 {
    margin-bottom: 16px;
}

.vp-services-hub-hero-content > svg {
    max-width: 100%;
}

/* ==========================================================================
   Stats Section
   ========================================================================== */
.vp-services-hub-stats {
    padding: 0 0 80px;
    background: var(--Neutral-100);
}

.vp-stats-grid {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.vp-stat-item {
    text-align: center;
    padding: 32px 48px;
    background: var(--Primary-3);
    border-radius: 24px;
    min-width: 220px;
}

.vp-stat-number {
    font-size: 56px;
    font-weight: 700;
    color: var(--Primary-primary);
    display: block;
    line-height: 1;
}

.vp-stat-label {
    font-size: 18px;
    color: var(--Neutral-600);
    margin-top: 12px;
    display: block;
    font-weight: 500;
}

/* ==========================================================================
   Search Section
   ========================================================================== */
.vp-services-search {
    padding: 0 0 48px;
    background: var(--Neutral-100);
}

.vp-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.vp-search-input {
    width: 100%;
    padding: 18px 48px 18px 56px;
    border: 1px solid var(--Neutral-300);
    border-radius: 12px;
    font-size: 18px;
    font-family: var(--font-family-onest);
    color: var(--Neutral-800);
    background: var(--Neutral-100);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.vp-search-input:focus {
    outline: none;
    border-color: var(--Primary-primary);
    box-shadow: 0 0 0 4px rgba(110, 47, 208, 0.1);
}

.vp-search-input::placeholder {
    color: var(--Neutral-500);
}

.vp-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--Neutral-500);
    pointer-events: none;
}

.vp-search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--Neutral-300);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--Neutral-600);
    transition: background 0.2s ease;
}

.vp-search-clear:hover {
    background: var(--Neutral-400);
}

.vp-search-clear.visible {
    display: flex;
}

.vp-search-results-info {
    text-align: center;
    margin-top: 16px;
    font-size: 16px;
    color: var(--Neutral-600);
    min-height: 24px;
}

.vp-search-results-info strong {
    color: var(--Primary-primary);
}

/* ==========================================================================
   Categories Grid
   ========================================================================== */
.vp-services-hub-categories {
    padding: 0 0 100px;
    background: var(--Neutral-100);
}

.vp-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: start;
}

/* ==========================================================================
   Category Card
   ========================================================================== */
.vp-category-card {
    background: var(--Neutral-100);
    border-radius: 24px;
    border: 1px solid var(--Neutral-300);
    overflow: hidden;
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.vp-category-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.vp-category-card.hidden {
    display: none;
}

/* Category Header - Fixed height for consistency */
.vp-category-header {
    padding: 24px;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid var(--Neutral-300);
    height: 120px;
}

/* Service Hero Icon */
.vp-service-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--Primary-3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vp-service-hero-icon svg {
    width: 28px;
    height: 28px;
}

.vp-category-info {
    min-width: 0;
}

.vp-category-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 128%;
    color: var(--Neutral-800);
    margin: 0 0 2px 0;
    word-wrap: break-word;
}

.vp-category-count {
    font-size: 14px;
    color: var(--Primary-primary);
    display: block;
    white-space: nowrap;
}

/* ==========================================================================
   Services List
   ========================================================================== */
.vp-services-list {
    padding: 20px 24px 24px;
}

.vp-services-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vp-services-list li.hidden {
    display: none;
}

.vp-services-list a {
    display: block;
    padding: 10px 0;
    color: var(--Neutral-700);
    font-size: 16px;
    line-height: 18px;
    text-decoration: none;
    transition: color 0.2s ease; 
}

.vp-services-list a:hover {
    color: var(--Primary-primary);
    text-decoration: underline;
}

/* Search highlight */
.vp-services-list a mark {
    background: #FFF3CD;
    color: inherit;
    padding: 1px 3px;
    border-radius: 3px;
}

/* No results */
.vp-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--Neutral-600);
    font-size: 18px;
    grid-column: 1 / -1;
    display: none;
}

.vp-no-results.visible {
    display: block;
}

.vp-no-results strong {
    color: var(--Neutral-800);
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
}

/* ==========================================================================
   Responsive - Large Tablets (2 columns)
   ========================================================================== */
@media (max-width: 1100px) {
    .vp-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Responsive - Mobile
   ========================================================================== */
@media (max-width: 768px) {
    .vp-services-breadcrumb {
        padding: 32px 16px 36px;
    }

    .vp-services-hub-hero {
        padding: 24px 0 40px;
    }
    
    .vp-services-hub-hero-content h1 {
        font-size: 28px;
    }
    
    .vp-services-hub-stats {
        padding: 0 0 60px;
    }
    
    .vp-stats-grid {
        gap: 16px;
    }
    
    .vp-stat-item {
        padding: 24px 32px;
        min-width: 140px;
        flex: 1;
    }
    
    .vp-stat-number {
        font-size: 40px;
    }
    
    .vp-stat-label {
        font-size: 16px;
    }

    .vp-services-search {
        padding: 0 0 40px;
    }

    .vp-search-input {
        padding: 16px 44px 16px 48px;
        font-size: 16px;
    }
    
    .vp-services-hub-categories {
        padding: 0 0 80px;
    }
    
    .vp-categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .vp-category-header {
        height: auto;
        min-height: 96px;
        padding: 20px;
        grid-template-columns: 48px 1fr;
    }
    
    .vp-service-hero-icon {
        width: 48px;
        height: 48px;
    }
    
    .vp-service-hero-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .vp-category-title {
        font-size: 20px;
    }
    
    .vp-services-list {
        padding: 16px 20px 20px;
    }
    
    .vp-services-list a { 
        padding: 8px 0;
        white-space: normal; 
    }
}

@media (max-width: 480px) {
    .vp-stats-grid {
        flex-direction: column;
        gap: 12px;
    }
    
    .vp-stat-item {
        width: 100%;
    }
}

/* Hide default browser clear button */
.vp-search-input::-webkit-search-cancel-button,
.vp-search-input::-webkit-search-decoration,
.vp-search-input::-webkit-search-results-button,
.vp-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.vp-search-input::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}