/* Enable smooth horizontal scrolling with CSS Snap */
.services-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 20px;
    padding-bottom: 20px;
    /* Hide scrollbar for clean UI */
    scrollbar-width: none; /* Firefox */
}

.services-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Snap each card into place */
.services-carousel > div {
    flex: 0 0 calc(33.333% - 14px); /* 3 cards visible on desktop */
    scroll-snap-align: start;
}

/* Card Container Setup */
.service-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Badge Container Positioning */
.service-badge-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 85%; /* Adjust width to match demo styling */
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Title Box (Always Visible) */
.badge-title-box {
    background-color: #000000;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Description Box (Hidden by default using height/opacity) */
.badge-desc-box {
    background-color: #ffffff;
    color: #111111;
    padding: 0 16px; /* 0 vertical padding initially */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.badge-desc-box p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    color: #222222;
}

/* --- HOVER EFFECT --- */
/* On hover, expand description box and add padding */
.service-card:hover .badge-desc-box {
    max-height: 120px; /* Gives enough room for the text */
    opacity: 1;
    padding: 12px 16px;
}

/* Add the circular blue arrow to the end of the service title */
.badge-title-box h3::after,
.badge-title-text::after {
    content: "›";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
    margin-left: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #2563eb; 
    color: #ffffff;            /* White arrow color */
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
    padding-bottom: 2px;       /* Fine-tunes optical vertical centering of the › character */
    padding-left: 1px;        /* Fine-tunes optical horizontal centering */
}

/* Navigation Buttons Styling */
.carousel-nav-prev,
.carousel-nav-next {
    cursor: pointer;
    background: transparent;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    padding: 10px 15px;
    user-select: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.carousel-nav-prev:hover,
.carousel-nav-next:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

@media (max-width: 768px) {
	.badge-desc-box p {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	}

	.services-carousel > div {
		flex: 0 0 85%; /* 1 full card + preview of next on mobile */
	}
}