/* فونت ها */
@font-face {
    font-family: 'IranSansX';
    src: url('IranSansX-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'IranSansX';
    src: url('IranSansX-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

/* متغیرهای رنگی */
:root {
    --primary-color: #059669;
    --primary-dark: #047857;
    --accent-color: #fbbf24;
    --text-color: #1f2937;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --border-radius: 12px;
}

/* تنظیمات کلی */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'IranSansX', Tahoma, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- استایل های سایت اصلی --- */

/* هدر */
header {
    background-color: var(--white);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    font-weight: bold;
    color: var(--text-color);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    right: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-login {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: bold;
}

.btn-login:hover {
    background-color: var(--primary-dark);
}

/* اسلایدر */
.slider-container {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    margin-bottom: 40px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

/* کانتینر */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* باکس ها */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.box {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
}

.box h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px; /* اضافه شده برای فاصله از پایین */
    border-bottom: 1px solid #f0f0f0; /* اضافه شده برای زیبایی */
}

.news-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-list li::before {
    content: '📢';
    font-size: 1.2rem;
}

.date-badge {
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 4px 10px; /* کمی افزایش فاصله */
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: auto;
}

/* جدول */
.table-responsive {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

th {
    background-color: var(--primary-color);
    color: var(--white);
}

tr:hover {
    background-color: #f9fafb;
}

/* کارکنان */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.staff-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid #e5e7eb;
}

.staff-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.staff-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: #ddd;
}

.staff-info {
    padding: 20px;
}

.staff-role {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.staff-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.staff-phone {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* شبکه اجتماعی */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.social-btn {
    background-color: var(--white);
    padding: 12px 30px; /* افزایش فاصله داخلی */
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: var(--text-color);
    border: 1px solid #eee;
}

.social-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.social-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* فوتر */
footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 40px 20px;
    text-align: center;
    margin-top: auto;
}

/* --- استایل های پنل مدیریت --- */

.admin-container {
    max-width: 1000px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 10px 20px;
    background: #eee;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
}

.btn-submit {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: #ef4444;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
}

.btn-danger:hover {
    background: #dc2626;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

/* --- استایل ورود --- */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .slider-container {
        height: 300px;
    }
}