/* =========================================
   Department Detail Page - Reference Design
   ========================================= */

/* Hero Banner */
.dept-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
    position: relative;
    padding: 50px 0;
    margin-bottom: 0;
    overflow: hidden;
}

.dept-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    color: white;
}

.hero-info {
    flex: 1;
    text-align: start;
}

.dept-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-light);
    text-align: start;
}

.dept-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 25px;
    color: white;
}

.hero-contact {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.contact-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.contact-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-badge i {
    color: var(--bg-primary);
    font-size: 1.1rem;
}

.website-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 18px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.website-link i {
    color: var(--bg-primary);
}

.hero-logo {
    flex-shrink: 0;
}

.hero-logo img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 6px solid var(--bg-primary);
    box-shadow: 0 10px 40px rgba(163, 134, 111, 0.3);
    object-fit: contain;
    background: white;
    padding: 5px;
}

.logo-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--primary);
    border: 6px solid var(--bg-primary);
    box-shadow: 0 10px 40px rgba(163, 134, 111, 0.3);
}

/* Department Tabs */
.dept-tabs {
    background: var(--bg-secondary);
    border-bottom: 3px solid var(--border-color);
    position: sticky;
    top: 60px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.dept-tabs .container {
    display: flex;
    gap: 0;
    padding: 0;
}

.tab-btn {
    flex: 1;
    padding: 20px 25px;
    background: white;
    border: none;
    border-left: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    font-family: 'Cairo', sans-serif;
}

.tab-btn:first-child {
    border-left: none;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary-dark);
}

.tab-btn.active {
    color: var(--primary-dark);
    background: white;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-btn i {
    font-size: 1.2rem;
}

/* Container */
.dept-container {
    padding: 40px 0;
    background: var(--bg-secondary);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Card */
.section-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.section-header h2 {
    font-size: 1.6rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-header h2 i {
    color: var(--secondary);
    font-size: 1.4rem;
}

/* Director Card */
.director-section {
    background: white;
    border-left: 4px solid var(--primary);
}

.director-card {
    display: flex;
    gap: 35px;
    align-items: center;
}

.director-avatar {
    flex-shrink: 0;
}

.director-avatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 8px 25px rgba(163, 134, 111, 0.2);
}

.avatar-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.director-details h3 {
    font-size: 1.7rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.director-position {
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
    padding: 5px 15px;
    background: rgba(44, 95, 121, 0.1);
    border-radius: 20px;
}

.director-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-item i {
    color: var(--secondary);
    width: 22px;
    font-size: 1rem;
}

/* Description Content */
.description-content {
    line-height: 1.9;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.description-content p {
    margin-bottom: 15px;
}

/* Employees Grid */
.employees-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.employee-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: start;
    transition: var(--transition);
    border-left: 4px solid var(--primary);
}

.employee-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.employee-avatar {
    flex-shrink: 0;
}

.employee-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.employee-avatar .avatar-placeholder {
    width: 90px;
    height: 90px;
    font-size: 2rem;
    border: 3px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--primary-dark);
}

.employee-info {
    flex: 1;
}

.employee-info h4 {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.employee-position {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: block;
}

.employee-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.employee-contact .contact-item {
    font-size: 0.8rem;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.news-image {
    height: 200px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.08);
}

.news-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 3rem;
}

.news-body {
    padding: 20px;
}

.news-body h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.news-body h3 a {
    color: var(--primary-dark);
    transition: color 0.3s ease;
}

.news-body h3 a:hover {
    color: var(--secondary);
}

.news-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4.5rem;
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-info {
        text-align: center;
    }
    
    .hero-contact {
        align-items: center;
    }
    
    .hero-logo img {
        width: 150px;
        height: 150px;
    }
    
    .dept-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .director-card {
        flex-direction: column;
        text-align: center;
    }
    
    .director-contact {
        align-items: center;
    }
    
    .employees-grid {
        grid-template-columns: 1fr;
    }
    
    .employee-card {
        flex-direction: column;
        text-align: center;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .dept-tabs .container {
        flex-direction: column;
    }
    
    .tab-btn {
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* RTL Support */
.rtl .hero-content {
    direction: rtl;
}

.rtl .hero-info {
    text-align: start;
}

.rtl .contact-item {
    direction: rtl;
}

.rtl .section-header h2 {
    direction: rtl;
}

.rtl .employee-card {
    text-align: start;
}

.rtl .director-section {
    border-left: none;
    border-right: 4px solid var(--primary);
}

.rtl .employee-card {
    border-left: none;
    border-right: 4px solid var(--primary);
}

.rtl .employee-card:hover {
    border-left-color: transparent;
    border-right-color: var(--primary);
}
