﻿/* ==================== HEADER ==================== */
header {
    background: #0a2d47;
    color: white;
    padding: 0;
    direction: rtl;
}

.top-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 15px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.right-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-display {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 80px;
    padding: 5px;
    border-radius: 8px;
}

.site-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
}

.search-social {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

    .social-icons a {
        color: white;
        font-size: 18px;
        transition: color 0.3s;
    }

        .social-icons a:hover {
            color: #ff8c42;
        }

.search-box-n {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 4px;
}

    .search-box-n input {
        background: #0a2d47;
        border: 1px solid white;
        padding: 8px 10px 8px 15px;
        border-radius: 4px;
        color: white;
        width: 290px;
        font-size: 13px;
        direction: rtl;
    }

        .search-box-n input::placeholder {
            color: white;
        }

    .search-box-n i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.6);
    }

/* ==================== NAVIGATION ==================== */
nav {
    display: flex;
    justify-content: flex-start;
}

.nav-main {
    background: #0f3353;
}

/* استایل‌های منوی همبرگری */
.menu-toggle-checkbox {
    display: none;
}

.menu-toggle-label {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 10px;
    z-index: 1001;
}

    .menu-toggle-label span {
        display: block;
        width: 25px;
        height: 3px;
        background: white;
        transition: all 0.3s ease;
        border-radius: 3px;
    }

/* دکمه بستن منو */
.menu-close-btn {
    display: none;
}

/* وقتی منو باز میشه، آیکون همبرگر مخفی میشه */
.menu-toggle-checkbox:checked + .menu-toggle-label {
    opacity: 0;
    pointer-events: none;
}

/* سرچ بار موبایل - پیش‌فرض مخفی */
.search-box-mobile {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

    .nav-menu li a {
        display: block;
        padding: 9px 12px;
        color: white;
        text-decoration: none;
        font-size: 12px;
        transition: all 0.3s;
        border-bottom: 3px solid transparent;
    }

        .nav-menu li a:hover {
            background: white;
            color: black;
        }

    .nav-menu li .active {
        background: white;
        color: black;
    }

/* ==================== FOOTER ==================== */
footer {
    direction: rtl;
    background: #0a2d47;
    color: white;
    padding-top: 40px;
    padding-left: 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-divider {
    height: 1px;
    background: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0px;
}

.footer-text {
    font-size: 13px;
    color: white;
}

.footer-links {
    display: flex;
    gap: 10px;
    list-style: none;
}

    .footer-links li {
        padding-right: 15px;
        border-right: 1px solid rgba(255, 255, 255, 0.4);
    }

        .footer-links li:first-child {
            border-right: none;
        }

        .footer-links li a {
            color: white;
            text-decoration: none;
            font-size: 13px;
            transition: color 0.3s;
        }

            .footer-links li a:hover {
                color: #ff8c42;
            }

/* ==================== RESPONSIVE STYLES ==================== */
@media (max-width: 768px) {
    /* Header Mobile */
    .top-section {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
        align-items: center;
        text-align: center;
    }

    .right-section {
        align-items: center;
        padding-right: 0;
    }

    .logo-container {
        justify-content: center;
    }

    .search-social {
        align-items: center;
        padding-left: 0;
    }

        /* مخفی کردن سرچ بار header در موبایل */
        .search-social .search-box-n {
            display: none;
        }

    /* Navigation Mobile - Hamburger Menu */
    nav {
        position: relative;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    .menu-toggle-label {
        display: flex;
        order: 1;
    }

    /* نمایش سرچ بار موبایل در nav */
    .search-box-mobile {
        display: block;
        order: 2;
    }

        .search-box-mobile form {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .search-box-mobile input[type="text"] {
            background: #0a2d47;
            border: 1px solid white;
            padding: 8px 12px;
            border-radius: 4px;
            color: white !important;
            width: 290px;
            font-size: 13px;
            direction: rtl;
        }

            .search-box-mobile input[type="text"]::placeholder {
                color: rgba(255, 255, 255, 0.7);
            }

        .search-box-mobile button {
            background: transparent;
            border: 1px solid white;
            color: white;
            padding: 8px 12px;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }

            .search-box-mobile button:hover {
                background: white;
                color: #0a2d47;
            }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #0a2d47;
        display: flex;
        flex-direction: column;
        padding: 20px;
        gap: 0;
        transition: right 0.4s ease;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    }

    /* دکمه بستن داخل منو */
    .menu-close-btn {
        display: flex;
        align-self: flex-start;
        background: transparent;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 10px;
        margin-bottom: 20px;
    }

        .menu-close-btn:hover {
            color: #ff8c42;
        }

    .menu-toggle-checkbox:checked ~ .nav-menu {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

        .nav-menu li a {
            width: 100%;
            text-align: right;
            padding: 15px 20px;
            font-size: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 0;
        }

            .nav-menu li a:hover,
            .nav-menu li .active {
                background: #0f3353;
                color: white;
                border-right: 4px solid #ff8c42;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            }

    /* Overlay برای بستن منو */
    .menu-toggle-checkbox:checked ~ .nav-menu::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    /* Footer Mobile */
    .footer-top {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        align-items: center;
        text-align: center;
    }

    .logo-container {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-divider {
        margin: 0 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
        text-align: center;
    }

    .footer-text {
        padding-right: 0;
    }

    .footer-links {
        display: grid;
        grid-template-columns: repeat(3, auto);
        justify-content: center;
        justify-items: center;
        gap: 8px 12px;
        padding-left: 0;
    }

        .footer-links li {
            border-right: none;
            padding-right: 0;
            position: relative;
        }

            .footer-links li::after {
                content: "";
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                width: 1px;
                height: 16px;
                background: rgba(255, 255, 255, 0.4);
                left: calc(100% + 6px);
            }

            .footer-links li:nth-child(4n)::after {
                display: none;
            }

            .footer-links li:first-child::after {
                display: none;
            }
}

/* برای صفحات بزرگتر از تبلت */
@media (min-width: 769px) {
    .search-box-mobile {
        display: none !important;
    }
}
