/* ============================================================
   Services Mega-Menu + Service Detail Pages  (AI Global Solutions)
   ============================================================ */

/* ---------- Services Mega Menu ----------
   Desktop (>=1200px): wide multi-column grid of category cards.
   Tablet / Mobile (<1200px): theme's off-canvas accordion (Services > category > items). */

@media (min-width: 1200px) {
    /* the mega panel: grid of category cards (headings only by default) */
    .header-navigation .main-menu ul > li .sub-menu.services-menu {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        gap: 8px;
        width: 1240px;
        max-width: 96vw;
        left: 50%;
        transform: translateX(-50%);
        padding: 14px 18px;
        border-radius: 0 0 14px 14px;
        overflow: visible;
    }
    .header-navigation .main-menu ul > li:hover > .sub-menu.services-menu { top: 100%; }

    /* each category = card; relative so its sub-menu drops from it */
    .services-menu > li.mega-cat {
        position: relative;
        display: block;
        margin: 0;
        padding: 6px 9px;
        min-height: 38px;
        background: #f7f7fb;
        border-radius: 9px;
        transition: background .2s ease, box-shadow .2s ease;
    }
    .services-menu > li.mega-cat:hover {
        background: #fff;
        box-shadow: 0 16px 34px rgba(16, 16, 60, 0.12);
        z-index: 30;
    }

    /* card heading + icon + chevron */
    .services-menu > li.mega-cat > a {
        display: flex !important;
        align-items: flex-start;
        gap: 8px;
        margin: 0;
        padding: 0;
        border: 0;
        font-size: 9.5px;
        font-weight: 700;
        line-height: 1.35;
        letter-spacing: 0.15px;
        text-transform: uppercase;
        color: #15152e;
        white-space: normal;
    }
    .services-menu > li.mega-cat:hover > a { margin-left: 0; color: #fa4838; }
    .services-menu > li.mega-cat > a > i.fas {
        flex: 0 0 auto;
        width: 22px;
        height: 22px;
        border-radius: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        color: #fff;
        background: linear-gradient(135deg, #fa4838, #ff7d54);
        box-shadow: 0 5px 10px rgba(250, 72, 56, 0.26);
    }
    .services-menu > li.mega-cat > a::after {
        content: "\f107";
        font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
        font-weight: 900;
        font-size: 10px;
        color: #b9b9c6;
        margin-left: auto;
        transition: transform .2s ease, color .2s ease;
    }
    .services-menu > li.mega-cat:hover > a::after { color: #fa4838; transform: rotate(-180deg); }
    .services-menu > li.mega-cat .dd-trigger { display: none; }

    /* items: hidden, drop down from the card on hover */
    .services-menu > li.mega-cat > .sub-menu {
        position: absolute !important;
        top: calc(100% - 6px) !important;
        left: -8px !important;
        right: -8px !important;
        width: auto !important;
        z-index: 40;
        display: block !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(8px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
        margin: 0 !important;
        padding: 12px 16px 14px !important;
        background: #fff !important;
        border-radius: 12px !important;
        box-shadow: 0 22px 44px rgba(16, 16, 60, 0.18) !important;
    }
    .services-menu > li.mega-cat:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
    .services-menu > li.mega-cat > .sub-menu > li { margin: 0; }
    .services-menu > li.mega-cat > .sub-menu > li > a {
        display: block;
        padding: 5px 0 5px 16px;
        position: relative;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.4;
        color: #6a6a80;
        white-space: normal;
        transition: color .15s ease, padding .15s ease;
    }
    .services-menu > li.mega-cat > .sub-menu > li > a::before {
        content: "";
        position: absolute;
        left: 0; top: 12px;
        width: 6px; height: 6px;
        border-radius: 50%;
        background: #d9d9e3;
        transition: background .15s ease;
    }

    /* bottom row (last 6 cards in a 6-col grid): open the dropdown UPWARD so it never gets cut off */
    .services-menu > li.mega-cat:nth-last-child(-n+6) > .sub-menu {
        top: auto !important;
        bottom: calc(100% - 6px) !important;
        transform: translateY(-8px);
    }
    .services-menu > li.mega-cat:nth-last-child(-n+6):hover > .sub-menu {
        transform: translateY(0);
    }
    .services-menu > li.mega-cat > .sub-menu > li > a:hover { color: #fa4838; padding-left: 20px; margin-left: 0; }
    .services-menu > li.mega-cat > .sub-menu > li > a:hover::before { background: #fa4838; }
}
@media (min-width: 1200px) and (max-width: 1299px) {
    .header-navigation .main-menu ul > li .sub-menu.services-menu { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 1060px; }
}
@media (min-width: 1600px) {
    .header-navigation .main-menu ul > li .sub-menu.services-menu { grid-template-columns: repeat(6, minmax(0, 1fr)); width: 1400px; }
}

/* ---------- Service Detail Pages ---------- */
:root { --acc: #fa4838; }
.svc-section { position: relative; }
.svc-section .svc-sub {
    display: inline-block;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--acc, #fa4838);
}
.svc-section .svc-sub::before {
    content: "";
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 8px;
    vertical-align: middle;
}
.svc-section h2 { margin-bottom: 22px; line-height: 1.2; }
.svc-section p { color: #65657b; line-height: 1.85; margin-bottom: 18px; }

.svc-img { position: relative; border-radius: 18px; overflow: hidden; }
.svc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-img.tall img { min-height: 460px; }
.svc-img.wide img { min-height: 340px; }
.svc-badge {
    position: absolute; left: 22px; bottom: 22px;
    background: rgba(255,255,255,0.94);
    padding: 12px 20px; border-radius: 12px;
    font-weight: 700; color: #1a1a3c; font-size: 15px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.12);
}

.svc-feature-list { list-style: none; padding: 0; margin: 10px 0 30px; }
.svc-feature-list li {
    position: relative; padding-left: 34px; margin-bottom: 14px;
    color: #43435a; font-weight: 500; line-height: 1.6;
}
.svc-feature-list li i {
    position: absolute; left: 0; top: 3px; font-size: 18px; color: var(--acc, #fa4838);
}

.svc-cta {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 32px; border-radius: 40px;
    background: var(--acc, #fa4838);
    color: #fff !important; font-weight: 600; border: 0;
    transition: transform .2s ease, box-shadow .2s ease;
}
.svc-cta:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,0.18); color:#fff; }

/* feature cards variant */
.svc-card {
    background: #f7f7fb; border-radius: 16px; padding: 28px 26px;
    height: 100%; transition: transform .25s ease, box-shadow .25s ease;
}
.svc-card:hover { transform: translateY(-6px); box-shadow: 0 22px 40px rgba(16,16,60,0.08); }
.svc-card .svc-card-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff; margin-bottom: 18px; background: var(--acc, #fa4838);
}
.svc-card h5 { margin-bottom: 10px; font-size: 19px; }
.svc-card p { font-size: 14.5px; margin: 0; color: #6c6c82; }

/* related box */
.svc-related { background: #f7f7fb; border-radius: 18px; padding: 34px 36px; margin-top: 20px; }
.svc-related h4 { margin-bottom: 18px; font-size: 20px; }
.svc-related .svc-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.svc-related .svc-chips a {
    display: inline-block; padding: 9px 18px; border-radius: 30px;
    background: #fff; border: 1px solid #ececf3; font-size: 13.5px; color: #43435a;
}
.svc-related .svc-chips a:hover { color: #fff; border-color: transparent; background: var(--acc, #fa4838); }

/* banner variant */
.svc-banner {
    border-radius: 20px; overflow: hidden; position: relative; margin-bottom: 50px;
    min-height: 320px;
}
.svc-banner img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.svc-banner .svc-banner-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(16,16,40,0.78) 0%, rgba(16,16,40,0.25) 100%);
    display: flex; align-items: center; padding: 0 6%;
}
.svc-banner .svc-banner-overlay h2 { color: #fff; max-width: 620px; margin: 0; }
