/* --- Services Overview Section (Carousel) --- */
.services-overview {
    padding: 8rem 0;
    background-color: var(--bg-dark);
    overflow: hidden;
}

.services-header-container {
    padding: 0 10%;
    margin-bottom: 3rem;
}

/* Services Typography */
.services-kicker {
    font-family: var(--font-primary, 'Poppins', sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 1.5rem;
    display: inline-block;
    position: relative;
    color: var(--brand-purple);
}

.services-kicker::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 30px;
    height: 3px;
    background-color: var(--brand-purple);
}

.services-title {
    font-family: var(--font-heading, serif);
    font-size: 5rem;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -1px;
}

.services-title .title-accent {
    color: var(--brand-purple);
}

.services-title .sub-heading {
    display: block;
    color: #dddddd;
    font-size: 4rem;
    font-weight: 400;
}

.services-title .title-dash {
    display: inline-block;
    width: 80px;
    height: 4px;
    background-color: var(--brand-purple);
    margin-bottom: 1rem;
    margin-right: 20px;
    vertical-align: middle;
}

/* Carousel Layout */
.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    padding: 0 10%; /* Controls the visual space */
    scroll-padding-left: 10%; /* Forces the snap to respect the padding */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.service-card {
    flex: 0 0 calc(80vw - 2rem);
    max-width: 400px;
    height: 550px;
    position: relative;
    scroll-snap-align: center;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transform: scale(0.98);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: scale(1);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem 2rem 2rem 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    color: #ffffff;
}

.card-overlay h3 {
    font-family: var(--font-heading, serif);
    font-size: 2.2rem;
    margin: 0 0 0.5rem 0;
}

.card-overlay p {
    font-size: 1rem;
    color: #cccccc;
    margin: 0;
}

/* Carousel Controls (Desktop Only) */
.carousel-nav {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    color: #000000;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: background 0.3s, color 0.3s;
}

.carousel-nav:hover {
    background: var(--brand-purple);
    color: #ffffff;
}

.prev-btn { left: 2rem; }
.next-btn { right: 2rem; }

@media (min-width: 768px) {
    .service-card {
        flex: 0 0 350px;
        scroll-snap-align: start;
    }
    .carousel-nav {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* --- Carousel Card Pill Button --- */
.card-pill-btn {
    display: inline-block;
    background-color: #ffffff; /* Changed to White background */
    color: #000000; /* Changed to Black text */
    padding: 10px 24px;
    border-radius: 50px; 
    font-family: var(--font-primary, 'Poppins', sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 1.5rem;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Makes the button turn purple and text white when the user hovers over the card */
.service-card:hover .card-pill-btn {
    background-color: var(--brand-purple);
    color: #ffffff; /* Ensures text becomes white when button turns purple */
}

@media (max-width: 768px) {
    .services-title { font-size: 3.5rem; }
    .services-title .sub-heading { font-size: 2.8rem; }
    .services-title .title-dash { width: 50px; }
    .services-header-container { padding: 0 2rem; }
    
    .carousel-track { 
        padding: 0 2rem; 
        scroll-padding-left: 2rem; /* Forces mobile snap to respect padding */
    }
}