/* ================================================
   LOCABEE V5 LISTING PAGE STYLES
   Provider listings, filters, search hero
   Only loaded on listing/search pages
   ================================================ */

/* ======================================
   BASE HERO STYLES
   Required for category/service pages that don't load home.css
====================================== */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-dark);
    color: var(--color-white);
    overflow: hidden;
}

.hero__slider {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.hero__slider-picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hero__slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__slider::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to bottom,
            rgba(0, 40, 44, 0.5) 0%,
            transparent 40%,
            rgba(0, 40, 44, 0.8) 100%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 5;
    text-align: center;
}

.hero__title {
    font-family: var(--font-display);
    color: var(--color-white);
}

.hero__subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* ======================================
   SEARCH HERO VARIANT
====================================== */
.hero--search {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) 0;
    /* NOTE: Do NOT use overflow: hidden here - it clips the search dropdown */
}

.hero__gradient-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: linear-gradient(135deg,
            var(--color-bg-dark) 0%,
            #001a1c 25%,
            #002428 50%,
            #001a1c 75%,
            var(--color-bg-dark) 100%);
    z-index: 0;
}

.hero__gradient-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(154, 237, 247, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(125, 220, 232, 0.12) 0%, transparent 40%);
}

.hero--search .hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    padding: 0 var(--space-4);
}

.hero__content--centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
}

.hero__icon {
    font-size: 3rem;
    color: var(--color-primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.hero--search .hero__title {
    color: var(--color-white);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-2);
}

.hero--search .hero__subtitle {
    color: var(--color-gray-400);
    font-size: 1.125rem;
    font-weight: 400;
}

/* Large Search Box */
.search-box--large {
    width: 100%;
    max-width: 600px;
    padding: var(--space-2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.search-box--large .search-box__input {
    font-size: 1.125rem;
    padding: var(--space-4) var(--space-4) var(--space-4) 0;
}

.search-box--large .search-box__btn {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

/* Hero Stats */
.hero__stats {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--space-4);
}

.hero__stat {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-gray-400);
    font-size: 0.9375rem;
}

.hero__stat i {
    color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero--search {
        min-height: 350px;
        padding: var(--space-12) 0;
    }

    .hero__icon {
        font-size: 2.5rem;
    }

    .hero__stats {
        gap: var(--space-4);
    }

    .search-box--large {
        padding: var(--space-1);
    }

    .search-box--large .search-box__input {
        font-size: 1rem;
    }
}

/* ======================================
   FILTERS BAR
====================================== */
.section--filters {
    padding: var(--space-4) 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-100);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4);
}

.filters-bar__group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.filters-bar__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-gray-600);
}

.filters-bar__select {
    padding: var(--space-2) var(--space-4);
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-gray-800);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filters-bar__select:hover {
    border-color: var(--color-gray-400);
}

.filters-bar__select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.filters-bar__count {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--color-gray-500);
}

/* Active Filters */
.active-filters {
    margin-top: var(--space-3);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.active-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: linear-gradient(135deg, var(--color-primary-light), rgba(154, 237, 247, 0.08));
    border: 1px solid rgba(154, 237, 247, 0.4);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-ink);
}

.active-filter-badge i {
    color: var(--color-primary);
}

.active-filter-badge__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--color-gray-200);
    border-radius: 50%;
    color: var(--color-gray-600);
    font-size: 0.75rem;
    transition: all var(--transition-fast);
    margin-left: var(--space-1);
    border: none;
    cursor: pointer;
}

.active-filter-badge__remove:hover {
    background: var(--color-gray-800);
    color: var(--color-white);
}

/* Responsive */
@media (max-width: 640px) {
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-bar__group {
        justify-content: space-between;
    }

    .filters-bar__count {
        margin-left: 0;
        text-align: center;
        padding-top: var(--space-2);
        border-top: 1px solid var(--color-gray-100);
    }

    .section--filters {
        position: relative;
        top: 0;
    }
}

/* ======================================
   PROVIDERS SECTION
====================================== */
.section--providers {
    background: var(--color-gray-50);
    padding: var(--space-12) 0;
}

/* ======================================
   PAGE HERO (Interior pages with images)
   Constrained height for category/service pages
   NOTE: Must override base .hero from home.css
   
   STRUCTURE:
   - hero (relative, flex container)
     - hero__slider (absolute, fills parent, contains image)
     - hero__content (relative, z-index above slider, centered content)
====================================== */
section.hero.hero--page {
    min-height: 350px;
    max-height: 420px;
    height: 420px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure slider fills the hero properly */
section.hero.hero--page .hero__slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Make swiper and slides fill the slider */
section.hero.hero--page .hero__slider .swiper,
section.hero.hero--page .hero__slider .swiper-wrapper,
section.hero.hero--page .hero__slider .swiper-slide {
    height: 100%;
}

/* Ensure picture and image fill and center properly */
section.hero.hero--page .hero__slider-picture {
    display: block;
    width: 100%;
    height: 100%;
}

section.hero.hero--page .hero__slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Content must be inside the hero, above the slider */
section.hero.hero--page .hero__content {
    position: relative;
    z-index: 5;
    min-height: auto;
    max-height: 100%;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 800px;
}

section.hero.hero--page .hero__text {
    min-height: auto;
    flex-shrink: 1;
}

section.hero.hero--page .hero__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-3);
    color: var(--color-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

section.hero.hero--page .hero__subtitle {
    font-size: 1rem;
    margin-bottom: var(--space-4);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Search bar inside hero--page */
section.hero.hero--page .search-bar {
    max-width: 500px;
    width: 100%;
}

@media (max-width: 768px) {
    section.hero.hero--page {
        min-height: 300px;
        max-height: 350px;
        height: 350px;
    }

    section.hero.hero--page .hero__content {
        padding: var(--space-4);
    }

    section.hero.hero--page .hero__title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
}

/* ======================================
   CATEGORY/SERVICE HERO
====================================== */
.hero--category,
.hero--service {
    padding: var(--space-16) 0 var(--space-12);
    background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-white) 100%);
}

.hero--category .hero__title,
.hero--service .hero__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--color-ink);
    margin-bottom: var(--space-4);
}

.hero__intro {
    max-width: 700px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-gray-600);
    margin-bottom: var(--space-6);
}

/* ======================================
   SERVICE DESCRIPTION
====================================== */
.section--description {
    padding: var(--space-12) 0;
    background: var(--color-white);
}

.service-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-gray-800);
}

.service-description p {
    margin-bottom: var(--space-4);
}

.service-description h2,
.service-description h3 {
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
    color: var(--color-ink);
}

/* ======================================
   INTRO CONTENT
====================================== */
.section--intro {
    padding: var(--space-10) 0;
    background: var(--color-white);
}

.section--intro .container {
    max-width: 800px;
}

.intro-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-gray-700);
}

.intro-content p {
    margin-bottom: var(--space-4);
}

.intro-content p:last-child {
    margin-bottom: 0;
}

.intro-content h2,
.intro-content h3 {
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
    color: var(--color-ink);
    font-family: var(--font-display);
}

/* ======================================
   SERVICES GRID (Listing Page)
====================================== */
.services-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
}

.services-grid a:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.services-grid a span {
    font-weight: 500;
    color: var(--color-ink);
}

.services-grid a i {
    color: var(--color-primary);
    opacity: 0;
    transform: translateX(-5px);
    transition: all var(--transition-fast);
}

.services-grid a:hover i {
    opacity: 1;
    transform: translateX(0);
}

/* ======================================
   CITY GRID
====================================== */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-3);
}

.city-link {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4);
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
}

.city-link:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.city-link__name {
    font-weight: 600;
    color: var(--color-ink);
}

.city-link__count {
    font-size: 0.85rem;
    color: var(--color-gray-400);
}

/* ======================================
   PROVIDER GRID
====================================== */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-5);
}

/* ======================================
   AGGREGATE RATING SECTION
====================================== */
.section--aggregate {
    padding: var(--space-8) 0;
    background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-ink) 100%);
}

.aggregate-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    text-align: center;
}

.aggregate-summary__rating {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.aggregate-summary__value {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-white);
}

.aggregate-summary__stars {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.aggregate-summary__meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    text-align: left;
    font-size: 0.9rem;
    color: var(--color-gray-400);
}

@media (max-width: 768px) {
    .aggregate-summary {
        flex-direction: column;
        gap: var(--space-4);
    }

    .aggregate-summary__meta {
        text-align: center;
    }
}

/* ======================================
   INSPIRATION GRID (Category Pages)
====================================== */
.section--inspiration .inspiration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-3);
}

.inspiration-card {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.inspiration-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.inspiration-card:hover img {
    transform: scale(1.05);
}

/* ======================================
   PAGE BACKGROUNDS
====================================== */
.page-category,
.page-service {
    background: var(--color-gray-50);
}

.page-category .section,
.page-service .section {
    padding: var(--space-12) 0;
}

.page-category .section:nth-child(even),
.page-service .section:nth-child(even) {
    background: var(--color-white);
}

/* Responsive */
@media (max-width: 768px) {

    .hero--category,
    .hero--service {
        padding: var(--space-10) 0 var(--space-8);
    }

    .services-grid,
    .city-grid,
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .provider-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================
   FAQ ACCORDION
====================================== */
.section--faq {
    background: var(--color-gray-50);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-item__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5) var(--space-6);
    background: transparent;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-ink);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.faq-item__question:hover {
    background: var(--color-gray-50);
}

.faq-item__question i {
    flex-shrink: 0;
    font-size: 1.25rem;
    color: var(--color-gray-400);
    transition: transform var(--transition-fast);
}

.faq-item__question[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item__answer.is-open {
    max-height: 500px;
}

.faq-item__content {
    padding: 0 var(--space-6) var(--space-5);
    color: var(--color-gray-600);
    line-height: 1.7;
}

.faq-item__content p {
    margin-bottom: var(--space-3);
}

.faq-item__content p:last-child {
    margin-bottom: 0;
}

/* ======================================
   RELATED/NEARBY SECTIONS
====================================== */
.section--related,
.section--nearby {
    background: var(--color-white);
    padding: var(--space-12) 0;
}