/* Treatment Cards Uniform Styling */
/* Ensures all treatment cards have consistent height and 3-line text limits */

.featured-treatments .service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.featured-treatments .service-card-image {
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.featured-treatments .service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-treatments .service-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    justify-content: space-between;
}

.featured-treatments .service-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2c5530;
    line-height: 1.3;
    /* Limit title to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6rem; /* Ensures consistent height even for shorter titles */
}

.featured-treatments .service-card-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex: 1;
    /* Limit description to exactly 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.275rem; /* 3 lines × 1.5 line-height × 0.95rem font-size */
    max-height: 4.275rem;
}

.featured-treatments .btn-outline {
    margin-top: auto;
    align-self: flex-start;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid #2c5530;
    color: #2c5530;
    background: transparent;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.featured-treatments .btn-outline:hover {
    background: #2c5530;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.3);
}

/* Service badge positioning */
.featured-treatments .service-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .featured-treatments .service-card {
        min-height: 380px;
        margin-bottom: 1.5rem;
    }
    
    .featured-treatments .service-card-image {
        height: 180px;
    }
    
    .featured-treatments .service-card-content {
        padding: 1.25rem;
    }
    
    .featured-treatments .service-card-title {
        font-size: 1.15rem;
        min-height: 2.3rem;
    }
    
    .featured-treatments .service-card-description {
        font-size: 0.9rem;
        min-height: 4.05rem;
        max-height: 4.05rem;
    }
}

@media (max-width: 576px) {
    .featured-treatments .service-card {
        min-height: 360px;
    }
    
    .featured-treatments .service-card-image {
        height: 160px;
    }
    
    .featured-treatments .service-card-content {
        padding: 1rem;
    }
    
    .featured-treatments .service-card-title {
        font-size: 1.1rem;
        min-height: 2.2rem;
    }
    
    .featured-treatments .service-card-description {
        font-size: 0.85rem;
        min-height: 3.825rem;
        max-height: 3.825rem;
    }
    
    .featured-treatments .btn-outline {
        font-size: 0.85rem;
        padding: 0.45rem 1rem;
    }
}

/* Ensure consistent spacing in the grid */
.featured-treatments .row > [class*="col-"] {
    display: flex;
    margin-bottom: 2rem;
}

.featured-treatments .row > [class*="col-"] > .service-card {
    width: 100%;
}

/* Loading state for better UX */
.featured-treatments .service-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.featured-treatments .service-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c5530;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}