/**
 * Services Hero Component Styles
 * Hero section with search bar and quick action pills
 * 
 * @package Silva_Customer_Portal
 * @version 2.7.0
 */

/* ==========================================================================
   Hero Section
   ========================================================================== */

.services-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 1.5rem 1rem 1.75rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.services-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.services-hero__container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.services-hero__content {
    text-align: center;
}

/* Title */
.services-hero__title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.375rem;
    color: #ffffff;
    letter-spacing: -0.02em;
}

/* Subtitle */
.services-hero__subtitle {
    font-size: 0.9375rem;
    line-height: 1.4;
    margin: 0 0 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.services-hero__search {
    margin-bottom: 1rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
    z-index: 2;
}

.services-search-input {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 2.75rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    border: 2px solid transparent;
    border-radius: 50px;
    background-color: #ffffff;
    color: #1f2937;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.services-search-input::placeholder {
    color: #9ca3af;
}

.services-search-input:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15), 0 12px 20px -5px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.search-clear-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2;
}

.search-clear-btn:hover {
    color: #1f2937;
    background-color: #f3f4f6;
}

.search-clear-btn:focus {
    outline: 2px solid #d97706;
    outline-offset: 2px;
}

/* Search Results Dropdown */
.services-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2), 0 6px 20px -5px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.services-search-results.active {
    display: block;
}

.search-results-section {
    padding: 0.75rem 0;
    border-left: 3px solid transparent;
}

.search-results-section:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.search-results-section--calculators {
    border-left-color: #f59e0b;
}

.search-results-section--services {
    border-left-color: #10b981;
}

.search-results-section--resources {
    border-left-color: #8b5cf6;
}

.search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.search-section-count {
    background-color: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.6875rem;
    color: #4b5563;
}

.search-result-item {
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-left: 3px solid transparent;
}

.search-result-item:hover,
.search-result-item:focus {
    background-color: #f9fafb;
    outline: none;
}

.search-result-item.active {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
}

.search-result-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.search-result-description {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

.search-results-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: #6b7280;
}

.search-results-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.search-results-empty-text {
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0 0 0.25rem;
    color: #4b5563;
}

.search-results-empty-hint {
    font-size: 0.8125rem;
    margin: 0;
    color: #9ca3af;
}

/* ==========================================================================
   Popular Searches
   ========================================================================== */

.services-hero__pills {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.services-hero__popular {
    margin-top: 1rem;
}

.popular-searches-label {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 0.625rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.popular-searches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
    align-items: center;
}

.popular-search-pill {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.popular-search-pill:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.popular-search-pill:active {
    transform: translateY(0);
}

.popular-search-pill:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablets and up */
@media (min-width: 768px) {
    .services-hero {
        padding: 2rem 1.5rem 2.25rem;
    }

    .services-hero__title {
        font-size: 2.25rem;
        margin-bottom: 0.5rem;
    }

    .services-hero__subtitle {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }

    .services-search-input {
        padding: 0.875rem 3.25rem 0.875rem 3.25rem;
        font-size: 1rem;
    }

    .search-icon {
        left: 1.125rem;
    }

    .search-clear-btn {
        right: 0.875rem;
    }

    .popular-searches-label {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .popular-search-pill {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .services-hero {
        padding: 2.25rem 2rem 2.5rem;
    }

    .services-hero__title {
        font-size: 2.5rem;
    }

    .pills-container {
        gap: 0.625rem;
    }
    
    .popular-searches-container {
        gap: 0.625rem;
    }
}

/* ==========================================================================
   Service Type Cards
   ========================================================================== */

.service-type-cards {
    padding: 1.25rem 1rem 1.75rem;
    background-color: #f9fafb;
}

.service-type-cards__container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Individual Card */
.service-type-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.08), 0 4px 12px -4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid transparent;
}

.service-type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.12), 0 12px 20px -8px rgba(0, 0, 0, 0.08);
    border-color: #e5e7eb;
}

/* Featured card (middle) */
.service-type-card--featured {
    border-color: #d97706;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.service-type-card--featured:hover {
    border-color: #b45309;
    box-shadow: 0 8px 20px -5px rgba(217, 119, 6, 0.2), 0 6px 8px -5px rgba(217, 119, 6, 0.1);
}

/* Icon */
.service-type-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.service-type-card__icon svg {
    width: 26px;
    height: 26px;
}

/* Green icon for Next Day Services */
.service-type-card__icon--green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Purple icon for Resources */
.service-type-card__icon--purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Primary card icon (Calculators) */
.service-type-card--primary .service-type-card__icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Title */
.service-type-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* Description */
.service-type-card__description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6b7280;
    margin: 0 0 0.375rem;
    flex-grow: 1;
}

/* Meta text (subtitle) */
.service-type-card__meta {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #9ca3af;
    margin: 0 0 1rem;
    font-weight: 500;
}

/* Features List - Hidden */
.service-type-card__features {
    display: none;
}

/* Button */
.service-type-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    background-color: #3b82f6;
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    align-self: flex-start;
    margin-top: auto;
}

.service-type-card__button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.service-type-card__button:active {
    transform: translateY(0);
}

.service-type-card__button:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Featured button */
.service-type-card__button--featured {
    background-color: #f59e0b;
}

.service-type-card__button--featured:hover {
    background-color: #d97706;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.service-type-card__button--featured:focus {
    border-color: #b45309;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Primary button (Calculators) */
.service-type-card__button--primary {
    background-color: #f59e0b;
}

.service-type-card__button--primary:hover {
    background-color: #d97706;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.service-type-card__button--primary:focus {
    border-color: #b45309;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Primary card highlight */
.service-type-card--primary {
    border-color: #d97706;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.service-type-card--primary:hover {
    border-color: #b45309;
    box-shadow: 0 8px 24px -6px rgba(217, 119, 6, 0.2), 0 12px 20px -8px rgba(217, 119, 6, 0.15);
}

/* ==========================================================================
   Service Type Cards - Responsive
   ========================================================================== */

/* Tablets */
@media (min-width: 768px) {
    .service-type-cards {
        padding: 1.5rem 1.5rem 2rem;
    }

    .service-type-cards__container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .service-type-card {
        padding: 1.25rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .service-type-cards {
        padding: 2rem 2rem 2.5rem;
    }

    .service-type-cards__container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .service-type-card {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Section Highlight Animation
   ========================================================================== */

@keyframes sectionHighlight {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(59, 130, 246, 0.05);
    }
    100% {
        background-color: transparent;
    }
}

.section-highlight {
    animation: sectionHighlight 2s ease;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus visible styles for keyboard navigation */
.services-hero *:focus-visible,
.service-type-cards *:focus-visible {
    outline: 2px solid #d97706;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .service-pill,
    .service-type-card,
    .service-type-card__button {
        transition: none;
    }

    .section-highlight {
        animation: none;
    }

    html.smooth-scroll-active {
        scroll-behavior: auto;
    }
}
