/* Slider */
.hero-slider {
    margin-top: 65px;
    position: relative;
    height: 550px;
    overflow: hidden;
    background-color: #000;
}

.slide {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.slide::before {
    content: '';
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background: rgba(12, 35, 64, 0.7);
}

.slide.active {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
}

.slider-control {
    position: absolute;
    top: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    transform: translateY(-50%);
    border: 2px solid var(--text-light);
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--primary-color);
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    transition: var(--transition);
}

.slider-control:hover,
.slider-control:focus-visible {
    background: var(--text-light);
    color: var(--primary-color);
    outline: none;
}

.slider-prev {
    right: 24px;
}

.slider-next {
    left: 24px;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-light);
    max-width: 800px;
    padding: 0 20px;
}

.slide-content h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 25px;
}

.director-slide::before {
    z-index: 0;
    background: url('../assets/Drkhalil.jpeg') center / cover no-repeat;
    filter: blur(12px) brightness(0.55);
    transform: scale(1.04);
}

.director-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: url('../assets/Drkhalil.jpeg') center / contain no-repeat;
}

.director-slide .slide-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-self: flex-end;
    width: min(900px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    margin-bottom: 16px;
    overflow: hidden;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 6px;
    background: rgba(8, 25, 43, 0.72);
    backdrop-filter: blur(3px);
}

.director-slide .slide-content h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.director-message {
    max-height: 5.2em;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.8;
    text-align: right;
    white-space: pre-line;
    margin-bottom: 0;
}

.director-slide.is-expanded .director-message {
    max-height: min(38vh, 250px);
    overflow-y: auto;
    padding-inline-end: 8px;
}

.director-read-more {
    border: 0;
    cursor: pointer;
    font: inherit;
}

/* Features Cards */
.features {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.about-slogan {
    max-width: 760px;
    margin: -18px auto 34px;
    color: var(--primary-color);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.8;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.card {
    background: var(--bg-gray);
    padding: 30px 20px;
    border-radius: 8px;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-bottom: 4px solid var(--accent-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card i {
    font-size: 40px;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card p {
    margin-bottom: 18px;
}

.card-link,
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 9px 18px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.card-link:hover,
.back-link:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.details-page {
    min-height: 70vh;
    padding: 125px 20px 70px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 48%, #f1eadc 100%);
}

.details-card {
    max-width: 980px;
    margin: 0 auto;
    padding: 42px;
    background: var(--text-light);
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(12, 35, 64, 0.12);
    text-align: right;
}

.details-icon {
    width: 66px;
    height: 66px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.16);
    color: var(--accent-color);
    font-size: 28px;
}

.details-card h1 {
    color: var(--primary-color);
    font-size: 36px;
    margin-bottom: 24px;
}

.details-content p {
    font-size: 18px;
    line-height: 2;
    margin-bottom: 18px;
}

.details-content h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin: 28px 0 10px;
}

.values-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.value-item {
    padding: 18px;
    border: 1px solid #e8e2d6;
    border-radius: 8px;
    background: #fffdf9;
}

.value-item h2 {
    font-size: 19px;
    margin-top: 0;
}

.value-item p {
    font-size: 16px;
    margin-bottom: 0;
}

.details-content blockquote {
    margin: 18px 0;
    padding: 18px 22px;
    border-right: 4px solid var(--accent-color);
    background: var(--bg-gray);
    color: var(--primary-color);
    font-size: 22px;
    font-weight: 700;
}

/* Tabs الاختصاصات */
.departments-section {
    background-color: var(--bg-gray);
    padding: 80px 20px;
    text-align: center;
}

.tabs-container {
    max-width: 800px;
    margin: 0 auto;
}

.tab-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 15px;
    margin-bottom: 30px;
}

.tab-menu li {
    padding: 10px 25px;
    background: var(--text-light);
    border: 1px solid #ddd;
    cursor: pointer;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
}

.tab-menu li.active-tab, .tab-menu li:hover {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
    background: var(--text-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: right;
}

.tab-content.active-content {
    display: block;
}

/* Modal النافذة المنبثقة */
/* الخلفية الشفافة التي تغطي الشاشة بالكامل */
.modal {
    display: none; /* يتم التحكم بالظهور عبر jQuery */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* خلفية داكنة شفافة */
    z-index: 2000; /* قيمة أعلى من الهيدر لضمان الظهور فوقه */
    
    /* استخدام Flexbox لضمان التوسط المثالي */
    /* display: flex; */
    justify-content: center;
    align-items: center;
    padding: 20px;
    
}

/* صندوق المودال الأبيض الداخلي */
.modal-box {
    background-color: #ffffff;
    width: 100%;
    max-width: 500px; /* العرض الأقصى للصندوق */
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    
    /* حركة دخول أنيقة من الأعلى */
    animation: slideDown 0.3s ease-out;
}

/* زر الإغلاق (✕) وتثبيته في زاوية الصندوق */
.close-modal {
    position: absolute;
    top: 15px;
    left: 15px; /* بما أن الموقع RTL، زر الإغلاق يكون على اليسار */
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #e74c3c; /* يتحول للأحمر عند تمرير الماوس */
}

/* تأثير حركة الدخول الأنيقة */
@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* توافق إضافي للموبايل الصغير جداً */
@media (max-width: 480px) {
    .modal-box {
        padding: 20px 15px;
    }
}

.form-group {
   margin-bottom: 15px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.submit-btn {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 12px 20px;
    width: 100%;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
}

.submit-btn:hover {
    background: var(--accent-color);
}
/* تنسيق صندوق الرسالة */
.error-message {
    color: #e74c3c; /* لون أحمر صريح للخطأ */
    font-size: 13px;
    font-weight: 600;
    margin-top: 5px;
    display: none; /* مخفي افتراضياً ويظهر فقط عند وجود خطأ */
}

/* تغيير لون حدود الحقل عندما يكون فيه خطأ ليعطي إشارة بصرية للطالب */
.form-group.has-error input,
.form-group.has-error select {
    border-color: #e74c3c !important;
    background-color: #fdf2f2;
}