﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: myFont, Tahoma,sans-serif;
}

body, input, button, select, textarea {
    direction: rtl;
    background-color: #f9f9fb;
    color: #222;
}

h1, h2, h3, .page-title {
    font-weight: bold;
}

:root {
    --purple-600: #6f42c1;
    --purple-900: #001f54;
    --content-bg: #f8f9fa;
}

body {
    margin: 0;
    direction: rtl;
    background-color: var(--content-bg);
}

/* ==== Header ==== */
.header {
    background-color: var(--purple-900);
    color: #fff;
    padding: 18px 16px;
    font-size: 1.4rem;
    text-align: center;
    font-weight: bold;
}

/* ==== Navbar ==== */
.navbar {
    background-color: var(--purple-600);
    position: relative;
    z-index: 100;
}

/* دکمه همبرگری */
.menu-toggle {
    display: none;
    background-color: rgba(40, 40, 60, 0.9);
    color: #fff;
    font-size: 26px;
    padding: 8px 12px;
    border-radius: 8px;
    position: absolute;
    right: 12px;
    top: 10px;
    cursor: pointer;
    z-index: 1002;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
    transition: background-color 0.25s ease, transform 0.2s ease;
}

    .menu-toggle:hover {
        background-color: rgba(60, 60, 90, 1);
        transform: scale(1.05);
    }

/* لینک‌ها */
.nav-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 12px;
    transition: all 0.3s ease;
}

.nav-link {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

    .nav-link:hover {
        background-color: rgba(255,255,255,0.9);
        color: var(--purple-600);
    }

/* ==== حالت موبایل ==== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-container {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        background-color: #2e1b47; /* 🔹 تیره‌تر تا دیده بشه */
        border-top: 3px solid var(--purple-600);
        box-shadow: 0 10px 25px rgba(0,0,0,0.3);
        overflow-y: auto;
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        z-index: 1000;
    }

        .nav-container.show {
            max-height: 500px;
            opacity: 1;
            pointer-events: auto;
        }

    .nav-link {
        display: block;
        width: 100%;
        text-align: center;
        color: #fff;
        padding: 14px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

        .nav-link:hover {
            background-color: rgba(255,255,255,0.15);
            color: #fff;
        }
}

/* ==== محتوا ==== */
.content {
    background-color: var(--content-bg);
    min-height: calc(100vh - 140px);
    padding: 20px;
}