/* ====== فونت و تنظیمات پایه ====== */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --primary: #1e3a5f;
    --primary-dark: #14253d;
    --primary-light: #2c5282;
    --secondary: #c9a961;
    --secondary-dark: #a88a4a;
    --accent: #ed8936;
    --success: #38a169;
    --danger: #e53e3e;
    --bg-light: #f7fafc;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --border: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.8;
    direction: rtl;
}

/* ====== نوار بالایی ====== */
.top-bar {
    background: var(--primary-dark);
    color: #fff;
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar a { color: #cbd5e0; text-decoration: none; }
.top-bar a:hover { color: var(--secondary); }

/* ====== نوار ناوبری ====== */
.navbar-custom {
    background: #fff;
    box-shadow: var(--shadow-md);
    padding: 15px 0;
    transition: all 0.3s;
}

.navbar-custom .navbar-brand {
    font-weight: 800;
    color: var(--primary) !important;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-custom .navbar-brand img {
    height: 45px;
}

.navbar-custom .nav-link {
    color: var(--text-dark) !important;
    font-weight: 600;
    padding: 10px 18px !important;
    position: relative;
    transition: color 0.3s;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--primary) !important;
}

.navbar-custom .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 30px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

/* ====== هرو سکشن ====== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="rgba(255,255,255,0.05)" d="M50 0 L100 50 L50 100 L0 50 Z"/></svg>');
    background-size: 80px;
    opacity: 0.5;
}

.hero-content { position: relative; z-index: 2; }

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-slogan {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* ====== کارت‌ها ====== */
.card-custom {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s;
    overflow: hidden;
    height: 100%;
}

.card-custom:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-custom .card-body { padding: 30px; }

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

/* ====== بخش‌ها ====== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.section-padding { padding: 80px 0; }

/* ====== کارت عضو ====== */
.member-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    margin-bottom: 25px;
    border: 1px solid var(--border);
}

.member-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.member-photo {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 5rem;
}

.member-info {
    padding: 25px;
    text-align: center;
}

.member-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.member-role {
    color: var(--secondary-dark);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.member-bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ====== ساختار سازمانی ====== */
.org-chart {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.org-title {
    text-align: center;
    margin-bottom: 40px;
}

.org-title h3 {
    color: var(--primary);
    font-weight: 800;
}

.org-level {
    margin-bottom: 50px;
    position: relative;
}

.org-level-title {
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    display: inline-block;
    font-weight: 700;
    margin: 0 auto 30px;
    box-shadow: var(--shadow-sm);
}

/* ====== فرم‌ها ====== */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 10px 15px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.15);
}

.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary-custom:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary-custom {
    background: var(--secondary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary-custom:hover {
    background: var(--secondary-dark);
    color: #fff;
}

/* ====== فوتر ====== */
.footer {
    background: var(--primary-dark);
    color: #cbd5e0;
    padding: 60px 0 20px;
}

.footer h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary);
}

.footer a {
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
    padding: 5px 0;
}

.footer a:hover {
    color: var(--secondary);
    padding-right: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
    font-size: 0.9rem;
}

.footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    margin-left: 8px;
    transition: all 0.3s;
    padding: 0;
}

.footer .social-icons a:hover {
    background: var(--secondary);
    color: #fff;
}

/* ====== پنل مدیریت ====== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--primary-dark);
    color: #fff;
    padding: 25px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    right: 0;
    top: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.admin-sidebar .brand {
    padding: 0 25px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--secondary);
}

.admin-sidebar .menu-item {
    display: block;
    padding: 12px 25px;
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s;
    border-right: 3px solid transparent;
}

.admin-sidebar .menu-item:hover,
.admin-sidebar .menu-item.active {
    background: rgba(255,255,255,0.05);
    color: var(--secondary);
    border-right-color: var(--secondary);
}

.admin-sidebar .menu-item i {
    margin-left: 10px;
    width: 20px;
}

.admin-content {
    flex: 1;
    margin-right: 260px;
    padding: 30px;
    background: var(--bg-light);
    min-height: 100vh;
}

.admin-header {
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border-right: 4px solid var(--primary);
    margin-bottom: 20px;
    transition: all 0.3s;
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.stat-card .stat-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 10px; }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.95rem; }

.stat-card.success { border-right-color: var(--success); }
.stat-card.success .stat-icon { color: var(--success); }
.stat-card.warning { border-right-color: var(--accent); }
.stat-card.warning .stat-icon { color: var(--accent); }
.stat-card.danger { border-right-color: var(--danger); }
.stat-card.danger .stat-icon { color: var(--danger); }

.admin-table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table table {
    margin-bottom: 0;
}

.admin-table thead {
    background: var(--primary);
    color: #fff;
}

.admin-table thead th {
    font-weight: 700;
    border: none;
    padding: 15px;
}

/* ====== ویرایشگر متن ====== */
.editor-toolbar {
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 8px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.editor-toolbar button {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 0.9rem;
}

.editor-toolbar button:hover {
    background: var(--primary);
    color: #fff;
}

.editor-content {
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    padding: 15px;
    min-height: 300px;
    background: #fff;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    line-height: 1.9;
    outline: none;
}

.editor-content:focus { border-color: var(--primary); }

/* ====== صفحه ورود ====== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-card .logo i {
    font-size: 4rem;
    color: var(--primary);
}

/* ====== صورتجلسه ====== */
.minutes-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border-right: 4px solid var(--primary);
    transition: all 0.3s;
}

.minutes-card:hover {
    box-shadow: var(--shadow-md);
    border-right-color: var(--secondary);
}

.minutes-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.minutes-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.minutes-meta span i { margin-left: 5px; color: var(--secondary); }

.minutes-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    line-height: 2;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 1rem;
}

/* ====== ریسپانسیو ====== */
@media (max-width: 991px) {
    .hero-title { font-size: 2.2rem; }
    .hero-slogan { font-size: 1.1rem; }
    .hero-section { padding: 70px 0 50px; }
    .section-padding { padding: 60px 0; }
    .section-title h2 { font-size: 1.7rem; }
    
    .admin-sidebar {
        transform: translateX(100%);
        width: 280px;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content { margin-right: 0; }
    .navbar-toggler-admin {
        display: block !important;
        background: var(--primary);
        color: #fff;
        border: none;
        padding: 8px 15px;
        border-radius: 5px;
        cursor: pointer;
    }
}

@media (max-width: 576px) {
    .hero-title { font-size: 1.7rem; }
    .section-title h2 { font-size: 1.4rem; }
    .member-photo { height: 220px; }
    .admin-content { padding: 15px; }
    .login-card { padding: 25px; }
}

/* ====== انیمیشن ====== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp 0.6s ease-out; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ====== پرینت ====== */
@media print {
    .no-print, .navbar-custom, .footer, .admin-sidebar { display: none !important; }
    body { background: #fff; }
    .admin-content { margin: 0; padding: 0; }
    .minutes-content { box-shadow: none; border: 1px solid #ddd; }
}

/* ====== اسکرول بار ====== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }