/* UI/UX services page — hero, portfolio, lightbox */

/* Desktop: tight gap under header on service pages */
body.ma-neo.ma-course .ma-services-crumb,
body.ma-neo .ma-services-crumb {
    margin-top: 0 !important;
    margin-bottom: 0;
}

@media (min-width: 992px) {
    body.ma-neo.page-template-uiux-design-php .nav-fostrap,
    body.ma-neo.page-template-app-uiux-design-php .nav-fostrap {
        margin-bottom: 0;
    }

    body.ma-neo .ma-services-crumb #breadcrumbs {
        margin-bottom: 6px !important;
    }
}

body.ma-neo .ma-sig-hero__visual--app {
    max-width: 440px;
}

body.ma-neo .ma-sig-hero__visual--web {
    max-width: 480px;
}

body.ma-neo .ma-services-crumb #breadcrumbs {
    margin-bottom: 8px !important;
}

body.ma-neo .ma-services-hero {
    align-items: center;
    margin-top: 4px;
    margin-bottom: 8px;
}

body.ma-neo .ma-services-hero__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

body.ma-neo .ma-services-hero__copy h1 {
    margin: 0;
    line-height: 1.45;
}

body.ma-neo .ma-services-hero__lead {
    margin: 0;
    max-width: 36rem;
    font-size: 15px;
    line-height: 1.9;
    color: var(--ma-muted);
    text-align: justify;
}

body.ma-neo .ma-services-hero__cta {
    margin: 4px 0 0;
}

body.ma-neo .ma-services-hero__cta .bg-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-height: 48px;
    margin: 0 !important;
    padding: 12px 20px;
}

body.ma-neo .ma-services-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

body.ma-neo .ma-services-visual .ma-sig-hero__visual {
    max-width: 460px;
    width: 100%;
    aspect-ratio: 720 / 560;
}

@media (max-width: 991.98px) {
    body.ma-neo .ma-services-hero {
        gap: 8px;
    }

    body.ma-neo .ma-services-hero__copy {
        order: 1;
        gap: 12px;
    }

    body.ma-neo .ma-services-visual {
        order: 0;
        margin-bottom: 4px;
    }

    body.ma-neo .ma-services-visual .ma-sig-hero__visual {
        max-width: 320px;
        aspect-ratio: 720 / 520;
    }

    body.ma-neo .ma-services-hero__lead {
        font-size: 14px;
        line-height: 1.85;
    }
}

/* Featured portfolio carousel — desktop + mobile */
body.ma-neo .ma-porfo-carousel {
    display: block;
    margin: 12px 0 24px;
}

body.ma-neo .ma-porfo-carousel__nav {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

body.ma-neo .ma-porfo-carousel__btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--ma-bg);
    color: var(--ma-ink);
    box-shadow: var(--ma-raise-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

body.ma-neo .ma-porfo-carousel__rail {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    /* Soft edge hint that more content exists */
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%);
}

body.ma-neo .ma-porfo-carousel__rail::-webkit-scrollbar {
    display: none;
}

/* Desktop: ~2 full cards + peek of the 3rd */
body.ma-neo .ma-porfo-carousel__item {
    flex: 0 0 calc((100% - 14px) / 2.18);
    min-width: 0;
    scroll-snap-align: start;
}

body.ma-neo .ma-porfo-carousel__item .ma-portfolio-thumb img {
    width: 100%;
    height: clamp(260px, 32vw, 380px);
    object-fit: cover;
    object-position: top center;
}

/* Mobile: first card intentionally incomplete so horizontal scroll is obvious */
@media (max-width: 991.98px) {
    body.ma-neo .ma-porfo-carousel__nav {
        display: none;
    }

    body.ma-neo .ma-porfo-carousel__rail {
        gap: 10px;
        padding-inline-end: 18%;
        mask-image: linear-gradient(90deg, transparent 0, #000 8px, #000 calc(100% - 40px), transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8px, #000 calc(100% - 40px), transparent 100%);
    }

    body.ma-neo .ma-porfo-carousel__item {
        flex: 0 0 176%;
    }

    body.ma-neo .ma-porfo-carousel__item .ma-portfolio-thumb img {
        height: min(62vh, 460px);
    }
}

/* Portfolio thumbs */
body.ma-neo .ma-portfolio-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 12px;
    background: var(--ma-bg);
    box-shadow: var(--ma-raise-sm);
    cursor: zoom-in;
    text-align: start;
}

body.ma-neo .ma-portfolio-thumb img {
    display: block;
    width: 100%;
    border-radius: 8px;
}

body.ma-neo .ma-portfolio-thumb__zoom {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 129, 129, 0.88);
    opacity: 0.92;
    pointer-events: none;
}

body.ma-neo .ma-portfolio-thumb:hover {
    box-shadow: var(--ma-raise);
}

/* Lightbox */
body.ma-lightbox-open {
    overflow: hidden;
}

body.ma-neo .ma-lightbox[hidden] {
    display: none !important;
}

body.ma-neo .ma-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
}

body.ma-neo .ma-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 12, 0.82);
}

body.ma-neo .ma-lightbox__panel {
    position: relative;
    z-index: 1;
    width: min(960px, calc(100vw - 24px));
    height: min(86vh, 820px);
    border-radius: 18px;
    background: #1c2128;
    box-shadow: var(--ma-raise-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.ma-neo .ma-lightbox__close {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--ma-bg);
    color: var(--ma-ink);
    box-shadow: var(--ma-raise-sm);
    cursor: pointer;
}

body.ma-neo .ma-lightbox__stage {
    flex: 1 1 auto;
    overflow: hidden;
    display: grid;
    place-items: center;
    cursor: grab;
    touch-action: none;
}

body.ma-neo .ma-lightbox__stage.is-zoomed {
    cursor: grabbing;
}

body.ma-neo .ma-lightbox__stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 80ms linear;
    user-select: none;
    -webkit-user-drag: none;
}

body.ma-neo .ma-lightbox__tools {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(28, 33, 40, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.ma-neo .ma-lightbox__tool {
    min-width: 48px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--ma-bg);
    color: var(--ma-ink);
    box-shadow: var(--ma-raise-sm);
    cursor: pointer;
    font-family: 'pmed', sans-serif;
}

body.ma-neo .ma-services-more {
    margin-top: 8px;
}

body.ma-neo .ma-services-more__summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--ma-accent);
    font-family: 'pmed', sans-serif;
    list-style: none;
}

body.ma-neo .ma-services-more__summary::-webkit-details-marker {
    display: none;
}

body.ma-neo .ma-services-more__summary svg {
    transition: transform 180ms ease;
}

body.ma-neo .ma-services-more[open] .ma-services-more__summary svg {
    transform: rotate(180deg);
}

body.ma-neo .ma-services-more__body {
    margin-top: 14px;
}

body.ma-neo .ma-services-more__body p {
    margin: 0 0 14px;
    color: var(--ma-muted);
}
