@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/vazirmatn-arabic-variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/vazirmatn-latin-variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --pd-primary: #139b86;
    --pd-primary-dark: #0c7868;
    --pd-primary-soft: #e8f7f4;
    --pd-ink: #17212b;
    --pd-muted: #637078;
    --pd-surface: #ffffff;
    --pd-soft: #f5f8f8;
    --pd-line: #e4ebea;
    --pd-shadow: 0 20px 55px rgba(28, 65, 60, .10);
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    direction: rtl;
    color: var(--pd-ink);
    background: var(--pd-surface);
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.9;
    overflow-x: hidden;
}

body, button, a { font-family: "Vazirmatn", Tahoma, sans-serif; }
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.hero-copy, .about-copy, .portal-card, .service-card, .check-list, .floating-note, .about-stat { text-align: right; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.section-space { padding: 100px 0; }

@keyframes heroCopyIn {
    from { opacity: 0; transform: translate3d(34px, 20px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes heroVisualIn {
    from { opacity: 0; transform: translate3d(-35px, 25px, 0) scale(.96); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes phoneFloat {
    0%, 100% { transform: translateY(0) rotate(.2deg); }
    50% { transform: translateY(-13px) rotate(-.4deg); }
}

@keyframes noteFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes orbitSpin {
    to { transform: rotate(360deg); }
}

@keyframes glowDrift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(18px, -13px, 0) scale(1.08); }
}

@keyframes iconBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.reveal { opacity: 1; transform: none; }
.js-ready .reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity .72s cubic-bezier(.22, 1, .36, 1), transform .72s cubic-bezier(.22, 1, .36, 1);
}
.js-ready .reveal.reveal-right { transform: translate3d(38px, 18px, 0); }
.js-ready .reveal.reveal-left { transform: translate3d(-38px, 18px, 0); }
.js-ready .reveal.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
.service-grid .reveal:nth-child(2), .portal-grid .reveal:nth-child(2) { transition-delay: .08s; }
.service-grid .reveal:nth-child(3), .portal-grid .reveal:nth-child(3) { transition-delay: .16s; }
.service-grid .reveal:nth-child(4) { transition-delay: .06s; }
.service-grid .reveal:nth-child(5) { transition-delay: .14s; }
.service-grid .reveal:nth-child(6) { transition-delay: .22s; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px);
    transition: box-shadow .25s ease, border-color .25s ease;
}

.site-header.scrolled { border-color: var(--pd-line); box-shadow: 0 8px 30px rgba(28, 65, 60, .07); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--pd-primary); box-shadow: 0 10px 22px rgba(19, 155, 134, .23); }
.brand-mark i { font-size: 18px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.brand-copy strong { font-size: 21px; font-weight: 850; letter-spacing: -.5px; }
.brand-copy small { color: var(--pd-muted); font-size: 10px; margin-top: 4px; }
.main-menu { display: flex; align-items: center; gap: 29px; margin-right: auto; }
.main-menu > a:not(.user-login) { color: #3f4b51; font-size: 14px; transition: color .2s ease; }
.main-menu > a:not(.user-login):hover { color: var(--pd-primary); }
.user-login { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 21px; border-radius: 13px; color: #fff; background: var(--pd-primary); font-size: 14px; font-weight: 700; transition: transform .2s ease, background .2s ease; }
.user-login:hover { color: #fff; background: var(--pd-primary-dark); transform: translateY(-2px); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 11px; border: 0; border-radius: 12px; background: var(--pd-primary-soft); }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; border-radius: 3px; background: var(--pd-primary-dark); transition: transform .2s ease, opacity .2s ease; }

.hero { position: relative; min-height: 700px; display: flex; align-items: center; overflow: hidden; background: linear-gradient(110deg, #f2faf8 0%, #fff 52%, #edf9f6 100%); }
.hero::before { content: ""; position: absolute; width: 500px; height: 500px; top: -230px; right: -190px; border-radius: 50%; background: rgba(19, 155, 134, .08); }
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; bottom: -110px; left: 8%; border-radius: 50%; background: rgba(72, 203, 177, .11); }
.hero-glow { position: absolute; z-index: 0; border-radius: 50%; filter: blur(4px); pointer-events: none; animation: glowDrift 8s ease-in-out infinite; }
.glow-one { width: 110px; height: 110px; top: 17%; left: 8%; background: radial-gradient(circle, rgba(42, 198, 169, .18), transparent 68%); }
.glow-two { width: 170px; height: 170px; right: 34%; bottom: 2%; background: radial-gradient(circle, rgba(91, 145, 219, .12), transparent 68%); animation-delay: -3s; }
.hero-grid { position: relative; z-index: 1; min-height: 700px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 75px; padding-top: 40px; }
.hero-copy { animation: heroCopyIn .85s cubic-bezier(.22, 1, .36, 1) both; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; color: var(--pd-primary-dark); font-size: 13px; font-weight: 700; }
.eyebrow i { font-size: 15px; }
.hero-copy h1 { margin: 0 0 24px; color: var(--pd-ink); font-size: clamp(42px, 5vw, 68px); font-weight: 880; line-height: 1.42; letter-spacing: -2.2px; }
.hero-copy h1 span { color: var(--pd-primary); }
.hero-copy > p { max-width: 650px; margin: 0; color: var(--pd-muted); font-size: 18px; line-height: 2.05; }
.hero-actions { display: flex; align-items: center; gap: 26px; margin-top: 35px; }
.primary-action { min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; padding: 0 28px; border-radius: 15px; color: #fff; background: var(--pd-primary); box-shadow: 0 13px 28px rgba(19, 155, 134, .22); font-weight: 700; transition: transform .2s ease, background .2s ease; }
.primary-action:hover { color: #fff; background: var(--pd-primary-dark); transform: translateY(-3px); }
.text-action { display: inline-flex; align-items: center; gap: 9px; color: var(--pd-ink); font-size: 14px; font-weight: 700; }
.text-action i { color: var(--pd-primary); font-size: 11px; transition: transform .2s ease; }
.text-action:hover i { transform: translateX(-4px); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 32px; color: #526168; font-size: 12px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust i { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; color: var(--pd-primary-dark); background: #dff3ef; font-size: 8px; }
.hero-visual { position: relative; min-height: 570px; display: flex; align-items: flex-end; justify-content: center; isolation: isolate; animation: heroVisualIn .95s .08s cubic-bezier(.22, 1, .36, 1) both; }
.hero-visual::before { content: ""; position: absolute; z-index: -2; width: 430px; height: 430px; bottom: 31px; left: 50%; transform: translateX(-50%); border-radius: 50%; background: linear-gradient(145deg, #20aa94, #087e6e); box-shadow: inset 0 0 0 26px rgba(255,255,255,.08); }
.hero-visual img { position: relative; z-index: 2; width: 278px; max-height: 560px; object-fit: contain; filter: drop-shadow(0 28px 27px rgba(19, 73, 65, .25)); animation: phoneFloat 5s 1s ease-in-out infinite; }
.visual-orbit { position: absolute; z-index: -1; border: 1px solid rgba(19, 155, 134, .20); border-radius: 50%; }
.orbit-one { width: 510px; height: 510px; bottom: -9px; border-top-color: rgba(255,255,255,.48); animation: orbitSpin 24s linear infinite; }
.orbit-two { width: 590px; height: 590px; bottom: -48px; border-style: dashed; opacity: .65; animation: orbitSpin 35s linear infinite reverse; }
.floating-note { position: absolute; z-index: 3; display: flex; align-items: center; gap: 11px; min-width: 190px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.72); border-radius: 17px; background: rgba(255,255,255,.92); box-shadow: var(--pd-shadow); backdrop-filter: blur(8px); }
.floating-note > i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--pd-primary); background: var(--pd-primary-soft); }
.floating-note span { display: flex; flex-direction: column; line-height: 1.5; }
.floating-note strong { font-size: 12px; }
.floating-note small { color: var(--pd-muted); font-size: 10px; }
.note-top { top: 110px; right: -26px; }
.note-bottom { bottom: 68px; left: -30px; }
.note-top { animation: noteFloat 4.8s .4s ease-in-out infinite; }
.note-bottom { animation: noteFloat 5.3s -1.4s ease-in-out infinite; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 50px; margin-bottom: 43px; }
.section-heading h2, .about-copy h2, .final-cta h2 { margin: 0; font-size: clamp(28px, 3.2vw, 42px); font-weight: 850; line-height: 1.62; letter-spacing: -1px; }
.section-heading .eyebrow, .about-copy .eyebrow { margin-bottom: 9px; }
.section-heading > p { max-width: 420px; margin: 0; color: var(--pd-muted); font-size: 14px; }
.section-heading.centered { display: block; text-align: center; }
.section-heading.centered > p { max-width: none; margin-top: 10px; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card { position: relative; min-height: 224px; padding: 29px; overflow: hidden; border: 1px solid var(--pd-line); border-radius: 22px; background: #fff; transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease, border-color .3s ease; }
.service-card::after { content: ""; position: absolute; width: 90px; height: 90px; left: -46px; bottom: -48px; border-radius: 50%; background: currentColor; opacity: .035; transition: transform .35s ease; }
.service-card:hover { transform: translateY(-6px); border-color: transparent; box-shadow: var(--pd-shadow); }
.js-ready .service-card.reveal.is-visible:hover { transform: translateY(-6px); transition-delay: 0s; }
.service-card:hover::after { transform: scale(1.65); }
.service-card:hover .service-icon { transform: translateY(-3px) rotate(-3deg); }
.service-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 16px; font-size: 20px; transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.service-card h3 { margin: 0 0 9px; font-size: 17px; font-weight: 800; }
.service-card p { margin: 0; color: var(--pd-muted); font-size: 13px; line-height: 1.95; }
.service-card.mint .service-icon { color: #078976; background: #e0f7f2; }
.service-card.blue .service-icon { color: #3178c6; background: #e8f2fc; }
.service-card.violet .service-icon { color: #7656c9; background: #f0ebfc; }
.service-card.amber .service-icon { color: #cf8611; background: #fff3d9; }
.service-card.rose .service-icon { color: #cc5270; background: #fae9ee; }
.service-card.cyan .service-icon { color: #0b8fa7; background: #e1f5f8; }

.about { background: var(--pd-soft); }
.about-grid { display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: 92px; }
.about-panel { position: relative; min-height: 400px; display: flex; flex-direction: column; justify-content: center; padding: 45px; overflow: hidden; border-radius: 30px; color: #fff; background: linear-gradient(145deg, #0b7669, #16a78f); box-shadow: var(--pd-shadow); }
.about-panel::after { content: ""; position: absolute; width: 260px; height: 260px; left: -100px; bottom: -130px; border: 35px solid rgba(255,255,255,.08); border-radius: 50%; }
.about-panel::before { content: ""; position: absolute; width: 170px; height: 170px; right: -85px; top: -85px; border-radius: 50%; background: rgba(255,255,255,.07); }
.about-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; background: rgba(255,255,255,.13); font-size: 11px; }
.connection-row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 17px; margin: 48px 0 38px; }
.connection-row div { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.connection-row div span { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 21px; color: var(--pd-primary-dark); background: #fff; font-size: 24px; box-shadow: 0 12px 28px rgba(0,0,0,.12); animation: iconBreathe 4s ease-in-out infinite; }
.connection-row div:nth-of-type(2) span { animation-delay: -.9s; }
.connection-row div:nth-of-type(3) span { animation-delay: -1.8s; }
.connection-row strong { font-size: 12px; }
.connector { color: rgba(255,255,255,.5); font-size: 12px; }
.about-stat { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; padding: 16px; border-radius: 17px; background: rgba(255,255,255,.12); }
.about-stat > i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #ffd474; background: rgba(255,255,255,.12); }
.about-stat span { display: flex; flex-direction: column; line-height: 1.55; }
.about-stat strong { font-size: 13px; }
.about-stat small { color: rgba(255,255,255,.74); font-size: 10px; }
.about-copy > p { margin: 22px 0 28px; color: var(--pd-muted); font-size: 15px; line-height: 2.1; }
.check-list { display: grid; gap: 17px; margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: flex-start; gap: 13px; color: var(--pd-muted); font-size: 13px; }
.check-list li > i { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; margin-top: 3px; border-radius: 8px; color: var(--pd-primary-dark); background: var(--pd-primary-soft); font-size: 9px; }
.check-list strong { display: block; color: var(--pd-ink); font-size: 14px; }

.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.portal-card { position: relative; min-height: 300px; display: flex; flex-direction: column; align-items: flex-start; padding: 31px; overflow: hidden; border: 1px solid var(--pd-line); border-radius: 25px; background: #fff; transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease, border-color .3s ease; }
.portal-card::after { content: ""; position: absolute; width: 150px; height: 150px; left: -72px; top: -70px; border-radius: 50%; opacity: .55; transition: transform .25s ease; }
.portal-card:hover { transform: translateY(-7px); border-color: transparent; box-shadow: var(--pd-shadow); }
.js-ready .portal-card.reveal.is-visible:hover { transform: translateY(-7px); transition-delay: 0s; }
.portal-card:hover::after { transform: scale(1.12); }
.portal-card:hover .portal-icon { transform: translateY(-4px) rotate(-3deg); }
.portal-icon { position: relative; z-index: 1; width: 63px; height: 63px; display: grid; place-items: center; margin-bottom: 26px; border-radius: 19px; font-size: 23px; transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.portal-content { display: flex; flex-direction: column; }
.portal-content strong { margin-bottom: 9px; font-size: 22px; font-weight: 900; }
.portal-content small { color: var(--pd-muted); font-size: 12px; line-height: 1.9; }
.portal-link { display: inline-flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 25px; font-size: 13px; font-weight: 800; }
.portal-link i { font-size: 11px; transition: transform .2s ease; }
.portal-card:hover .portal-link i { transform: translateX(-4px); }
.portal-card.pharmacy .portal-icon { color: #087d6e; background: #dff6f1; }
.portal-card.pharmacy::after { background: #dff6f1; }
.portal-card.pharmacy .portal-link { color: #087d6e; }
.portal-card.officer .portal-icon { color: #3a72af; background: #e5f0fb; }
.portal-card.officer::after { background: #e5f0fb; }
.portal-card.officer .portal-link { color: #3a72af; }
.portal-card.doctor .portal-icon { color: #7351b1; background: #eee9f8; }
.portal-card.doctor::after { background: #eee9f8; }
.portal-card.doctor .portal-link { color: #7351b1; }

.final-cta { padding: 0 0 100px; }
.final-cta-inner { position: relative; min-height: 260px; display: flex; align-items: center; justify-content: space-between; gap: 45px; padding: 50px 60px; overflow: hidden; border-radius: 31px; color: #fff; background: linear-gradient(125deg, #087567, #16aa91); box-shadow: var(--pd-shadow); }
.final-cta-inner::after { content: ""; position: absolute; width: 260px; height: 260px; left: 12%; bottom: -190px; border: 42px solid rgba(255,255,255,.06); border-radius: 50%; }
.final-cta-inner > * { position: relative; z-index: 1; }
.eyebrow.light { margin-bottom: 8px; color: rgba(255,255,255,.72); }
.final-cta h2 { color: #fff; }
.final-cta p { margin: 8px 0 0; color: rgba(255,255,255,.76); font-size: 13px; }
.final-cta a { flex: 0 0 auto; min-height: 56px; display: inline-flex; align-items: center; gap: 13px; padding: 0 25px; border-radius: 15px; color: var(--pd-primary-dark); background: #fff; font-size: 14px; font-weight: 800; transition: transform .2s ease; }
.final-cta a:hover { transform: translateY(-3px); }

.site-footer { padding: 47px 0; border-top: 1px solid var(--pd-line); background: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.footer-brand .brand-mark { width: 40px; height: 40px; border-radius: 13px; }
.footer-brand .brand-copy strong { font-size: 18px; }
.footer-links { display: flex; align-items: center; gap: 26px; color: var(--pd-muted); font-size: 12px; }
.footer-links a:hover { color: var(--pd-primary); }
.footer-inner > p { margin: 0; color: #8a959a; font-size: 11px; }

/* Keep the existing information pages readable under the new shell. */
main > br:first-child + br + .fun-facts { padding-top: 100px; }
.fun-facts { background: #fff; }

@media (max-width: 991px) {
    .section-space { padding: 78px 0; }
    .menu-toggle { display: block; margin-right: auto; cursor: pointer; }
    .menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .main-menu { position: absolute; top: 78px; right: 20px; left: 20px; display: none; align-items: stretch; gap: 4px; padding: 14px; border: 1px solid var(--pd-line); border-radius: 18px; background: #fff; box-shadow: var(--pd-shadow); }
    .main-menu.open { display: flex; flex-direction: column; }
    .main-menu > a { padding: 10px 12px; }
    .main-menu .user-login { margin-top: 5px; justify-content: center; }
    .hero, .hero-grid { min-height: auto; }
    .hero-grid { grid-template-columns: 1fr 420px; gap: 20px; padding: 80px 0 55px; }
    .hero-visual { min-height: 510px; transform: scale(.9); animation: none; }
    .note-top { right: -15px; }
    .note-bottom { left: -10px; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { gap: 45px; }
    .portal-card { min-height: 280px; padding: 25px; }
    .footer-inner { flex-wrap: wrap; }
}

@media (max-width: 767px) {
    .shell { width: min(100% - 28px, 620px); }
    .section-space { padding: 66px 0; }
    .header-inner { min-height: 70px; }
    .brand-mark { width: 40px; height: 40px; border-radius: 13px; }
    .brand-copy strong { font-size: 18px; }
    .brand-copy small { font-size: 9px; }
    .main-menu { top: 70px; right: 14px; left: 14px; }
    .hero-grid { grid-template-columns: 1fr; gap: 12px; padding: 55px 0 30px; text-align: center; }
    .hero-copy { text-align: center; }
    .hero-copy h1 { font-size: clamp(36px, 11vw, 51px); letter-spacing: -1.5px; }
    .hero-copy > p { font-size: 15px; }
    .hero-actions, .hero-trust { justify-content: center; }
    .hero-visual { min-height: 500px; margin-top: -10px; transform: scale(.82); }
    .section-heading { display: block; margin-bottom: 32px; text-align: center; }
    .section-heading > p { margin: 10px auto 0; }
    .service-grid, .portal-grid, .about-grid { grid-template-columns: 1fr; }
    .service-card { min-height: auto; }
    .about-grid { gap: 38px; }
    .about-copy { text-align: center; }
    .check-list { text-align: right; }
    .portal-card { min-height: 255px; }
    .final-cta { padding-bottom: 65px; }
    .final-cta-inner { display: block; padding: 39px 27px; text-align: center; }
    .final-cta a { margin-top: 25px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px 22px; }
}

@media (max-width: 430px) {
    .hero-actions { flex-direction: column; gap: 16px; }
    .primary-action { width: 100%; }
    .hero-trust { gap: 10px 15px; }
    .hero-visual { min-height: 440px; margin: -35px -35px 0; transform: scale(.7); }
    .about-panel { min-height: 360px; padding: 30px 20px; }
    .connection-row { gap: 10px; }
    .connection-row div span { width: 61px; height: 61px; border-radius: 18px; font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    .js-ready .reveal { opacity: 1; transform: none; }
}
