/* --- SERVICES SECTION --- */
.services-section {
    padding: 100px 0;
    background-color: #f8fafc; /* Light Gray Background */
    font-family: 'Inter', sans-serif;
}

.text-center { text-align: center; }

/* Header Styling */
.section-header {
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.pill-tag {
    display: inline-block;
    background: #e0f2fe;
    color: #0284c7;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    color: #0f172a;
    margin-bottom: 20px;
    font-weight: 800;
}
.highlight { color: #10b981; } /* Green Highlight */

.section-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* --- GRID LAYOUT --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

/* --- CARD STYLING (The Interactive Part) --- */
.service-card {
    position: relative;
    height: 350px; /* Fixed height for uniformity */
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Background Image (Hidden by default, shown on hover) */
.card-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; /* Hidden initially */
    transform: scale(1.1);
    transition: all 0.5s ease;
    z-index: 0;
}

/* Overlay gradient based on the specific card color */
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(248,250,252,1) 100%);
    opacity: 1;
    z-index: 1;
    transition: 0.4s ease;
}

/* --- CONTENT --- */
.card-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: 0.4s ease;
}

/* Icon Box */
.icon-box {
    width: 60px; height: 60px;
    background-color: var(--accent-color); /* Uses the color set in HTML */
    color: white;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
    box-shadow: 0 8px 16px -4px var(--accent-color);
    transition: 0.4s ease;
}

.card-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    transition: 0.3s;
}

.card-content p {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.95rem;
    transition: 0.3s;
}

/* The Button (Hidden initially) */
.btn-text {
    margin-top: auto; /* Push to bottom */
    font-weight: 700;
    text-decoration: none;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s ease;
}

/* --- HOVER EFFECTS --- */
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* 1. Show the Image */
.service-card:hover .card-bg {
    opacity: 0.2; /* Show faint image */
    transform: scale(1);
}

/* 2. Change Background to Dark Gradient of Accent Color */
.service-card:hover::before {
    background: var(--accent-color);
    opacity: 0.95; /* Color overlay */
}

/* 3. Change Text Colors to White */
.service-card:hover h3,
.service-card:hover p {
    color: white;
}

/* 4. Animate Icon */
.service-card:hover .icon-box {
    background: white;
    color: var(--accent-color); /* Icon takes the card color */
    transform: scale(1.1) rotate(5deg);
}

/* 5. Slide up Button */
.service-card:hover .btn-text {
    opacity: 1;
    transform: translateY(0);
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 Column on mobile */
    }
    .service-card { height: auto; min-height: 300px; }
    .section-title { font-size: 2rem; }
}