﻿@font-face {
    font-family: 'Vazirmatn-Bold'; /* نام فونت */
    src: url('../Font/webfonts/Vazirmatn-Bold.woff2') format('woff2'); /* مسیر فایل فونت */
    font-weight: normal; /* وزن فونت */
    font-style: normal; /* سبک فونت */
}

/* ===== VARIABLES ===== */
:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --border-radius: 0.375rem;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn-Bold', sans-serif;
    background-color: #f1f5f9;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== HEADER STYLES ===== */
.header {
    background-color: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-light);
}
.submenuOrginal {
    position: fixed !important;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
}

    .logo span {
        color: var(--secondary);
    }

.header-date {
    font-size: 0.875rem;
    color: var(--gray);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

    .header-actions a {
        color: var(--gray);
        font-size: 0.875rem;
        transition: var(--transition);
    }

        .header-actions a:hover {
            color: var(--primary);
        }

        .header-actions a.active {
            color: var(--primary);
            font-weight: bold;
        }

/* ===== NAVIGATION STYLES ===== */
.main-nav {
    position: relative;
    direction: rtl;
}
.responsiv_Mobile {
    margin-top: 13px;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    flex-direction: row-reverse; /* Categories on right */
}

.scroll_right {
    border: solid 1px silver;
    padding: 15px 21px 16px 21px;
    border-radius: 34px;
    margin: 8px 0px 0px 0px;
    background: white;
    box-shadow: 0px 0px 4px silver;
    left: 0;
    transition: box-shadow 0.3s ease;
    z-index: 1;
    cursor: pointer;
    position: absolute;
}

.scroll_right:hover {
    box-shadow: 0px 0px 11px silver;
}

.scroll_left {
    border: solid 1px silver;
    padding: 15px 21px 16px 21px;
    border-radius: 34px;
    margin: 8px 0px 0px -6px;
    background: white;
    box-shadow: 0px 0px 4px silver;
    transition: box-shadow 0.3s ease;
    z-index: 1;
    cursor: pointer;
    position: absolute;
    right: 0;
}

    .scroll_left:hover {
        box-shadow: 0px 0px 11px silver;
    }



.sidenav {
    height: 100%;
    position: fixed;
    width: 0px;
    z-index: 10000;
    top: 0;
    right: 0;
    background-color: #111;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
}

.sidenav a {
    padding: 28px 39px 8px 14px;
    text-decoration: none;
    font-size: 19px;
    color: #000000;
    direction: rtl;
    display: block;
    transition: 0.3s;
}

    .sidenav a:hover {
        color: #960000;
    }

.sidenav .closebtn {
    position: absolute;
    top: -15px;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

@media screen and (max-height: 450px) {
    .sidenav {
        padding-top: 15px;
    }

        .sidenav a {
            font-size: 18px;
        }
}


.closebtn {
    position: absolute;
    top: -14px;
    right: 20px;
    font-size: 36px;
    margin-left: 50px;
}

.NavSide {
    padding: 28px 39px 8px 14px;
    text-decoration: none;
    font-size: 19px;
    color: #000000;
    direction: rtl;
    display: block;
    transition: 0.3s;
}

.sidebarMenoButton {
    display: none;
    font-size: 30px;
    cursor: pointer;
    margin: 5px 0px -9px 0px;
}

#mySidenav {
    display: none;
    width: 250px;
    padding: 60px 0px 50px 0px;
    background: rgb(243 243 243);
    box-shadow: rgb(140 140 140) 0px 0px 13px;
}

@media (max-width: 768px) {
    .sidebarMenoButton {
        display: block;
    }

    .scroll_right {
        display: none;
    }

    .scroll_left {
        display: none;
    }

    .nav_menud {
        display: none;
    }

    #mySidenav {
        display: block;
    }
}

@media (max-width: 576px) {
    #mySidenav {
        display: block;
    }

    .sidebarMenoButton {
        display: block;
    }

    .scroll_right {
        display: none;
    }

    .scroll_left {
        display: none;
    }

    .nav_menud {
        display: none;
    }
}


.nav-menu {
    margin: 0px 46px 0px 43px;
    white-space: nowrap;
    display: flex;
    display: -webkit-box;
    overflow-x: hidden;
    overflow-y: hidden;
    gap: var(--space-md);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 1rem;
    color: var(--dark);
    font-weight: bold;
    transition: var(--transition);
}

    .nav-link:hover {
        color: var(--primary);
    }

.nav-item.active .nav-link {
    color: var(--primary);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: var(--shadow);
    min-width: 200px;
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark);
    border-bottom: 1px solid var(--gray-light);
    transition: var(--transition);
}

    .dropdown-item:hover {
        background-color: #f8fafc;
        color: var(--primary);
    }

    .dropdown-item:last-child {
        border-bottom: none;
    }

/* Categories Menu */
.categories-menu {
    position: relative;
}

.categories-btn {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: var(--primary);
    color: white;
    font-weight: bold;
    border-radius: var(--border-radius);
    cursor: pointer;
}

    .categories-btn::after {
        content: "▼";
        font-size: 0.75rem;
        margin-right: 0.5rem;
    }

.categories-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: var(--shadow);
    min-width: 250px;
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.categories-menu:hover .categories-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-item {
    position: relative;
}

.category-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark);
    border-bottom: 1px solid var(--gray-light);
    transition: var(--transition);
}

    .category-link:hover {
        background-color: #f8fafc;
        color: var(--primary);
    }

.has-children::after {
    content: "◄";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--gray);
}

.subcategory {
    position: absolute;
    top: 0;
    left: -250px;
    background-color: #fff;
    box-shadow: var(--shadow);
    min-width: 250px;
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: var(--transition);
}

.category-item:hover .subcategory {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ===== ERROR PAGE STYLES ===== */
.error-section {
    padding: 3rem 0;
    min-height: calc(100vh - 400px);
    display: flex;
    align-items: center;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.error-code {
    font-size: 10rem;
    font-weight: bold;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    animation: errorCodePulse 4s ease-in-out infinite;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

    .error-code::after {
        content: "";
        position: absolute;
        width: 100%;
        height: 10px;
        background-color: var(--secondary);
        bottom: 15px;
        left: 0;
        z-index: -1;
        border-radius: 5px;
        opacity: 0.5;
        animation: errorCodeLineWidth 4s ease-in-out infinite;
    }

.error-title {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.error-message {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.error-illustration {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.error-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

    .search-input:focus {
        outline: none;
        border-color: var(--primary-light);
    }

.search-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

    .search-btn:hover {
        background-color: var(--primary-light);
    }

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Vazir', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

    .btn:hover {
        background-color: var(--primary-light);
        transform: translateY(-3px);
    }

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

    .btn-outline:hover {
        background-color: var(--primary);
        color: white;
    }

.suggested-links {
    margin-top: 2rem;
}

.suggested-title {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 1rem;
    text-align: center;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.link-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .link-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }

        .link-card:hover .link-icon {
            animation: iconPulse 1s ease-in-out;
            background-color: rgba(59, 130, 246, 0.2);
        }

    .link-card::after {
        content: "";
        position: absolute;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
        bottom: 0;
        left: 0;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s ease-in-out;
    }

    .link-card:hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }

.link-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: var(--primary);
}

.link-title {
    font-weight: bold;
    text-align: center;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.link-desc {
    font-size: 0.875rem;
    color: var(--gray);
    text-align: center;
}

/* ===== FOOTER STYLES ===== */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 2rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: block;
}

.footer-desc {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

    .social-link:hover {
        background-color: var(--primary);
    }

.footer-title {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

    .footer-title::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        width: 40px;
        height: 2px;
        background-color: var(--primary);
    }

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    opacity: 0.8;
    transition: var(--transition);
}

    .footer-links a:hover {
        opacity: 1;
        color: var(--primary-light);
    }

.contact-info li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Newspaper Animation Styles */
.newspaper-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.newspaper {
    position: absolute;
    width: 220px;
    height: 280px;
    background-color: #f8f9fa;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    transform: rotate(-5deg);
    z-index: 1;
    animation: newspaperFloat 6s ease-in-out infinite;
}

.newspaper-header {
    border-bottom: 2px solid var(--dark);
    padding-bottom: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.newspaper-title {
    font-weight: bold;
    font-size: 16px;
    color: var(--primary);
}

.newspaper-date {
    font-size: 12px;
    color: var(--gray);
}

.newspaper-headline {
    height: 20px;
    background-color: #e2e8f0;
    margin-bottom: 15px;
    width: 90%;
    border-radius: 3px;
}

.newspaper-text {
    height: 8px;
    background-color: #e2e8f0;
    margin-bottom: 10px;
    border-radius: 2px;
}

    .newspaper-text:nth-child(2) {
        width: 100%;
    }

    .newspaper-text:nth-child(3) {
        width: 90%;
    }

    .newspaper-text:nth-child(4) {
        width: 95%;
    }

.newspaper-image {
    height: 60px;
    background-color: #e2e8f0;
    margin: 15px 0;
    border-radius: 3px;
}

.newspaper-text:nth-child(6) {
    width: 85%;
}

.newspaper-text:nth-child(7) {
    width: 75%;
}

.magnifying-glass {
    position: absolute;
    top: 50px;
    right: 20px;
    z-index: 2;
    animation: searchMotion 6s ease-in-out infinite;
}

.magnifying-lens {
    width: 100px;
    height: 100px;
    border: 8px solid var(--primary);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.magnifying-lens-glare {
    position: absolute;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50%;
    top: 15px;
    left: 15px;
}

.question-mark {
    font-size: 50px;
    color: var(--secondary);
    font-weight: bold;
    animation: pulseQuestionMark 2s ease-in-out infinite;
}

.magnifying-handle {
    position: absolute;
    width: 20px;
    height: 120px;
    background-color: var(--primary);
    bottom: -60px;
    right: 20px;
    transform: rotate(45deg);
    border-radius: 10px;
}

@keyframes newspaperFloat {
    0% {
        transform: rotate(-5deg) translateY(0);
    }

    50% {
        transform: rotate(-5deg) translateY(-15px);
    }

    100% {
        transform: rotate(-5deg) translateY(0);
    }
}

@keyframes searchMotion {
    0% {
        transform: rotate(0deg) translateX(0) translateY(0);
    }

    25% {
        transform: rotate(-5deg) translateX(-20px) translateY(10px);
    }

    50% {
        transform: rotate(0deg) translateX(0) translateY(0);
    }

    75% {
        transform: rotate(5deg) translateX(20px) translateY(10px);
    }

    100% {
        transform: rotate(0deg) translateX(0) translateY(0);
    }
}

@keyframes pulseQuestionMark {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* Remove the old floating animation */
.floating {
    animation: none;
}

@keyframes errorCodePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes errorCodeLineWidth {
    0% {
        width: 100%;
        opacity: 0.5;
    }

    50% {
        width: 110%;
        opacity: 0.7;
    }

    100% {
        width: 100%;
        opacity: 0.5;
    }
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .nav-menu {
        display: none;
    }
    .error-code {
        font-size: 8rem;
    }

    .error-title {
        font-size: 2rem;
    }

    .error-message {
        font-size: 1.125rem;
    }

    .nav-container {
        direction: rtl;
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .btn-outline {
        margin: 11px 0px 0px 0px;
    }
    .header-top {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
    }

    .error-code {
        font-size: 6rem;
    }

    .error-title {
        font-size: 1.5rem;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-direction: column;
    }

    .search-input {
        border: 1px solid var(--gray-light);
        border-radius: var(--border-radius);
        margin-bottom: 0.5rem;
    }

    .search-btn {
        border-radius: var(--border-radius);
        width: 100%;
    }
}



