﻿@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tahoma&display=swap');
        

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f8f9fb;
}

.nav-link:hover {
    color: #3b82f6;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.signin-btn a {
    display: flex;
    align-items: center;
    color: #3b82f6;
    font-weight: 500;
}

.signin-btn i {
    margin-left: 5px;
}

.footer {
    background-color: white;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
    border-right: 3px solid #3b82f6;
}

.sidebar-link.active {
    background-color: rgba(59, 130, 246, 0.1);
    border-right: 3px solid #3b82f6;
    color: #3b82f6;
}

.table-row:hover {
    background-color: #f8fafc;
}

.password-input-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
}

.password-strength-meter {
    height: 5px;
    background-color: #e2e8f0;
    border-radius: 2.5px;
    margin-top: 5px;
    overflow: hidden;
}

.password-strength-meter-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.input-error {
    border-color: #ef4444 !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}


.sidebar-item.active {
    background-color: #4f46e5;
    color: white;
}

    .sidebar-item.active:hover {
        background-color: #4338ca;
    }

.sidebar-item:not(.active):hover {
    background-color: #e5e7eb;
}

.content-area {
    transition: all 0.3s ease;
}

.user-modal, .news-modal {
    display: none;
    width: 350px;
    padding: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

    .user-modal.active, .news-modal.active {
        display: block;
    }

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

    .overlay.active {
        display: block;
    }

.news-card {
    transition: transform 0.2s ease;
}

    .news-card:hover {
        transform: translateY(-2px);
    }

.news-card-image {
    height: 180px;
    object-fit: cover;
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .overlay.active {
        opacity: 1;
        visibility: visible;
    }

.user-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

    .user-modal.active {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
    }

/* استفاده از فونت ایمبد شده */
@font-face {
    font-family: 'Vazir';
    src: url('data:font/truetype;charset=utf-8;base64,{BASE64_ENCODED_FONT}') format('truetype');
}


.news-card {
    transition: all 0.3s ease;
    display: block;
    color: inherit;
}

    .news-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        text-decoration: none;
    }


.news-content {
    max-height: 400px; /* حداکثر ارتفاع محتوا */
    overflow-y: auto; /* اضافه کردن اسکرول عمودی وقتی متن بلندتر شد */
    padding: 10px;
    font-size: 1rem;
    line-height: 1.6;
}

    /* optional: استایل زیبا برای اسکرول */
    .news-content::-webkit-scrollbar {
        width: 8px;
    }

    .news-content::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .news-content::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

        .news-content::-webkit-scrollbar-thumb:hover {
            background: #555;
        }


@media print {
    body {
        background: white !important;
        height: auto !important;
        padding: 0 !important;
    }

    .microbiology-card {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        height: auto !important;
        page-break-after: always;
    }

    .no-print {
        display: none !important;
    }
}



/* Ensure RTL direction */
[dir="rtl"] {
    text-align: right;
}

/* Smooth transitions */
#mobile-sidebar {
    transition: opacity 0.3s ease;
}

/* Prevent body scroll when sidebar is open */
body.overflow-hidden {
    overflow: hidden;
}

/* Sidebar item styles */
.sidebar-item {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

    .sidebar-item:hover {
        background-color: #f8f9fa;
        border-color: #e9ecef;
    }