/**
 * Homepage services grid — compact HUD modules (index.php only).
 * Scoped under .lb-home-services to avoid conflicts with services.php.
 */

.lb-home-services .lb-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: stretch;
}

/* —— Module card —— */
.lb-home-services .lb-svc-module {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 0;
    padding: 1rem 1rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 212, 255, 0.14);
    background:
        linear-gradient(155deg, rgba(14, 20, 32, 0.95), rgba(8, 10, 18, 0.92));
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.lb-home-services .lb-svc-module::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 212, 255, 0.06), transparent 42%);
    pointer-events: none;
}

.lb-home-services .lb-svc-module.is-featured {
    border-color: rgba(0, 212, 255, 0.38);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(0, 212, 255, 0.08) inset;
}

.lb-home-services .lb-svc-module:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow: 0 16px 40px rgba(0, 212, 255, 0.12);
}

/* HUD corner ticks */
.lb-home-services .lb-svc-module__fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.lb-home-services .lb-svc-module__fx span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: rgba(0, 212, 255, 0.45);
    border-style: solid;
    opacity: 0.7;
}

.lb-home-services .lb-svc-module__fx span:first-child {
    top: 7px;
    left: 7px;
    border-width: 1px 0 0 1px;
}

.lb-home-services .lb-svc-module__fx span:last-child {
    right: 7px;
    bottom: 7px;
    border-width: 0 1px 1px 0;
}

/* —— Header row —— */
.lb-home-services .lb-svc-module__head {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem;
    align-items: start;
}

.lb-home-services .lb-svc-module__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.22);
    color: var(--lb-primary, #00d4ff);
    font-size: 1rem;
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.12);
}

.lb-home-services .lb-svc-module__meta {
    min-width: 0;
}

.lb-home-services .lb-svc-module__labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.2rem;
}

.lb-home-services .lb-svc-module__tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0, 212, 255, 0.75);
}

.lb-home-services .lb-svc-module__badge {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.14);
    color: var(--lb-primary, #00d4ff);
    border: 1px solid rgba(0, 212, 255, 0.28);
}

.lb-home-services .lb-svc-module__title {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.25;
    color: #fff;
    font-weight: 700;
}

/* —— Icon toolbar —— */
.lb-home-services .lb-svc-module__toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-shrink: 0;
}

.lb-home-services .lb-svc-icon-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lb-home-services .lb-svc-icon-btn:hover,
.lb-home-services .lb-svc-icon-btn:focus-visible {
    outline: none;
    transform: scale(1.06);
}

.lb-home-services .lb-svc-icon-btn--quote {
    border-color: rgba(0, 212, 255, 0.35);
    background: rgba(0, 212, 255, 0.16);
    color: var(--lb-primary, #00d4ff);
}

.lb-home-services .lb-svc-icon-btn--quote:hover,
.lb-home-services .lb-svc-icon-btn--quote:focus-visible {
    background: rgba(0, 212, 255, 0.28);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.25);
}

.lb-home-services .lb-svc-icon-btn--link:hover,
.lb-home-services .lb-svc-icon-btn--link:focus-visible {
    border-color: rgba(0, 212, 255, 0.35);
    color: var(--lb-primary, #00d4ff);
}

/* —— Body —— */
.lb-home-services .lb-svc-module__desc {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.62);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lb-home-services .lb-svc-module__chips {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lb-home-services .lb-svc-module__chips li {
    font-size: 0.68rem;
    line-height: 1.3;
    padding: 0.22rem 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.16);
    background: rgba(0, 212, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.lb-home-services .lb-svc-module__chips li::before {
    content: "›";
    margin-right: 0.2rem;
    color: var(--lb-primary, #00d4ff);
    font-weight: 700;
}

/* Reset legacy home service card rules inside module grid */
.lb-home-services .lb-svc-module .service-icon,
.lb-home-services .lb-svc-module .lb-home-service-badge,
.lb-home-services .lb-svc-module .lb-home-service-actions,
.lb-home-services .lb-svc-module .service-features,
.lb-home-services .lb-svc-module .service-link {
    display: none;
}

.lb-home-services .lb-svc-module h3.lb-svc-module__title {
    margin-bottom: 0;
}

/* —— Responsive —— */
@media (max-width: 1100px) {
    .lb-home-services .lb-svc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .lb-home-services .lb-svc-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .lb-home-services .lb-svc-module {
        padding: 0.9rem 0.85rem 0.8rem;
    }

    .lb-home-services .lb-svc-module__toolbar {
        flex-direction: row;
        gap: 0.3rem;
    }

    .lb-home-services .lb-svc-icon-btn {
        width: 36px;
        height: 36px;
    }

    .lb-home-services .lb-svc-module__chips li {
        font-size: 0.65rem;
        max-width: calc(50% - 0.2rem);
    }
}

@media (max-width: 400px) {
    .lb-home-services .lb-svc-module__head {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .lb-home-services .lb-svc-module__toolbar {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
        margin-top: 0.15rem;
    }
}
