/* ==========================================
   Featured Pros Carousel Styles
   Includes core Carousel System styles + Component Specifics
   ========================================== */

:root {
    --carousel-transition: 600ms cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* --- Core Carousel Styles (Ported from carousel.css) --- */

/* Carousel Container */
.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform var(--carousel-transition);
    will-change: transform;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.carousel-track.no-transition {
    transition: none;
}

/* Carousel Slides */
.carousel-slide {
    flex-shrink: 0;
    width: 100%;
    position: relative;
}

/* Multi-item carousel logic */
.carousel.multi-item .carousel-slide {
    width: calc(100% / 3);
    padding: 0 0.5rem;
}

@media (max-width: 1024px) {
    .carousel.multi-item .carousel-slide {
        width: calc(100% / 2);
    }
}

@media (max-width: 768px) {
    .carousel.multi-item .carousel-slide {
        width: 100%;
    }
}

/* Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* var(--shadow-md) fallback */
    transition: all 0.3s ease;
    opacity: 0.9;
}

.carousel-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* var(--shadow-lg) fallback */
    background: white;
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav.prev {
    left: 1rem;
}

.carousel-nav.next {
    right: 1rem;
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Hide arrows on mobile */
@media (max-width: 768px) {
    .carousel-nav {
        display: none;
    }
}

/* Dot Indicators */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 0;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color, #e5e5e5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: var(--text-light, #9ca3af);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--primary-color);
    width: 32px;
    border-radius: 6px;
}

/* Loading State */
.carousel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: var(--light-gray, #f9fafb);
}

.carousel-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color, #e5e5e5);
    border-top-color: var(--accent-color, #0ea5e9);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Component Specific Styles --- */

.featured-pros-section {
    background-color: var(--white);
}

.featured-pros-subtitle {
    color: var(--medium-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Card Styling for Pros */
.pro-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.pro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.pro-card-image {
    position: relative;
    padding-top: 60%;
    /* Aspect ratio */
    overflow: hidden;
    background-color: #f5f5f5;
}

.pro-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.pro-category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.pro-card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pro-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
    line-height: 1.3;
}

.pro-card-location {
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pro-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pro-card-footer {
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
}

.btn-pro-card {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.9rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
}

.btn-pro-card:hover {
    background: var(--primary-color);
    color: #fff;
}