@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --ink: #142f2d;
    --ink-soft: #244441;
    --green: #17645e;
    --green-light: #2b8d83;
    --mint: #d9eeea;
    --cream: #f5f2e9;
    --paper: #fffefa;
    --muted: #788783;
    --line: #e5e9e3;
    --gold: #c9a76b;
    --shadow: 0 18px 55px rgba(20, 47, 45, .09);
    --radius: 22px;
    --font: "Vazirmatn", Tahoma, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.9;
}

body, button, input, textarea {
    font-family: var(--font);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.site-shell {
    min-height: 100vh;
    overflow-x: clip;
    overflow-y: visible;
}

.container {
    width: min(1180px, calc(100% - 64px));
    margin-inline: auto;
}

.site-header {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 32px);
    max-width: 1320px;
    margin: 0;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 22px;
    background: rgba(255,254,250,.90);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 35px rgba(16,55,49,.14);
}

.header-inner {
    width: min(1320px, calc(100% - 64px));
    height: 88px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand, .footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    color: white;
    font-size: 25px;
    font-weight: 800;
    background: linear-gradient(145deg, #267c73, #103b38);
    box-shadow: 0 7px 18px rgba(23, 100, 94, .2);
}

.brand-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-logo-fallback {
    display: none;
    width: 100%;
    height: 100%;
    place-items: center;
    color: white;
    font-size: 25px;
    font-weight: 800;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

.brand-text strong, .footer-brand strong {
    font-size: 15px;
    font-weight: 800;
}

.brand-text small {
    color: var(--muted);
    font-size: 10px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.6vw, 38px);
}

.desktop-nav a {
    position: relative;
    color: #65736f;
    font-size: 13px;
    font-weight: 600;
    transition: color .25s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -10px;
    width: 0;
    height: 2px;
    border-radius: 5px;
    background: var(--green-light);
    transition: width .25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--green);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

.header-contact {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 11px 18px;
    color: white;
    background: var(--ink);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    transition: background .25s, transform .25s;
}

.header-contact:hover {
    background: var(--green);
    transform: translateY(-2px);
}

.header-contact span:last-child {
    font-size: 17px;
}

.mobile-menu-toggle,
.mobile-menu,
.mobile-bottom-nav {
    display: none;
}

.site-footer {
    margin-top: 90px;
    background: #102d2b;
    color: white;
}

.footer-inner {
    width: min(1180px, calc(100% - 64px));
    min-height: 150px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-brand .brand-mark {
    background: rgba(255,255,255,.13);
    box-shadow: none;
}

.footer-brand p {
    margin: 3px 0 0;
    color: #a9c0bb;
    font-size: 11px;
}

.footer-links {
    display: flex;
    gap: 24px;
    color: #c4d3cf;
    font-size: 12px;
}

.footer-links a:hover {
    color: white;
}

.footer-copy {
    color: #9bb1ac;
    font-size: 10px;
}

@media (max-width: 900px) {
    .container {
        width: min(100% - 40px, 700px);
    }

    .header-inner {
        width: calc(100% - 40px);
        height: 76px;
    }

    .desktop-nav,
    .header-contact {
        display: none;
    }

    .mobile-menu-toggle {
        width: 43px;
        height: 43px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 1px solid var(--line);
        border-radius: 13px;
        background: white;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 19px;
        height: 2px;
        border-radius: 3px;
        background: var(--ink);
        transition: transform .25s;
    }

    .mobile-menu-toggle.is-open span:first-child {
        transform: translateY(4px) rotate(45deg);
    }

    .mobile-menu-toggle.is-open span:last-child {
        transform: translateY(-4px) rotate(-45deg);
    }

    .mobile-menu {
        position: absolute;
        top: calc(100% - 1px);
        right: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0 20px;
        max-height: 0;
        overflow: hidden;
        background: var(--paper);
        border-bottom: 1px solid transparent;
        transition: max-height .3s ease, padding .3s ease;
    }

    .mobile-menu.is-open {
        max-height: 360px;
        padding-top: 8px;
        padding-bottom: 12px;
        border-color: var(--line);
        box-shadow: 0 18px 25px rgba(20,47,45,.08);
    }

    .mobile-menu a {
        padding: 10px 5px;
        border-bottom: 1px solid var(--line);
        color: var(--ink-soft);
        font-size: 13px;
        font-weight: 600;
    }

    .mobile-menu a:last-child {
        border-bottom: 0;
    }

    .footer-inner {
        width: calc(100% - 40px);
        padding: 35px 0;
        flex-wrap: wrap;
    }

    .footer-links {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    body {
        padding-bottom: 72px;
        font-size: 14px;
    }

    .container {
        width: calc(100% - 36px);
    }

    .header-inner {
        width: calc(100% - 36px);
        height: 70px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .brand-text strong {
        font-size: 14px;
    }

    .brand-text small {
        font-size: 9px;
    }

    .site-footer {
        margin-top: 55px;
    }

    .footer-inner {
        width: calc(100% - 36px);
        gap: 22px;
    }

    .footer-links {
        gap: 17px;
    }

    .mobile-bottom-nav {
        position: fixed;
        z-index: 100;
        right: 12px;
        bottom: 10px;
        left: 12px;
        height: 62px;
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 5px 8px;
        background: rgba(255, 254, 250, .97);
        border: 1px solid rgba(20,47,45,.09);
        border-radius: 19px;
        box-shadow: 0 8px 35px rgba(12, 40, 37, .16);
        backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav a {
        min-width: 58px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        color: #8a9994;
        transition: color .2s;
    }

    .mobile-bottom-nav a.active {
        color: var(--green);
    }

    .mobile-bottom-nav .nav-icon {
        font-size: 21px;
        line-height: 1.3;
    }

    .mobile-bottom-nav small {
        font-size: 9px;
        font-weight: 600;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}


/* FINAL FIXED HEADER SPACING */
main {
    padding-top: 108px;
}

@media (max-width: 900px) {
    .site-header {
        top: 8px;
        width: calc(100% - 20px);
        border-radius: 17px;
    }

    main {
        padding-top: 12px;
    }
}
