/* ─── Services Grid — Frontend Styles ──────────────────────────────────────── */

#sg-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
}

/* ── Main grid ── */
.sg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0;
    list-style: none;
    margin: 0;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .sg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .sg-grid { grid-template-columns: 1fr; }
}

/* ── Card ── */
.sg-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px 22px;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 2px solid #f0f4f8;
    border-top: 3px solid #1a56db;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none !important;
    color: #1e293b !important;
    outline: none;
    box-sizing: border-box;
}

.sg-card:hover,
.sg-card:focus {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
    border-color: #1a56db;
    text-decoration: none !important;
}

/* ── Icon bubble ── */
.sg-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 4px;
    flex-shrink: 0;
    line-height: 1;
}
.sg-card-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* ── Title ── */
.sg-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

/* ── Description ── */
.sg-card-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    flex: 1;
}

/* ── Sub-services badge ── */
.sg-sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #eef2ff;
    color: #1a56db;
    cursor: pointer;
    border: none;
    transition: background 0.2s, color 0.2s;
    align-self: flex-start;
    font-family: inherit;
}
.sg-sub-badge:hover {
    background: #1a56db;
    color: #ffffff;
}

/* ── Modal overlay ── */
.sg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* ── Modal box ── */
.sg-modal-box {
    background: #f0f4fb;
    border-radius: 20px;
    width: 100%;
    max-width: 960px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 32px 32px 28px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.22);
    box-sizing: border-box;
}

/* ── Modal header ── */
.sg-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}
.sg-modal-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 4px;
}
.sg-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    padding: 0;
    border: none;
}
.sg-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #e2e8f0;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #1e293b;
    flex-shrink: 0;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}
.sg-modal-close:hover { background: #cbd5e1; }

/* ── Sub-grid inside modal ── */
.sg-modal-grid .sg-card {
    padding: 20px 18px 16px;
}
.sg-modal-grid .sg-card-title { font-size: 15px; }
.sg-modal-grid .sg-card-desc  { font-size: 13px; }
.sg-modal-grid .sg-card-icon  { width: 44px; height: 44px; font-size: 22px; }

@media (max-width: 900px) {
    .sg-modal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .sg-modal-grid { grid-template-columns: 1fr; }
    .sg-modal-box  { padding: 20px 16px; }
}
