﻿/* faculty-styles.css */

/* ==================== Faculty Page Styles ==================== */

/* Faculty Hero Section */
.faculty-hero {
    background: linear-gradient(135deg, var(--brand-color) 0%, #1e7e34 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

    .faculty-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
        opacity: 0.3;
    }

.faculty-hero-content {
    position: relative;
    z-index: 2;
}

.faculty-main-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.faculty-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.faculty-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    display: block;
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* ==================== تحسين فلتر البحث ==================== */

.faculty-filters {
    background: var(--box-color);
    border-bottom: 1px solid #dee2e6;
    position: relative;
    padding: 2rem 0;
}

.filter-container {
    background: var(--box-color);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    direction: rtl;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(40, 167, 69, 0.1);
}

/* تحسين مجموعة البحث */
.search-box {
    position: relative;
    max-width: 350px;
}

    .search-box .form-label {
        color: var(--brand-color);
        font-weight: 600;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.9rem;
        letter-spacing: 0.3px;
    }

.search-input {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #fafafa;
    direction: rtl;
    width: 100%;
    letter-spacing: 0.2px;
}

    .search-input:focus {
        border-color: var(--brand-color);
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
        background: var(--primaryColor);
        outline: none;
    }

    .search-input:focus-visible {
        outline: 2px solid var(--brand-color);
        outline-offset: 2px;
    }

    .search-input:hover {
        border-color: rgba(40, 167, 69, 0.4);
    }

    .search-input::placeholder {
        color: #6c757d;
        font-style: italic;
        font-size: 0.85rem;
    }

/* تحسين زر البحث */
.search-btn {
    background: var(--brand-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 44px;
    height: 44px; /* نفس ارتفاع حقل البحث */
    width: 44px; /* نفس ارتفاع حقل البحث */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-right: 0.5rem;
}

    .search-btn:hover {
        background: var(--bodyColor);
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3);
    }

    .search-btn:focus {
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
        outline: none;
    }

    .search-btn:focus-visible {
        outline: 2px solid var(--brand-color);
        outline-offset: 2px;
    }

    .search-btn i {
        font-size: 0.8rem;
        color: var(--primaryColor);
    }

/* تحسين فلتر الأقسام */
.department-filter .form-label {
    color: var(--brand-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.department-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    min-width: 180px;
    transition: all 0.3s ease;
    background: #fafafa;
    direction: rtl;
    font-size: 0.9rem;
    color: #495057;
    height: 44px;
    letter-spacing: 0.2px;
}

    .department-select:focus {
        border-color: var(--brand-color);
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
        background: white;
        outline: none;
    }

    .department-select:focus-visible {
        outline: 2px solid var(--brand-color);
        outline-offset: 2px;
    }

    .department-select:hover {
        border-color: rgba(40, 167, 69, 0.4);
    }

    .department-select option {
        padding: 0.5rem;
        color: #495057;
        background: white;
    }

        .department-select option:first-child {
            color: #6c757d;
            font-style: italic;
        }

/* تحسين زر إعادة التهيئة */
.reset-filters .btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 90px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

    .reset-filters .btn:hover {
        background: #5a6268;
        color: var(--primaryColor);
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(108, 117, 125, 0.3);
    }

    .reset-filters .btn:focus {
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
        outline: none;
    }

    .reset-filters .btn:focus-visible {
        outline: 2px solid var(--brand-color);
        outline-offset: 2px;
    }

    .reset-filters .btn i {
        font-size: 0.8rem;
    }

/* تحسين نتائج البحث */
.search-results {
    background: var(--brand-color);
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    margin-top: 1rem;
    text-align: start;
    animation: fadeInUp 0.3s ease-out;
}

    .search-results p {
        margin: 0;
        color: var(--primaryColor);
        font-weight: 500;
        font-size: 0.9rem;
    }

    .search-results strong {
        color: var(--forbidden-color);
        font-weight: 700;
    }

/* تحسين input group للبحث */
.input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

    .input-group .search-input {
        border-radius: 8px 0 0 8px;
        border-left: none;
    }

    .input-group .search-btn {
        border-radius: 0 8px 8px 0;
    }

    .input-group .search-input:focus {
        z-index: 3;
        border-left: 2px solid var(--brand-color);
    }

/* Faculty Cards */
.faculty-grid {
    background: #f8f9fa;
}

.faculty-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

    .faculty-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    }

.faculty-card-header {
    position: relative;
    overflow: hidden;
}

.faculty-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

    .faculty-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: all 0.3s ease;
    }

.faculty-card:hover .faculty-image img {
    transform: scale(1.1);
}

.faculty-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.8) 0%, rgba(30, 126, 52, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.faculty-card:hover .faculty-overlay {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: white;
    color: var(--brand-color);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

.faculty-card:hover .social-link {
    transform: translateY(0);
}

.social-link:hover {
    background: var(--brand-color);
    color: white;
    transform: scale(1.1);
}

.faculty-card-body {
    padding: 1.5rem;
    text-align: center;
}

.faculty-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.faculty-position {
    color: var(--brand-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.faculty-department {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.faculty-actions {
    margin-top: 1rem;
}

.btn-faculty-details {
    background: linear-gradient(135deg, var(--brand-color) 0%, #1e7e34 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-faculty-details:hover {
        background: linear-gradient(135deg, #1e7e34 0%, var(--brand-color) 100%);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    }

/* تحسين رسالة عدم وجود نتائج */
.no-results {
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 2rem 0;
    text-align: center;
}

.no-results-icon {
    margin-bottom: 1rem;
}

    .no-results-icon i {
        font-size: 3rem !important;
        color: #6c757d;
    }

.no-results-title {
    color: #495057;
    margin-bottom: 0.8rem;
    font-weight: 600;
    font-size: 1.2rem;
}

.no-results-text {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* تحسين spinner التحميل */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(255,255,255,0.95);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
}

/* Faculty Details Page */
.faculty-details-hero {
    background: linear-gradient(135deg, var(--brand-color) 0%, #1e7e34 100%);
    color: white;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.faculty-profile-image {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

    .faculty-profile-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.faculty-details-info {
    padding-right: 2rem;
}

.faculty-details-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.faculty-details-position {
    font-size: 1.5rem;
    color: #a8d8a8;
    margin-bottom: 0.5rem;
}

.faculty-details-department {
    font-size: 1.25rem;
    color: #c8e6c8;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faculty-contact-info {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

    .contact-item i {
        color: #a8d8a8;
    }

    .contact-item a {
        color: white;
        text-decoration: none;
    }

        .contact-item a:hover {
            text-decoration: underline;
        }

.faculty-social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-link-details {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

    .social-link-details:hover {
        background: rgba(255,255,255,0.2);
        color: white;
        transform: translateY(-2px);
    }

/* Faculty Details Content */
.faculty-details-content {
    background: #f8f9fa;
}

.faculty-details-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

    .faculty-details-card .card-header {
        background: linear-gradient(135deg, var(--brand-color) 0%, #1e7e34 100%);
        color: white;
        padding: 1.5rem;
        border: none;
    }

        .faculty-details-card .card-header h3 {
            margin: 0;
            font-weight: 700;
        }

    .faculty-details-card .card-body {
        padding: 2rem;
    }

.info-group {
    margin-bottom: 1.5rem;
}

    .info-group label {
        display: block;
        font-weight: 600;
        color: #495057;
        margin-bottom: 0.5rem;
    }

    .info-group span {
        display: block;
        color: #6c757d;
        font-size: 1rem;
    }

    .info-group a {
        color: var(--brand-color);
        text-decoration: none;
    }

        .info-group a:hover {
            text-decoration: underline;
        }

/* Back Button */
.btn-back-to-list {
    background: var(--brand-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-back-to-list:hover {
        background: #1e7e34;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    }

/* Related Faculty Section */
.related-faculty {
    background: linear-gradient(135deg, #f8f9fa 0%, white 100%);
    position: relative;
}

    .related-faculty::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="lines" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 40" fill="none" stroke="rgba(40,167,69,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23lines)"/></svg>');
        opacity: 0.3;
    }

    .related-faculty .container {
        position: relative;
        z-index: 2;
    }

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    position: relative;
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        background: var(--brand-color);
        border-radius: 3px;
    }

/* زر التفاصيل للتصميم الجديد */
.faculty-details-btn {
    text-align: center;
}

    .faculty-details-btn .btn {
        background: linear-gradient(135deg, var(--brand-color) 0%, #1e7e34 100%);
        color: white;
        border: 1px solid var(--brand-color);
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
    }

        .faculty-details-btn .btn:hover {
            background: linear-gradient(135deg, #1e7e34 0%, var(--brand-color) 100%);
            color: var(--body-color);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
            border-color: #1e7e34;
        }

        .faculty-details-btn .btn i {
            font-size: 0.9rem;
        }

/* تحسين على التصميم الموجود */
.team .box {
    transition: all 0.3s ease;
}

    .team .box:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }

.team .team-img {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

    .team .team-img img {
        transition: all 0.3s ease;
    }

.team .box:hover .team-img img {
    transform: scale(1.05);
}

/* تحسين الـ social icons */
.team .social-icons {
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

    .team .social-icons a {
        transition: all 0.3s ease;
    }

        .team .social-icons a:hover {
            transform: translateY(-2px);
        }

/* Enhanced Button Styling */
.btn-nav {
    background: linear-gradient(135deg, var(--brand-color) 0%, #1e7e34 100%);
    color: var(--primaryColor);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

    .btn-nav:hover {
        background: linear-gradient(135deg, #1e7e34 0%, var(--brand-color) 100%);
        color: var(--primaryColor);
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(40, 167, 69, 0.3);
    }

    .btn-nav:active {
        transform: translateY(0);
    }

/* ==================== تحسينات responsive ==================== */
@media (max-width: 768px) {
    .faculty-main-title {
        font-size: 2.5rem;
    }

    .faculty-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .faculty-filters {
        padding: 1.5rem 0;
    }

    .filter-container {
        padding: 1.2rem;
        border-radius: 12px;
    }

        .filter-container form {
            flex-direction: column;
            align-items: stretch !important;
            gap: 1rem;
        }

    .search-box {
        max-width: none;
        margin-bottom: 0;
    }

    .department-filter {
        margin-bottom: 0;
    }

    .department-select {
        min-width: auto;
        width: 100%;
    }

    .search-results {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
        margin-top: 1rem;
    }

    /* تحسين الأزرار للموبايل */
    .search-btn,
    .reset-filters .btn {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .faculty-details-name {
        font-size: 2rem;
    }

    .faculty-details-position {
        font-size: 1.25rem;
    }

    .faculty-details-department {
        font-size: 1.1rem;
    }

    .faculty-details-info {
        padding-right: 0;
        margin-top: 2rem;
        text-align: center;
    }

    .faculty-profile-image {
        width: 250px;
        height: 250px;
    }

    .faculty-social-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .faculty-main-title {
        font-size: 2rem;
    }

    .faculty-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .faculty-card-body {
        padding: 1rem;
    }

    .faculty-profile-image {
        width: 200px;
        height: 200px;
    }

    .social-link-details {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .filter-container {
        padding: 1rem;
        border-radius: 10px;
    }

    .search-box .form-label,
    .department-filter .form-label {
        font-size: 0.85rem;
    }

    .search-input,
    .department-select {
        padding: 0.55rem 0.8rem;
        font-size: 0.85rem;
        height: 40px;
    }

    .search-btn,
    .reset-filters .btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
        height: 40px;
    }

    .no-results {
        padding: 2rem 1rem;
    }

    .no-results-icon i {
        font-size: 2.5rem !important;
    }

    .no-results-title {
        font-size: 1.1rem;
    }

    .no-results-text {
        font-size: 0.9rem;
    }
}

.team .education {
    margin-top: .1rem;
}


/* ==================== Animations ==================== */
.filter-container {
    animation: slideInDown 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
