/* =============================================
   Services Grid
   ============================================= */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* --- Card --- */
.service-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3 / 4;
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.service-card:hover img {
    transform: scale(1.08);
    filter: brightness(0.55);
}

/* --- Overlay --- */
.service-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.2) 55%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.75rem;
    transition: var(--transition);
}

.service-card:hover .service-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.75) 60%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

/* --- Icon --- */
.service-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    transition: var(--transition);
}

/* --- Title --- */
.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.15rem;
    color: #fff;
    line-height: 1.3;
}

/* --- Description (index preview) --- */
.service-card p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.35s ease;
}

.service-card:hover p {
    opacity: 1;
    max-height: 60px;
}

/* =============================================
   Detail Sub-items (hover reveal)
   ============================================= */

.service-details-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: grid;
    gap: 0.15rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.35s ease 0.05s, max-height 0.4s ease;
}

.service-card:hover .service-details-list {
    opacity: 1;
    max-height: 300px;
}

.service-details-list li {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0.3rem 0 0.3rem 1.2rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.service-details-list li:last-child {
    border-bottom: none;
}

.service-details-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        aspect-ratio: 4 / 5;
    }

    .service-overlay {
        padding: 1.25rem;
    }

    .service-card h3 {
        font-size: 1.15rem;
    }

    .service-details-list li {
        font-size: 0.78rem;
    }
}