@font-face {
    font-family: "Vazir";
    src: url("../src/fonts/Vazir.ttf") format("truetype");
}

:root {
    --primary: #ff0000;
    --bg-dark: #141414;
    --text-muted: #85888f;
    --text-light: #ffffff;
    --font-vn: "Vazir"
}

body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-vn);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Header Section */
.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 2rem;
}

header {
    background: rgba(44, 47, 54, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 0px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    direction: rtl;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
}

.logo svg {
    width: 70px;
    height: 70px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--primary);
}

.dropdown-sub {
    position: relative;
}

.dropdown-submenu {
    display: none;
    flex-direction: column;
    position: absolute;
    right: 100%;
    top: 0;
    background-color: #1e1f24;
    border-radius: 0.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: 1000;
}

.dropdown-sub.active>.dropdown-submenu {
    display: flex;
    gap: 0.5rem;
}

.dropdown-sub-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
}

.dropdown-sub-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

nav ul li.dropdown {
    position: relative;
}

nav ul li .dropdown-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #1e1f24;
    border-radius: 0.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: 999;
}

nav ul li .dropdown-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    transition: background 0.3s;
}

nav ul li .dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

nav ul li.dropdown.active .dropdown-menu {
    display: flex;
    gap: 0.5rem;
}

.header-left {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    direction: ltr;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.icon-btn svg {
    stroke: var(--text-light);
    width: 26px;
    height: 26px;
    transition: stroke 0.3s ease;
}

.icon-btn:hover svg {
    stroke: var(--primary);
}

.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: #1a1c22;
    color: var(--text-light);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: right 0.3s ease;
}

.sidebar.active {
    right: 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sidebar ul li {
    width: 100%;
    margin-bottom: 1rem;
}

.sidebar ul li a {
    display: block;
    width: 100%;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.sidebar ul li a:hover {
    color: var(--primary);
}

.menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.8rem;
    display: none;
}

.footer {
    background-color: #111;
    color: var(--text-light);
    padding: 4rem 2rem 2rem;
    font-family: var(--font-vn);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(256px, 1fr));
    gap: 4rem;
    max-width: 1350px;
    margin: auto;
}

.footer-logo {
    width: 120px;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.footer-about p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.footer-contact p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--primary);
    margin-left: 0.5rem;
}

.social-icons a {
    color: var(--primary);
    margin-left: 1rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 768px) {
    header {
        padding: 0rem;
        gap: 1rem;
        align-items: center;
    }

    .container {
        gap: 1rem;
        align-items: center;
        text-align: center;
    }

    .header-right {
        align-items: center;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .header-left {
        justify-content: center;
        gap: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .menu-toggle svg {
        width: 28px;
    }

    nav:not(.sidebar) {
        display: none;
    }
}