/* ==========================================
   متغیرهای رنگی - تم روشن و قرمز
========================================== */
:root {
    --primary-red: #DC2626;
    --primary-dark: #B91C1C;
    --primary-light: #FCA5A5;
    --secondary-red: #EF4444;
    --light-bg: #FFFFFF;
    --light-card: #F8FAFC;
    --light-hover: #F1F5F9;
    --text-dark: #1E293B;
    --text-gray: #475569;
    --text-light: #64748B;
    --border-light: #E2E8F0;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   ریست و تنظیمات پایه
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 50%, #FFFFFF 100%);
    color: var(--text-dark);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ==========================================
   پس‌زمینه آکادمیک
========================================== */
.academic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-pattern {
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: 
        repeating-linear-gradient(0deg, var(--primary-red) 0px, var(--primary-red) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, var(--primary-red) 0px, var(--primary-red) 1px, transparent 1px, transparent 40px);
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    top: 10%;
    right: 10%;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--secondary-red), var(--primary-light));
    bottom: 20%;
    left: 15%;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-red));
    top: 50%;
    left: 5%;
}

.shape-4 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-dark));
    bottom: 10%;
    right: 20%;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
    }
    66% {
        transform: translateY(30px) rotate(240deg);
    }
}

/* ==========================================
   دکمه بازگشت
========================================== */
.back-button {
    position: fixed;
    top: 30px;
    right: 30px;
    background: white;
    border: 2px solid var(--border-light);
    color: var(--text-dark);
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
}

.back-button:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
    transform: translateX(5px);
    box-shadow: var(--shadow-large);
}

.back-button i {
    font-size: 1.1rem;
    transition: var(--transition);
}

.back-button:hover i {
    transform: translateX(3px);
}

/* ==========================================
   هدر صفحه
========================================== */
.page-header {
    position: relative;
    padding: 140px 0 80px;
    text-align: center;
    z-index: 1;
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.03) 0%, transparent 100%);
}

.header-container {
    max-width: 900px;
    margin: 0 auto;
}

.header-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: 0 10px 40px rgba(220, 38, 38, 0.3);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 40px rgba(220, 38, 38, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 50px rgba(220, 38, 38, 0.4);
    }
}

.header-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.header-subtitle {
    font-size: 1.3rem;
    color: var(--text-gray);
    font-weight: 400;
    margin-bottom: 40px;
}

.header-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.ornament-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
}

.ornament-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-red);
    border-radius: 50%;
}

/* ==========================================
   محتوای اصلی
========================================== */
.main-content {
    position: relative;
    z-index: 1;
    padding: 60px 0;
}

/* ==========================================
   بخش معرفی
========================================== */
.intro-section {
    margin-bottom: 80px;
}

.intro-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 24px;
    padding: 50px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.intro-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-large);
    transform: translateY(-5px);
}

.intro-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.intro-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.intro-text {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--text-gray);
    text-align: justify;
    max-width: 1000px;
    margin: 0 auto;
}

/* ==========================================
   عنوان بخش‌ها
========================================== */
.section-title-wrapper {
    margin-bottom: 50px;
    text-align: center;
}

.title-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.3);
}

.title-badge i {
    font-size: 1.4rem;
}

/* ==========================================
   بخش رئیس هیئت علمی
========================================== */
.chairman-section {
    margin-bottom: 100px;
}

.chairman-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 24px;
    padding: 50px;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 50px;
    box-shadow: var(--shadow-large);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.chairman-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-red), var(--secondary-red));
}

.chairman-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

/* عکس رئیس */
.chairman-photo {
    position: relative;
}

.photo-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-large);
}

.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.chairman-card:hover .photo-wrapper img {
    transform: scale(1.05);
}

.photo-frame {
    position: absolute;
    top: -10px;
    right: -10px;
    bottom: -10px;
    left: -10px;
    border: 3px solid var(--primary-red);
    border-radius: 20px;
    pointer-events: none;
}

.photo-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* اطلاعات رئیس */
.chairman-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.chairman-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.chairman-position {
    font-size: 1.3rem;
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 20px;
}

.chairman-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px;
    background: var(--light-card);
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    color: var(--text-gray);
}

.detail-row i {
    width: 30px;
    color: var(--primary-red);
    font-size: 1.2rem;
}

.chairman-bio {
    padding: 25px;
    background: var(--light-card);
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.chairman-bio p {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-gray);
    text-align: justify;
}

.chairman-contact {
    margin-top: 10px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.3);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.4);
}

.contact-btn i {
    font-size: 1.2rem;
}

/* ==========================================
   بخش اعضای هیئت علمی
========================================== */
.members-section {
    margin-bottom: 100px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.member-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.member-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-large);
    transform: translateY(-10px);
}

/* عکس عضو */
.member-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.member-card:hover .member-photo img {
    transform: scale(1.1);
}

.member-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(239, 68, 68, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.member-card:hover .member-overlay {
    opacity: 1;
}

.view-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--primary-red);
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    transform: translateY(20px);
}

.member-card:hover .view-profile-btn {
    transform: translateY(0);
}

.view-profile-btn:hover {
    background: var(--primary-red);
    color: white;
    transform: scale(1.05);
}

/* اطلاعات عضو */
.member-info {
    padding: 25px;
}

.member-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.member-position {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.member-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.expertise-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary-red);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.member-education {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.member-education i {
    color: var(--primary-red);
}

/* ==========================================
   بخش آمار
========================================== */
.stats-section {
    margin-bottom: 80px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-box {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.stat-box:hover {
    border-color: var(--primary-red);
    box-shadow: var(--shadow-large);
    transform: translateY(-5px);
}

.stat-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-family: 'Arial', sans-serif;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* ==========================================
   فوتر
========================================== */
.page-footer {
    background: white;
    border-top: 2px solid var(--border-light);
    padding: 50px 0;
    margin-top: 80px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.footer-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.footer-text {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 10px;
    font-weight: 500;
}

.footer-copyright {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ==========================================
   مودال پروفایل
========================================== */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.profile-modal:not(.hidden) {
    opacity: 1;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--primary-red);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
}

.modal-close:hover {
    background: var(--primary-dark);
    transform: rotate(90deg);
}

.modal-content {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.modal-profile {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 0;
}

.modal-photo {
    background: var(--light-card);
}

.modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 50px;
}

.modal-name {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.modal-position {
    font-size: 1.2rem;
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.modal-section h3 i {
    color: var(--primary-red);
}

.modal-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.modal-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-expertise-tag {
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.hidden {
    display: none;
}

/* ==========================================
   ریسپانسیو
========================================== */

/* تبلت بزرگ */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }

    .chairman-card {
        grid-template-columns: 350px 1fr;
        gap: 40px;
        padding: 40px;
    }

    .members-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* تبلت */
@media (max-width: 992px) {
    .chairman-card {
        grid-template-columns: 1fr;
        padding: 35px;
    }

    .chairman-photo {
        max-width: 400px;
        margin: 0 auto;
    }

    .header-title {
        font-size: 3rem;
    }

    .modal-profile {
        grid-template-columns: 1fr;
    }

    .modal-photo {
        height: 400px;
    }

    .members-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* موبایل بزرگ */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .back-button {
        top: 20px;
        right: 20px;
        padding: 12px 20px;
    }

    .back-button span {
        display: none;
    }

    .page-header {
        padding: 120px 0 60px;
    }

    .header-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .header-title {
        font-size: 2.5rem;
    }

    .header-subtitle {
        font-size: 1.1rem;
    }

    .intro-card {
        padding: 35px;
    }

    .chairman-card {
        padding: 25px;
    }

    .chairman-name {
        font-size: 2rem;
    }

    .members-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .modal-container {
        width: 95%;
    }

    .modal-info {
        padding: 30px;
    }

    .footer-container {
        padding: 0 20px;
    }
}

/* موبایل کوچک */
@media (max-width: 480px) {
    .header-title {
        font-size: 2rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .intro-card {
        padding: 25px;
    }

    .intro-title {
        font-size: 1.6rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .chairman-card {
        padding: 20px;
    }

    .chairman-name {
        font-size: 1.7rem;
    }

    .chairman-position {
        font-size: 1.1rem;
    }

    .modal-info {
        padding: 25px;
    }

    .modal-name {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}