
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green: #23866a;
    --green-dark: #17634f;
    --green-light: #dff2e4;
    --mint: #f4fbf5;
    --teal: #50aaa5;
    --gold: #bd9952;
    --text: #1b4435;
    --muted: #71877b;
    --background-shift-x: 0px;
    --background-shift-y: 0px;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    position: relative;
    isolation: isolate;
    overflow-x: hidden;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 32px 20px;

    font-family: "Vazirmatn", Tahoma, sans-serif;
    color: var(--text);

    background:
        radial-gradient(
            ellipse 78% 72% at calc(50% + var(--background-shift-x)) calc(8% + var(--background-shift-y)),
            rgba(183, 229, 192, .82),
            transparent 72%
        ),
        radial-gradient(
            ellipse 65% 70% at calc(90% - var(--background-shift-x)) calc(100% - var(--background-shift-y)),
            rgba(139, 212, 197, .34),
            transparent 75%
        ),
        linear-gradient(
            145deg,
            #f8fcf6,
            #e7f5e9 55%,
            #d9eee2
        );
}

/* بافت پس‌زمینه */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;

    background-image:
        radial-gradient(
            circle,
            rgba(35, 134, 106, .16) 1px,
            transparent 1.5px
        );

    background-size: 25px 25px;
    opacity: .35;
    transform: translate(
        calc(var(--background-shift-x) * -.35),
        calc(var(--background-shift-y) * -.35)
    );
    transition: transform .12s ease-out;

    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 85%
    );
}

/* نورهای شناور */
.ambient {
    position: fixed;
    z-index: -1;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    filter: blur(95px);
    opacity: .4;
    pointer-events: none;

    animation: float 10s ease-in-out infinite alternate;
}

.ambient-one {
    background: #a8dfb0;
    top: -180px;
    right: -120px;
}

.ambient-two {
    background: #8bd4c5;
    bottom: -190px;
    left: -120px;
    animation-delay: -4s;
}

/* نور پس‌زمینه که مسیر حرکت ماوس یا لمس را دنبال می‌کند */
.pointer-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(
        circle 250px at var(--pointer-x, 50%) var(--pointer-y, 50%),
        rgba(116, 205, 151, .28),
        rgba(119, 207, 190, .12) 42%,
        transparent 74%
    );
    opacity: .95;
    transition: opacity .25s ease;
}

@media (max-width: 480px) {
    .pointer-glow {
        background: radial-gradient(
            circle 190px at var(--pointer-x, 50%) var(--pointer-y, 50%),
            rgba(116, 205, 151, .3),
            rgba(119, 207, 190, .13) 45%,
            transparent 76%
        );
    }
}

/* صفحه اصلی */
.page {
    width: 100%;
    max-width: 950px;
    position: relative;
    z-index: 1;
    padding: 22px 0;
    text-align: center;
}

/* لوگوی صندوق */
.logo-wrap {
    width: 158px;
    height: 158px;
    margin: 0 auto 19px;
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(35, 134, 106, .3);
    border-radius: 34px;
    transform: rotate(45deg);
    transition: transform .5s ease;
}

.logo {
    position: relative;
    z-index: 1;

    width: 130px;
    height: 130px;
    object-fit: contain;
    border-radius: 26px;

    transition: transform .4s ease;
}

.logo-wrap:hover .logo-ring {
    transform: rotate(90deg);
}

.logo-wrap:hover .logo {
    transform: scale(1.06);
}


/* عنوان نستعلیق */
h1 {
    font-family: "Noto Nastaliq Urdu", serif;
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 500;
    line-height: 2.35;
    padding-bottom: 8px;
    margin-bottom: 16px;

    background: linear-gradient(
        100deg,
        #17634f,
        #299c76,
        #9b7a3b,
        #17634f
    );

    background-size: 250% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;

    animation: title-shine 8s linear infinite;
}

/* تزئین عنوان */
.ornament {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 6px auto 20px;
}

.ornament span {
    width: 58px;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--gold)
    );
}

.ornament span:last-child {
    transform: rotate(180deg);
}

.ornament i {
    color: var(--gold);
    font-size: 13px;
}

/* آیه */
.verse {
    max-width: 690px;
    margin: 0 auto 34px;
    padding: 8px 0;
    position: relative;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: enter .8s .1s both;
}

.verse::before {
    display: none;
}

.quote-icon {
    color: var(--gold);
    font-size: 15px;
    margin-bottom: 8px;
    opacity: .8;
}

.arabic {
    color: var(--green-dark);
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: clamp(15px, 2vw, 19px);
    font-weight: 600;
    line-height: 2.2;
    margin-bottom: 7px;
}

.translation {
    color: var(--muted);
    font-size: 12px;
    line-height: 2;
}

.verse-reference {
    display: inline-block;
    color: #99763a;
    font-size: 11px;
    margin-top: 8px;
}

/* کارت‌های خدمات */
.services {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.service-card {
    min-width: 0;
    min-height: 250px;
    padding: 26px 22px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;

    position: relative;
    overflow: hidden;

    color: var(--text);
    text-decoration: none;
    text-align: center;

    background: rgba(255, 255, 255, .77);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 25px;

    box-shadow:
        0 16px 40px rgba(35, 110, 79, .09),
        inset 0 1px 0 #fff;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    transition:
        transform .4s ease,
        box-shadow .4s ease,
        border-color .4s ease,
        background .4s ease;

    animation: enter .8s both;
}

.internet-bank {
    animation-delay: .2s;
}

.counter {
    animation-delay: .35s;
}

/* نور متحرک روی کارت */
.service-card::before {
    content: "";
    position: absolute;
    top: -80%;
    left: -80%;
    width: 60%;
    height: 240%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, .65),
        transparent
    );

    transform: rotate(25deg);
    transition: left .7s ease;
    pointer-events: none;
}

.service-card:hover::before {
    left: 140%;
}

.service-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, .96);
    border-color: rgba(35, 134, 106, .35);

    box-shadow:
        0 24px 50px rgba(35, 110, 79, .15),
        0 0 0 1px rgba(35, 134, 106, .04);
}

.card-number {
    display: none;
}

/* آیکون خدمات */
.icon-box {
    width: 78px;
    height: 78px;
    margin-bottom: 17px;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(35, 134, 106, .16);
    border-radius: 25px;

    background: linear-gradient(
        145deg,
        #f0faf0,
        #d9f0df
    );

    transition:
        transform .4s ease,
        box-shadow .4s ease;
}

.icon-box > i {
    color: var(--green);
    font-size: 31px;

    transition: transform .4s ease;
}

.service-card:hover .icon-box {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 22px rgba(35, 134, 106, .12);
}

.service-card:hover .icon-box > i {
    transform: scale(1.12);
}

/* نشان کوچک روی آیکون */
.icon-badge {
    position: absolute;
    left: -6px;
    bottom: -5px;

    width: 25px;
    height: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;
    background: var(--green);
    border: 3px solid white;
    border-radius: 50%;

    font-size: 9px;
}

.service-card h2 {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.9;
    margin-bottom: 5px;
}

.service-card > p {
    color: var(--muted);
    font-size: 14px;
    line-height: 2;
}

/* نوار اقدام پایین کارت */
.card-action {
    width: 100%;
    margin-top: auto;
    padding-top: 15px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;

    border-top: 1px solid rgba(35, 134, 106, .12);

    color: var(--green-dark);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.8;
}

.arrow {
    width: 29px;
    height: 29px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--green-dark);
    background: #e7f5e9;
    border-radius: 50%;

    transition:
        transform .3s ease,
        background .3s ease,
        color .3s ease;
}

.service-card:hover .arrow {
    transform: translateX(-4px);
    background: var(--green);
    color: white;
}

.service-card:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 5px;
}

/* پابرگ */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;

    margin-top: 32px;
    color: var(--muted);
    font-size: 11px;
    line-height: 2;
}

.footer-line {
    width: 28px;
    height: 1px;
    background: rgba(35, 134, 106, .3);
}

/* انیمیشن ورود */
@keyframes enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(-25px, 25px);
    }
}

@keyframes title-shine {
    to {
        background-position: 250% center;
    }
}

/* تبلت */
@media (max-width: 768px) {
    body {
        padding: 24px;
    }

    .page {
        max-width: 620px;
    }

    .verse {
        margin-bottom: 28px;
    }

    .services {
        gap: 16px;
    }

    .service-card {
        padding: 25px 16px 18px;
    }
}

/* موبایل */
@media (max-width: 480px) {
    body {
        padding:
            max(18px, env(safe-area-inset-top))
            15px
            max(18px, env(safe-area-inset-bottom));
    }

    .page {
        padding: 14px 0;
    }

    .logo-wrap {
        width: 112px;
        height: 112px;
        margin-bottom: 15px;
    }

    .logo {
        width: 90px;
        height: 90px;
        border-radius: 21px;
    }

    .logo-ring {
        border-radius: 30px;
    }

    h1 {
        font-size: clamp(22px, 6vw, 29px);
        line-height: 2.4;
        padding-bottom: 9px;
        margin-bottom: 12px;
    }

    .ornament {
        margin: 3px auto 20px;
    }

    .verse {
        padding: 8px 0;
        margin-bottom: 24px;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .arabic {
        font-size: 14px;
        line-height: 2.3;
    }

    .translation {
        font-size: 11px;
    }

    .verse-reference {
        font-size: 10px;
    }

    .services {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        max-width: 420px;
    }

    .service-card {
        min-height: 220px;
        padding: 24px 18px 16px;
        border-radius: 20px;
    }

    .icon-box {
        width: 60px;
        height: 60px;
        border-radius: 19px;
        margin-bottom: 14px;
    }

    .icon-box > i {
        font-size: 24px;
    }

    .icon-badge {
        width: 23px;
        height: 23px;
        font-size: 8px;
    }

    .service-card h2 {
        font-size: 16px;
    }

    .service-card > p {
        font-size: 12px;
        line-height: 1.9;
    }

    .card-action {
        padding-top: 12px;
        font-size: 11px;
        gap: 8px;
    }

    .arrow {
        width: 26px;
        height: 26px;
    }

    .footer {
        margin-top: 25px;
        font-size: 10px;
    }
}

/* موبایل‌های بسیار کوچک */
@media (max-width: 350px) {
    body {
        padding-left: 9px;
        padding-right: 9px;
    }

    .services {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .service-card {
        padding-left: 8px;
        padding-right: 8px;
    }

    .service-card h2 {
        font-size: 15px;
    }

    .service-card > p {
        font-size: 11px;
    }

    .card-action {
        font-size: 10px;
    }

    .arabic {
        font-size: 13px;
    }
}

/* کاهش انیمیشن برای دسترس‌پذیری */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
