/* ================================================
   LOCABEE V5 COMPONENTS
   Shared UI components: cards, pills, grids
   Loaded on pages that use these components
   ================================================ */

/* ======================================
   SERVICE PILLS
====================================== */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
}

.category-pill {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--color-gray-50);
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.category-pill:hover {
    background: var(--color-ink);
    color: var(--color-white);
}

/* ======================================
   CITY CHIPS
====================================== */
.city-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
}

.city-chip {
    padding: var(--space-2) var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.city-chip:hover {
    background: var(--color-white);
    color: var(--color-ink);
}

/* ======================================
   CITY CIRCLES (Carousel)
====================================== */
.city-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    transition: transform var(--transition-base);
}

.city-circle:hover {
    transform: translateY(-8px);
}

.city-circle__border {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            var(--color-primary) 0%,
            #7DDCE8 30%,
            #5CC8D4 50%,
            var(--color-primary) 70%,
            #9AEDF7 100%);
    background-size: 200% 200%;
    animation: gradientRotate 4s ease infinite;
    transition: all var(--transition-base);
}

.city-circle:hover .city-circle__border {
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

@keyframes gradientRotate {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.city-circle__image {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-white);
    flex-shrink: 0;
    padding: 3px;
}

.city-circle__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform var(--transition-slow);
}

.city-circle:hover .city-circle__image img {
    transform: scale(1.1);
}

.city-circle__name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-ink);
    text-align: center;
}

@media (min-width: 768px) {
    .city-circle__border {
        width: 140px;
        height: 140px;
    }

    .city-circle__name {
        font-size: 1rem;
    }
}

/* ======================================
   GRIDS
====================================== */
.services-grid {
    display: grid;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .services-grid--4cols {
        grid-template-columns: repeat(4, 1fr);
    }
}

.provider-list {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-6);
}

@media (min-width: 640px) {
    .provider-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .provider-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.provider-list--4 {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .provider-list--4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ======================================
   RELATED CARDS
====================================== */
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

@media (min-width: 640px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.related-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
}

.related-card:hover {
    background: var(--color-gray-100);
    transform: translateX(4px);
}

.related-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: var(--space-1);
    transition: color var(--transition-fast);
}

.related-card:hover .related-card__name {
    color: var(--color-primary-hover);
}

.related-card__count,
.related-card__distance {
    font-size: 0.75rem;
    color: var(--color-gray-500);
}

.related-card i {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray-400);
    opacity: 0;
    transition: all var(--transition-fast);
}

.related-card:hover i {
    opacity: 1;
    color: var(--color-primary);
}

/* ======================================
   BLOG CARDS
====================================== */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(100px, auto);
    }

    .blog-card:nth-child(1),
    .blog-card:nth-child(4) {
        grid-row: span 2;
    }

    .blog-card:nth-child(1) .blog-card__image,
    .blog-card:nth-child(4) .blog-card__image {
        aspect-ratio: 4/5;
    }

    .blog-card:nth-child(1) .blog-card__title,
    .blog-card:nth-child(4) .blog-card__title {
        font-size: 1.35rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .blog-card:nth-child(1) .blog-card__excerpt,
    .blog-card:nth-child(4) .blog-card__excerpt {
        -webkit-line-clamp: 4;
        line-clamp: 4;
        font-size: 0.9rem;
    }
}

.blog-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.blog-card__image {
    position: relative;
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.08);
}

.blog-card__badge {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-primary);
    color: var(--color-ink);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
}

.blog-card__content {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__title a {
    color: var(--color-ink);
    transition: color var(--transition-fast);
}

.blog-card__title a:hover {
    color: var(--color-primary-hover);
}

.blog-card__excerpt {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    line-height: 1.6;
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-top: auto;
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-gray-100);
}

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

.blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: all var(--transition-fast);
}

.blog-card__link:hover {
    gap: var(--space-3);
    color: var(--color-ink);
}

.blog-card__link i {
    transition: transform var(--transition-fast);
}

.blog-card__link:hover i {
    transform: translateX(3px);
}

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

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.review-card {
    padding: var(--space-5);
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
}

.review-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.review-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill);
    background: var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.review-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-card__avatar span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-gray-600);
}

.review-card__meta {
    flex: 1;
}

.review-card__author {
    display: block;
    font-weight: 600;
    color: var(--color-ink);
}

.review-card__date {
    font-size: 0.8rem;
    color: var(--color-gray-500);
}

.review-card__rating {
    display: flex;
    gap: 2px;
}

.review-card__rating i {
    font-size: 0.875rem;
    color: var(--color-gray-300);
}

.review-card__rating i.is-filled {
    color: var(--color-primary);
}

.review-card__stars {
    color: var(--color-primary);
    font-size: 1rem;
    letter-spacing: 2px;
}

.review-card__text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-gray-700);
    margin: 0 0 var(--space-4);
}

.review-card__content p {
    color: var(--color-gray-700);
    line-height: 1.6;
    margin: 0;
}

.review-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-gray-200);
}

.review-card__provider {
    font-size: 0.85rem;
    color: var(--color-primary);
    text-decoration: none;
}

.review-card__provider:hover {
    text-decoration: underline;
}

/* ======================================
   RATING SUMMARY
====================================== */
.rating-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-6);
    padding: var(--space-5);
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
}

.rating-summary__score {
    text-align: center;
}

.rating-summary__value {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-ink);
    line-height: 1;
}

.rating-summary__stars {
    display: flex;
    justify-content: center;
    gap: var(--space-1);
    margin: var(--space-2) 0;
    color: var(--color-primary);
}

.rating-summary__count {
    font-size: 0.875rem;
    color: var(--color-gray-500);
}

.rating-summary__breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    justify-content: center;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.rating-bar__label {
    width: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-gray-600);
    text-align: center;
}

.rating-bar__track {
    flex: 1;
    height: 8px;
    background: var(--color-gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar__fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    transition: width var(--transition-slow);
}

.rating-bar__count {
    width: 30px;
    font-size: 0.8rem;
    color: var(--color-gray-500);
    text-align: right;
}

@media (max-width: 768px) {
    .rating-summary {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .rating-summary__breakdown {
        margin-top: var(--space-4);
    }
}

/* ======================================
   TRUST BADGE
====================================== */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary-light);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-ink);
    margin-top: var(--space-4);
}

.trust-badge i {
    font-size: 1rem;
    color: var(--color-primary);
}

/* ======================================
   PROVIDER COUNT BADGE
====================================== */
.provider-count-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    background: var(--color-ink);
    color: var(--color-white);
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--transition-base);
    margin-top: var(--space-4);
}

.provider-count-badge strong {
    color: var(--color-primary);
}

.provider-count-badge:hover {
    background: var(--color-gray-800);
    color: var(--color-white);
    transform: translateY(-2px);
}

.provider-count-badge i {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(3px);
    }
}

/* ======================================
   PAGINATION
====================================== */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: var(--space-12);
}

.pagination__list {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    list-style: none;
}

.pagination__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-3);
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-gray-600);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination__link:hover {
    border-color: var(--color-gray-400);
    color: var(--color-ink);
}

.pagination__link.is-active {
    background: var(--color-ink);
    border-color: var(--color-ink);
    color: var(--color-white);
}

/* ======================================
   HERO BUBBLES / CARBONATION
====================================== */
.hero__bubbles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    opacity: 1;
}

.hero__bubbles .bubble {
    position: absolute;
    bottom: -20px;
    background: #9AEDF7;
    /* Solid V5 Primray Cyan */
    border-radius: 50%;
    animation: bubble-up var(--duration, 8s) infinite linear;
    opacity: 0;
    filter: blur(0.5px);
}

.hero__bubbles .bubble:nth-child(1) {
    left: 5%;
    width: 2px;
    height: 2px;
    --duration: 12s;
    animation-delay: 0s;
}

.hero__bubbles .bubble:nth-child(2) {
    left: 15%;
    width: 3px;
    height: 3px;
    --duration: 15s;
    animation-delay: 2s;
}

.hero__bubbles .bubble:nth-child(3) {
    left: 25%;
    width: 2px;
    height: 2px;
    --duration: 10s;
    animation-delay: 4s;
}

.hero__bubbles .bubble:nth-child(4) {
    left: 35%;
    width: 3px;
    height: 3px;
    --duration: 18s;
    animation-delay: 1s;
}

.hero__bubbles .bubble:nth-child(5) {
    left: 45%;
    width: 2px;
    height: 2px;
    --duration: 14s;
    animation-delay: 5s;
}

.hero__bubbles .bubble:nth-child(6) {
    left: 55%;
    width: 3px;
    height: 3px;
    --duration: 16s;
    animation-delay: 3s;
}

.hero__bubbles .bubble:nth-child(7) {
    left: 65%;
    width: 2px;
    height: 2px;
    --duration: 19s;
    animation-delay: 6s;
}

.hero__bubbles .bubble:nth-child(8) {
    left: 75%;
    width: 4px;
    height: 4px;
    --duration: 22s;
    animation-delay: 0.5s;
}

.hero__bubbles .bubble:nth-child(9) {
    left: 85%;
    width: 2px;
    height: 2px;
    --duration: 13s;
    animation-delay: 2.5s;
}

.hero__bubbles .bubble:nth-child(10) {
    left: 95%;
    width: 3px;
    height: 3px;
    --duration: 25s;
    animation-delay: 7s;
}

.hero__bubbles .bubble:nth-child(11) {
    left: 10%;
    width: 3px;
    height: 3px;
    --duration: 14s;
    animation-delay: 1.5s;
}

.hero__bubbles .bubble:nth-child(12) {
    left: 20%;
    width: 2px;
    height: 2px;
    --duration: 17s;
    animation-delay: 3.5s;
}

.hero__bubbles .bubble:nth-child(13) {
    left: 30%;
    width: 4px;
    height: 4px;
    --duration: 11s;
    animation-delay: 5.5s;
}

.hero__bubbles .bubble:nth-child(14) {
    left: 40%;
    width: 2px;
    height: 2px;
    --duration: 20s;
    animation-delay: 2.5s;
}

.hero__bubbles .bubble:nth-child(15) {
    left: 50%;
    width: 3px;
    height: 3px;
    --duration: 13s;
    animation-delay: 6.5s;
}

.hero__bubbles .bubble:nth-child(16) {
    left: 60%;
    width: 2px;
    height: 2px;
    --duration: 18s;
    animation-delay: 4.5s;
}

.hero__bubbles .bubble:nth-child(17) {
    left: 70%;
    width: 4px;
    height: 4px;
    --duration: 21s;
    animation-delay: 7.5s;
}

.hero__bubbles .bubble:nth-child(18) {
    left: 80%;
    width: 2px;
    height: 2px;
    --duration: 23s;
    animation-delay: 1.5s;
}

.hero__bubbles .bubble:nth-child(19) {
    left: 90%;
    width: 3px;
    height: 3px;
    --duration: 15s;
    animation-delay: 3.5s;
}

.hero__bubbles .bubble:nth-child(20) {
    left: 2%;
    width: 2px;
    height: 2px;
    --duration: 19s;
    animation-delay: 8.5s;
}

@keyframes bubble-up {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-700px);
        opacity: 0;
    }
}