/* =========================================================
   common.css
   سیستم طراحی مشترک سایت — هدر، فوتر و توکن‌های پایه
   توسط همه‌ی صفحات عمومی (header.php / footer.php) استفاده می‌شود
   ========================================================= */

:root {
    /* رنگ‌های برند (حفظ‌شده) */
    --navy: #001F3F;
    --navy-light: #0D2C52;
    --accent-blue: #00A8E8;
    --accent-blue-dark: #0090CB;
    --accent-blue-light: #E9F7FD;

    /* خنثی‌ها */
    --slate: #334155;
    --gray: #64748B;
    --light: #F5F8FC;
    --border-gray: #E2E8F0;
    --surface: #FFFFFF;

    /* شعاع و سایه */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 10px rgba(0, 31, 63, 0.06);
    --shadow-md: 0 10px 30px rgba(0, 31, 63, 0.10);
    --shadow-lg: 0 25px 60px rgba(0, 31, 63, 0.16);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background-color: var(--light);
    color: var(--slate);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

img { max-width: 100%; }
button, input, textarea, select { font-family: inherit; }

a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===== Header ===== */
header#mainHeader {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-gray);
    position: sticky;
    top: 0;
    z-index: 500;
    transition: top 0.3s ease, box-shadow 0.3s ease;
}

.header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.95rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    flex-shrink: 0;
}

#logo-whyno {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

#whyno {
    color: var(--navy);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

#beta-version {
    font-size: 0.82rem;
    color: var(--gray);
    font-weight: 500;
}

header#mainHeader .logo h1 {
    color: var(--navy);
    font-size: 1.3rem;
    font-weight: 800;
}

/* ===== Nav ===== */
.nav-links {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.nav-links a {
    color: var(--slate);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
    white-space: nowrap;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    transition: background 0.25s ease, color 0.25s ease;
}

.nav-links a:hover {
    background: var(--accent-blue-light);
    color: var(--accent-blue-dark);
}

/* صفحه‌ای که کاربر هم‌اکنون در آن قرار دارد */
.nav-links a.active {
    background: var(--navy);
    color: #fff;
}

.nav-links .header-cta {
    display: none;
}

.nav-close {
    display: none;
}

/* ===== Header actions (CTA + hamburger) ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.nav-toggle:hover {
    background: var(--light);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ===== CTA button ===== */
.header-cta {
    padding: 0.75rem 1.6rem;
    background: linear-gradient(90deg, var(--navy), var(--accent-blue-dark));
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 31, 63, 0.25);
    flex-shrink: 0;
    white-space: nowrap;
}

.header-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0, 31, 63, 0.3);
}

.header-cta .cta-short {
    display: none;
}

/* ===== پوششِ پشتِ منوی موبایل ===== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 15, 30, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 600;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ===== Footer ===== */
footer#mainFooter {
    background: linear-gradient(180deg, var(--navy) 0%, #001530 100%);
    color: white;
    padding: 3.5rem 2rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    transition: background 0.25s, color 0.25s;
}

.footer-links a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.footer-links a.active {
    background: var(--accent-blue);
    color: white;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 auto 1.6rem;
    max-width: 320px;
}

.enamad-seal {
    margin: 0 0 1.4rem;
}

.enamad-seal img {
    max-width: 100px;
    border-radius: 8px;
}

.made-for {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
}

.copyright {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
    margin-top: 0.6rem;
}

/* =========================================================
   ریسپانسیو — منوی کشویی موبایل
   ========================================================= */
@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(310px, 84vw);
        background: #ffffff;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        padding: 1.4rem 1.3rem 2rem;
        transform: translateX(100%);
        transition: transform 0.35s ease;
        z-index: 650;
        box-shadow: -16px 0 50px rgba(0, 31, 63, 0.18);
        overflow-y: auto;
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: flex-start;
        width: 38px;
        height: 38px;
        margin-bottom: 1.2rem;
        border-radius: 10px;
        border: none;
        background: var(--light);
        color: var(--navy);
        font-size: 1.1rem;
        cursor: pointer;
    }

    .nav-links a {
        color: var(--slate);
        padding: 0.95rem 1rem;
        border-radius: 12px;
        font-size: 1.05rem;
        font-weight: 600;
    }

    .nav-links a:hover {
        background: var(--accent-blue-light);
        color: var(--accent-blue-dark);
    }

    .nav-links a.active {
        background: var(--navy);
        color: white;
    }

    .nav-links .header-cta {
        display: inline-flex;
        margin-top: 0.8rem;
        justify-content: center;
        background: linear-gradient(90deg, var(--accent-blue), var(--accent-blue-dark));
    }
}

@media (max-width: 600px) {
    .header-inner {
        padding: 0.85rem 1.1rem;
    }

    #logo-whyno {
        width: 38px;
        height: 38px;
    }

    #whyno {
        font-size: 1.1rem;
    }

    #beta-version {
        display: none;
    }

    header#mainHeader .logo h1 {
        font-size: 1.1rem;
    }

    .header-actions .header-cta .cta-full {
        display: none;
    }

    .header-actions .header-cta .cta-short {
        display: inline;
    }

    .header-actions .header-cta {
        padding: 0.65rem 1.1rem;
        font-size: 0.9rem;
    }

    .footer-links a {
        font-size: 0.92rem;
        padding: 0.45rem 0.85rem;
    }
}
