﻿/* ================== تنظیمات پایه ================== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-family: 'sartitr', sans-serif;
}

main {
    flex: 1;
}

/* ================== هدر ================== */
#menu {
    box-shadow: -5px 3px 20px burlywood;
    border-radius: 40px;
    width: 68%;
    display: block;
    padding: 0 3px;
    position: fixed;
    z-index: 9999;
    background-color: white;
    left: 50%;
    transform: translateX(-50%);
    direction: rtl;
    transition: top 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 59px;
    padding: 9px;
    flex-wrap: wrap;
}

/* لینک‌های ناوبری */
.desktop-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: black;
    font-weight: bold;
    font-size: 16px;
    padding: 10px 16px;
    transition: background 0.3s, color 0.3s;
    border-radius: 8px;
}

    .nav-link:hover {
        background-color: darkblue;
        color: darkorange;
    }

.logo {
    width: 40px;
    height: auto;
}

/* ================== منوی کشویی ================== */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    min-width: 220px;
    text-align: right;
    z-index: 999;
}

.dropdown-item {
    padding: 10px 16px;
    color: black;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

    .dropdown-item:hover {
        background-color: darkblue;
        color: darkorange;
    }

/* ================== فوتر ================== */
.custom-footer {
    direction: rtl;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    font-family: 'matnha', sans-serif;
    padding: 22px 0 2px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 50px;
    margin: 5px 60px;
}

.footer-box {
    flex: 1 1 220px;
    min-width: 200px;
}

    .footer-box h3 {
        color: #fdd835;
        margin-bottom: 12px;
        font-size: 1.2rem;
    }

    .footer-box p,
    .footer-box ul {
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
}

    .footer-box ul {
        list-style: none;
        padding: 0;
    }

        .footer-box ul li {
            margin-bottom: 8px;
        }

    .footer-box a {
        color: #ffffff;
        text-decoration: none;
        transition: color 0.3s eas
    }

        .footer-box a:hover {
            color: coral;
            text-decoration:dotted;
        }

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    padding-top: 15px;
    font-size: 0.9rem;
    color: #aaa;
}

/* ================== محتوای اصلی ================== */
.mainn {
    padding: 130px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.box-shadow {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    background: white;
    padding: 20px;
    margin: 20px 0;
}

/* ================== منوی موبایل ================== */
.mobile-icon {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.off-canvas {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

    .off-canvas.open {
        right: 0;
    }

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

    .overlay.active {
        display: block;
    }


/* ================== واکنش‌گرا (ریسپانسیو) ================== */

/* موبایل */
@media (max-width: 768px) {
    #menu {
        width: 100%;
        border-radius: 0 !important;
        padding: 0 3px;
    }

    .nav-container {
        justify-content: space-between;
        gap: 0;
        padding: 12px 20px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-icon {
        display: inline;
    }

    .logo {
        margin: 0 auto;
    }

}

/* دسکتاپ */
@media (min-width: 769px) {
    .desktop-nav {
        display: flex;
        justify-content: center;
        gap: 30px;
    }

    .mobile-icon {
        display: none;
    }

    .nav-dropdown:hover .dropdown-menu {
        display: block;
    }

    .nav-link {
        padding: 10px 20px;
    }

}
@media (min-width: 769px) {
    .off-canvas {
        display: none !important;
    }

    .overlay {
        display: none !important;
    }

}

/* منوی موبایل */
.mobile-icon {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.off-canvas {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.off-canvas.open {
    right: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.overlay.active {
    display: block;
}

.off-canvas .nav-link {
    margin: 10px 0;
    font-size: 18px;
    color: black;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
}

.off-canvas .nav-link:hover {
    background-color: darkblue;
    color: darkorange;
}

/* واکنش‌گرا */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    .mobile-icon {
        display: block;
    }
}

@media (min-width: 769px) {
    .off-canvas, .overlay {
        display: none !important;
    }
}

