*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
:root {
    --ink:      #0C2B3A;
    --ink-soft: #2C4B5B;
    --sea:      #1E8A7C;
    --sea-deep: #126358;
    --paper:    #F4F8F7;
    --paper-2:  #FFFFFF;
    --line:     rgba(12,43,58,0.10);
    --muted:    #6A8590;
    --coral:    #E8694A;
    --mint:     #5BE0A8;
}
html { scroll-behavior:smooth; }
body {
    font-family: 'Vazirmatn', sans-serif;
    color: var(--ink);
    background: var(--paper-2);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color:inherit; }
button { font-family:inherit; }
::selection { background:var(--sea); color:#fff; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2.5px solid var(--sea);
    outline-offset: 3px;
    border-radius: 4px;
}

nav {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 64px;
    background: rgba(255,255,255,0.86);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .3s ease, padding .3s ease;
}
nav.scrolled { box-shadow: 0 8px 30px -16px rgba(12,43,58,0.25); padding-top:14px; padding-bottom:14px; }
.nav-item-dropdown { position: relative; }
.nav-dropdown-trigger {
    display: flex; align-items: center; gap: 5px;
    color: var(--ink-soft); text-decoration: none;
    font-size: 14.5px; font-weight: 500;
    padding-bottom: 4px;
}
.dropdown-arrow { transition: transform .25s ease; }
.nav-item-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }
.nav-item-dropdown:hover .nav-dropdown-trigger { color: var(--ink); }

.nav-submenu {
    position: absolute; top: calc(100% + 14px); right: -10px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 20px 40px -16px rgba(12,43,58,0.25);
    list-style: none; min-width: 230px; padding: 8px;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    z-index: 50;
}
.nav-item-dropdown:hover .nav-submenu,
.nav-item-dropdown:focus-within .nav-submenu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-submenu li a {
    display: block; padding: 11px 14px; border-radius: 9px;
    font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
    text-decoration: none; transition: background .2s, color .2s;
}
.nav-submenu li a:hover { background: var(--paper); color: var(--ink); }
.nav-submenu li a::after { display: none; }
.mobile-dropdown-trigger {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    background: none; border: none; cursor: pointer;
    text-align: right; color: var(--ink); font-family: inherit;
    font-size: 15.5px; font-weight: 600;
    padding: 13px 6px; border-bottom: 1px solid var(--line);
}
.mobile-dropdown.open .mobile-dropdown-trigger .dropdown-arrow { transform: rotate(180deg); }
.mobile-submenu {
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
    display: flex; flex-direction: column;
}
.mobile-dropdown.open .mobile-submenu { max-height: 200px; }
.mobile-submenu a {
    padding: 12px 18px; font-size: 14px; font-weight: 500;
    color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line);
}
.nav-logo {
    display: flex; align-items: center; gap: 11px;
    font-weight: 800; font-size: 18px; letter-spacing:.01em; text-decoration: none;
}
.nav-logo svg { flex-shrink: 0; }
.nav-logo svg path { transition: stroke .3s ease; }
.nav-logo:hover svg path { stroke: #1E8A7C; }

.nav-links { display: flex; gap: 38px; list-style: none; }
.nav-links a {
    color: var(--ink-soft); text-decoration: none;
    font-size: 14.5px; font-weight: 500;
    position: relative; padding-bottom: 4px;
}
.nav-links a::after {
    content: ''; position: absolute; right:0; bottom:0;
    width: 0; height: 1.5px; background: var(--sea); transition: width .25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--ink); }

.nav-cta {
    background: var(--ink); color: #fff; border: none; border-radius: 40px;
    padding: 12px 26px; font-family: inherit; font-size: 13.5px; font-weight: 700;
    cursor: pointer; transition: background .2s, transform .2s;
    display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.nav-cta:hover { background: var(--sea); transform: translateY(-1px); }
.nav-cta svg { transition: transform .3s ease; }
.nav-cta:hover svg { transform: translateX(-3px) translateY(3px) rotate(-2deg); }

.nav-toggle {
    display: none; background: none; border: 1.5px solid var(--line);
    border-radius: 10px; width: 42px; height: 42px;
    align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: ''; display: block; width: 18px; height: 1.6px;
    background: var(--ink); position: relative;
    transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top:  6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span::after  { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile-panel {
    display: none; position: fixed; top: 74px; right: 0; left: 0; z-index: 99;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -20px rgba(12,43,58,0.25);
    padding: 20px 24px 26px; flex-direction: column; gap: 4px;
}
.nav-mobile-panel.open { display: flex; }
.nav-mobile-panel a {
    text-decoration: none; color: var(--ink);
    font-size: 15.5px; font-weight: 600;
    padding: 13px 6px; border-bottom: 1px solid var(--line);
}
.nav-mobile-panel a:last-of-type { border-bottom: none; }
footer { background: #08222F; padding: 60px 64px 30px; }

.footer-top--with-map {
    display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px;
    padding-bottom: 46px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-main-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }

.footer-logo-name { font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 13px; display: flex; align-items: center; gap: 9px; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.4); line-height: 1.85; font-weight: 400; max-width: 250px; }

.footer-col h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 20px; letter-spacing: .04em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul li a { color: rgba(255,255,255,0.4); font-size: 13px; text-decoration: none; transition: color .2s; font-weight: 400; }
.footer-col ul li a:hover { color: #5BE0A8; }
.footer-col ul li { color: rgba(255,255,255,0.4); font-size: 13px; font-weight: 400; display: flex; align-items: flex-start; gap: 8px; }

.footer-map h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 18px; letter-spacing: .04em; }
.footer-map-card { border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.12); }
.footer-map-card iframe { display: block; width: 100%; height: 220px; border: 0; filter: grayscale(.15) contrast(1.05); }

.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 26px; font-size: 12px; color: rgba(255,255,255,0.25); flex-wrap: wrap; gap: 10px;
}

.fab-stack {
    position: fixed; right: 22px; bottom: 22px; z-index: 200;
    display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 12px;
    width: 220px; /* عرض ثابت تا با هاور هر آیتم، بقیه‌ی آیتم‌ها جابه‌جا نشن */
    pointer-events: none; /* فضای خالی سمت راست کلیک‌پذیر نباشه */
}
.fab-item { pointer-events: auto; }
.fab-item {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--line); border-radius: 40px; padding: 10px;
    box-shadow: 0 14px 34px -12px rgba(12,43,58,0.3);

    text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 700;
    max-width: 46px; overflow: hidden; white-space: nowrap;
    transition: max-width .35s cubic-bezier(.16,.8,.3,1), background .2s, color .2s;
}
.fab-item:hover,
.fab-item:focus-visible { max-width: 220px; }

.fab-icon { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; color: #fff; }
.fab-eita   .fab-icon { background: #1E8A7C; }
.fab-rubika .fab-icon { background: #2C6FE8; }
.fab-call   .fab-icon { background: rgba(255,255,255,0.18); }
.fab-call { background: var(--ink); color: #fff; border-color: var(--ink); }

.section-label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sea); margin-bottom: 16px; }
.section-title { font-size: clamp(28px,3vw,42px); font-weight: 800; color: var(--ink); max-width: 540px; line-height: 1.25; letter-spacing: -0.01em; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.reveal { opacity:0; transform:translateY(28px); transition: opacity .8s cubic-bezier(.16,.8,.3,1), transform .8s cubic-bezier(.16,.8,.3,1); }
.reveal.in { opacity:1; transform:translateY(0); }
.reveal-stagger.in .stagger-child { opacity:1; transform:translateY(0); }
.stagger-child { opacity:0; transform:translateY(24px); transition: opacity .7s cubic-bezier(.16,.8,.3,1), transform .7s cubic-bezier(.16,.8,.3,1); }
.stagger-child:nth-child(1) { transition-delay:.02s; }
.stagger-child:nth-child(2) { transition-delay:.10s; }
.stagger-child:nth-child(3) { transition-delay:.18s; }
.stagger-child:nth-child(4) { transition-delay:.26s; }
.stagger-child:nth-child(5) { transition-delay:.34s; }
.stagger-child:nth-child(6) { transition-delay:.42s; }

@media (max-width:1024px) {
    nav { padding: 16px 24px; }
    .nav-links  { display: none; }
    .nav-toggle { display: flex; }
    footer { padding: 44px 24px 24px; }
    .footer-top--with-map { grid-template-columns: 1fr; gap: 36px; }
    .footer-main-cols { grid-template-columns: 1fr 1fr; }
    .fab-stack { right: 14px;
        left: auto;
        bottom: 14px;}
}
@media (max-width:640px) {
    .footer-main-cols { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .footer-map-card iframe { height: 200px; }
}
.lang-toggle-btn {
    background: transparent;
    border: 1.5px solid var(--line);
    border-radius: 40px;
    padding: 7px 15px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    transition: .2s;
    margin-inline-end: 10px;
}
.lang-toggle-btn:hover { background: var(--paper); border-color: var(--ink); transform: translateY(-1px); }
html[data-theme="dark"] .lang-toggle-btn { color: #fff; border-color: var(--line); }
html[data-theme="dark"] .lang-toggle-btn:hover { background: #1c2541; }

.mobile-lang-toggle {
    align-self: flex-start;
    margin: 14px 6px 4px;
}
.nav-submenu { inset-inline-start: -10px; right: auto; }
.theme-toggle-btn { margin-inline-end: 14px; margin-left: 0; }
.skip-link { inset-inline-start: 16px; right: auto; }
.fab-stack { inset-inline-start: 22px; right: auto; }
@media (max-width:1024px) {
    .fab-stack { inset-inline-start: 14px; right: auto; left: auto; }
}
@media (max-width: 640px) {
    .page-container {
        padding-inline: 18px !important;
        box-sizing: border-box;
    }
    .article-h1 { font-size: 26px; }
    .article-body { font-size: 15.5px; }
}
@media (max-width: 1024px) {
    nav .nav-cta { display: none; }
}