/* Service Card Accordion Styles */

.services-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When any card is expanded, show minimized cards in a 3-column layout */
.services-grid:has(.service-card.expanded) {
    grid-template-columns: repeat(3, 1fr);
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card[data-service-expand] {
    cursor: pointer;
}

/* Horizontal expansion - span full width */
.service-card.expanding-horizontal {
    grid-column: 1 / -1;
}

.service-card.expanded {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--aurora-cyan);
    box-shadow: 0 16px 40px rgba(79, 179, 212, 0.25);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-details-content {
    padding: 2rem 0 1rem 0;
}

.service-details h4 {
    color: var(--star-white);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
}

.service-details h4:first-child {
    margin-top: 0;
}

.service-details p {
    color: var(--star-silver);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.service-details ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0 1.5rem 0;
}

.service-details ul li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.8;
    color: var(--star-silver);
}

.service-details ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--aurora-cyan);
    font-weight: 700;
}

.service-expand-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: var(--aurora-cyan);
    font-weight: 500;
    font-size: 0.9rem;
}

.service-expand-icon {
    transition: transform 0.3s ease;
    font-style: normal;
}

/* Hide expand indicator when card is expanded */
.service-card.expanded .service-expand-indicator {
    display: none;
}

.service-card.expanded .service-expand-icon {
    transform: rotate(90deg);
}

.service-details-divider {
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(124, 107, 175, 0.3) 20%,
        rgba(124, 107, 175, 0.3) 80%,
        transparent 100%);
    margin: 1.5rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr !important;  /* Always single column on mobile */
        gap: 1.5rem;
    }

    /* Don't change grid layout when expanded on mobile */
    .services-grid:has(.service-card.expanded) {
        grid-template-columns: 1fr !important;
    }

    .service-card.expanded {
        grid-column: auto;  /* Don't span on mobile, stack naturally */
        /* Reduce glow effect on mobile - less jarring */
        background: rgba(255, 255, 255, 0.04);
        box-shadow: 0 8px 20px rgba(79, 179, 212, 0.12);
        border-color: rgba(79, 179, 212, 0.5);
    }

    .service-card.expanding-horizontal {
        grid-column: auto;  /* Don't span on mobile */
    }
}
