/* Services Page Specific Styles */

/* Hero Section */
.service-hero {
    position: relative;
    padding: 8rem 0 6rem;
    background-color: var(--color-bg-surface);
    overflow: hidden;
    text-align: center;
}

.service-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.service-hero p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(212, 163, 115, 0.1), transparent);
    z-index: 1;
}

.category-scroll {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 0;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.cat-pill {
    padding: 10px 30px;
    border-radius: 50px;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.cat-pill:hover,
.cat-pill.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: transparent;
    /* Minimalist active state */
}

/* Service Cards Re-imagined */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
}

.service-card {
    background: #fff;
    border: none;
    /* No border for cleaner look */
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.service-img {
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.service-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    /* Slight overlay */
    transition: var(--transition);
}

.service-card:hover .service-img::after {
    background: rgba(0, 0, 0, 0);
}

.service-info {
    padding: 2rem;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.service-price {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-secondary);
}

.service-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.service-btn {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: var(--transition);
}

.service-btn:hover,
.service-card.selected .service-btn {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Floating Bar Refined */
.floating-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 2rem;
    z-index: 1000;
    transition: var(--transition);
    opacity: 0;
    width: 90%;
    max-width: 550px;
    justify-content: space-between;
    pointer-events: none;
    /* Prevent blocking clicks when invisible */
}

.floating-bar.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
    /* Enable clicks when visible */
}

/* Selected Card State */
.service-card.selected {
    box-shadow: 0 0 0 2px var(--color-primary);
    /* Use box-shadow for border to prevent layout shift */
    background-color: var(--color-bg-surface);
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .service-hero {
        padding: 6rem 0 3rem;
    }

    .service-hero h1 {
        font-size: 2.2rem;
    }

    .deco-circle {
        opacity: 0.5;
        /* Tone down decorations on mobile */
    }

    .category-scroll {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 1rem;
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
        /* Add right padding */
        padding-bottom: 1rem;
        /* Space for scrollbar if visible/touch area */
        margin-bottom: 2rem;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll iOS */
        scrollbar-width: none;
        /* Firefox */
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }

    .category-scroll::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .cat-pill {
        white-space: nowrap;
        flex-shrink: 0;
        /* Prevent shrinking */
    }

    .service-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 2rem;
    }

    .service-img {
        height: 220px;
        /* Smaller images */
    }

    .floating-bar {
        width: 90%;
        bottom: 5.5rem;
        /* Above mobile nav (approx 80px) */
        padding: 0.8rem 1.5rem;
        flex-direction: row;
        /* Keep row but adjust sizes */
        max-width: none;
        /* Full width constraint */
    }

    .floating-bar .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    #selected-total {
        font-size: 1rem;
    }

    .category-wrapper {
        position: relative;
        overflow: hidden;
    }

    .scroll-hint {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 2rem;
        /* Match scroll margin */
        width: 60px;
        background: linear-gradient(to right, transparent, var(--color-bg-body));
        display: flex;
        align-items: center;
        justify-content: flex-end;
        pointer-events: none;
        padding-right: 0.5rem;
        z-index: 2;
        animation: fadeOut 2s ease 3s forwards;
        /* Hide after 3s */
    }

    @keyframes fadeOut {
        to {
            opacity: 0;
            visibility: hidden;
        }
    }

    .scroll-hint i {
        color: var(--color-primary);
        font-size: 1.5rem;
        animation: bounceX 1s infinite;
    }

    @keyframes bounceX {

        0%,
        100% {
            transform: translateX(0);
        }

        50% {
            transform: translateX(5px);
        }
    }

    .hide-mobile {
        display: none;
    }
}

/* Dark Mode Overrides */
body.dark-mode .service-btn:hover,
body.dark-mode .service-card.selected .service-btn {
    color: #000;
    /* Black text on White primary bg */
}

body.dark-mode .floating-bar .btn-primary {
    color: #000;
    /* Black text on White primary bg */
}