/*
 * TehranWeb — Services reference section
 * Visual target: supplied full-page reference, section immediately after Hero.
 */

#services.tw-services {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(4.6rem, 7vw, 6.4rem);
    border: 0;
    background:
        radial-gradient(38rem 16rem at -4% 95%, rgba(218, 154, 32, .20), transparent 58%),
        radial-gradient(34rem 16rem at 104% 92%, rgba(0, 188, 224, .18), transparent 58%),
        linear-gradient(180deg, #0a2634 0%, #08212d 54%, #061b26 100%);
    color: #fff;
}

#services.tw-services::before,
#services.tw-services::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    opacity: .82;
}

#services.tw-services::before {
    left: -13rem;
    bottom: -8.5rem;
    width: 34rem;
    height: 22rem;
    border: 2px solid rgba(237, 165, 34, .44);
    border-color: rgba(237, 165, 34, .42) transparent transparent rgba(237, 165, 34, .32);
    border-radius: 48% 52% 50% 50%;
    transform: rotate(12deg);
    box-shadow:
        0 -1px 20px rgba(237, 165, 34, .22),
        0 -1px 50px rgba(237, 165, 34, .11);
}

#services.tw-services::after {
    right: -11rem;
    bottom: -9rem;
    width: 34rem;
    height: 22rem;
    border: 2px solid rgba(0, 190, 225, .4);
    border-color: rgba(0, 190, 225, .4) rgba(0, 190, 225, .26) transparent transparent;
    border-radius: 50%;
    transform: rotate(-17deg);
    box-shadow:
        0 -1px 18px rgba(0, 190, 225, .2),
        0 -1px 48px rgba(0, 190, 225, .09);
}

#services .tw-services__ambient {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(106deg, transparent 0 17%, rgba(255,255,255,.018) 17.2% 17.35%, transparent 17.5% 100%),
        radial-gradient(circle at 50% 0%, rgba(255,255,255,.035), transparent 28rem);
}

#services .tw-services__shell {
    position: relative;
    z-index: 1;
    inline-size: min(calc(100% - 2.2rem), 74rem);
}

#services .tw-services__heading {
    width: min(100%, 48rem);
    margin: 0 auto clamp(2.8rem, 4.5vw, 3.8rem);
    text-align: center;
}

#services .tw-services__eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin: 0 0 .75rem;
    color: #d8a43a;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.4;
}

#services .tw-services__eyebrow::before,
#services .tw-services__eyebrow::after {
    content: "";
    width: 1.55rem;
    height: 1px;
    background: currentColor;
    opacity: .82;
}

#services .tw-services__title {
    margin: 0;
    color: #f8fbfc;
    font-size: clamp(1.85rem, 3.35vw, 3rem);
    font-weight: 900;
    line-height: 1.22;
    letter-spacing: -.025em;
    text-wrap: balance;
}

#services .tw-services__intro {
    max-width: 42rem;
    margin: .8rem auto 0;
    color: rgba(225, 234, 238, .64);
    font-size: clamp(.84rem, 1.35vw, 1rem);
    line-height: 1.9;
    text-wrap: balance;
}

#services .tw-services__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(.9rem, 1.6vw, 1.25rem);
    direction: rtl;
}

#services .tw-service-card {
    position: relative;
    min-height: 14.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.45rem 1.25rem 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(158, 190, 203, .14);
    border-radius: .72rem;
    background:
        linear-gradient(180deg, rgba(18, 48, 61, .84), rgba(8, 34, 46, .88));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.025),
        0 1.2rem 2.8rem rgba(0, 7, 12, .12);
    text-align: center;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

#services .tw-service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,.025), transparent 38%);
}

#services .tw-service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(219, 162, 50, .3);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.035),
        0 1.4rem 3rem rgba(0, 7, 12, .22);
}

#services .tw-service-card__icon {
    position: relative;
    width: 3.55rem;
    height: 3.55rem;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    border: 1px solid rgba(205, 157, 56, .12);
    border-radius: 50%;
    background: rgba(255,255,255,.055);
    box-shadow: inset 0 0 1.35rem rgba(255,255,255,.025);
    color: #e0ad39;
}

#services .tw-service-card__icon svg,
#services .tw-service-card__icon img {
    width: 1.65rem;
    height: 1.65rem;
    object-fit: contain;
}

#services .tw-service-card__icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#services .tw-service-card__title {
    margin: 0;
    color: #f8fafb;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 900;
    line-height: 1.55;
}

#services .tw-service-card__text {
    max-width: 15rem;
    margin: .55rem 0 1rem;
    color: rgba(220, 231, 235, .66);
    font-size: .78rem;
    line-height: 1.85;
}

#services .tw-service-card__link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: auto;
    color: #e2ae3b;
    font-size: .77rem;
    font-weight: 850;
    line-height: 1.3;
    text-decoration: none;
}

#services .tw-service-card:first-child .tw-service-card__link {
    color: #00bfdd;
}

#services .tw-service-card__arrow {
    font-size: .95rem;
    transition: transform .18s ease;
}

#services .tw-service-card__link:hover .tw-service-card__arrow {
    transform: translateX(-.2rem);
}

/* Keep the ACF trust-bar data visible without allowing it to break the reference flow. */
#trust-bar.tw-trust-bar {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: .95rem 0;
    border: 0;
    background: #071f2b;
    color: #fff;
}

#trust-bar .tw-trust-bar__items {
    max-width: 46rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 auto;
}

#trust-bar .tw-trust-bar__item {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: .45rem;
    padding: .25rem .8rem;
    text-align: center;
}

#trust-bar .tw-trust-bar__item + .tw-trust-bar__item {
    border-inline-start: 1px solid rgba(255,255,255,.1);
}

#trust-bar .tw-trust-bar__icon {
    width: 1.15rem;
    height: 1.15rem;
    object-fit: contain;
}

#trust-bar .tw-trust-bar__value {
    color: #e1ae3b;
    font-size: .92rem;
    font-weight: 900;
}

#trust-bar .tw-trust-bar__label {
    color: rgba(229, 238, 241, .72);
    font-size: .72rem;
    font-weight: 700;
}

@media (max-width: 62rem) {
    #services .tw-services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #services .tw-service-card {
        min-height: 13.5rem;
    }
}

@media (max-width: 40rem) {
    #services.tw-services {
        padding-block: 3.75rem 4.2rem;
    }

    #services .tw-services__shell {
        inline-size: min(calc(100% - 1.25rem), 74rem);
    }

    #services .tw-services__heading {
        margin-bottom: 2rem;
    }

    #services .tw-services__eyebrow {
        font-size: .68rem;
    }

    #services .tw-services__title {
        font-size: clamp(1.65rem, 7vw, 2.2rem);
    }

    #services .tw-services__intro {
        font-size: .82rem;
        line-height: 1.8;
    }

    #services .tw-services__grid {
        grid-template-columns: 1fr;
        gap: .8rem;
    }

    #services .tw-service-card {
        min-height: auto;
        align-items: flex-start;
        padding: 1.15rem 1.15rem 1.1rem;
        text-align: start;
    }

    #services .tw-service-card__icon {
        width: 3rem;
        height: 3rem;
        margin-bottom: .75rem;
    }

    #services .tw-service-card__text {
        max-width: none;
        margin-bottom: .7rem;
    }

    #trust-bar.tw-trust-bar {
        padding-block: .7rem;
    }

    #trust-bar .tw-trust-bar__items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #trust-bar .tw-trust-bar__item {
        display: grid;
        gap: .1rem;
        padding-inline: .25rem;
    }

    #trust-bar .tw-trust-bar__value {
        font-size: .78rem;
    }

    #trust-bar .tw-trust-bar__label {
        font-size: .58rem;
        line-height: 1.35;
    }
}
