/* Departments Page Styles */
.iw-departments-page {
    font-family: 'Philosopher', sans-serif;
    background: linear-gradient(135deg, #234e52 0%, #1a3c3f 100%);
    min-height: 100vh;
}

.iw-departments-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Sticky Navigation */
.iw-departments-nav {
    position: sticky;
    top: 0;
    background: rgba(35, 78, 82, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #d4a373;
    z-index: 1000;
    padding: 15px 0;
}

.iw-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

.iw-department-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
    flex-wrap: wrap;
}

.iw-nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.iw-nav-link:hover {
    background: #d4a373;
    color: #234e52;
    transform: translateY(-2px);
}

.iw-enroll-btn {
    background: linear-gradient(45deg, #7f1102, #a33a2a);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #d4a373;
}

.iw-enroll-btn:hover {
    background: linear-gradient(45deg, #d4a373, #e6b88a);
    color: #234e52;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 163, 115, 0.4);
}

/* Mobile Toggle Button */
.iw-mobile-toggle {
    display: none;
    background: transparent;
    border: 2px solid #d4a373;
    border-radius: 8px;
    width: 45px;
    height: 45px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
}

.iw-mobile-toggle:hover {
    background: rgba(212, 163, 115, 0.1);
    transform: scale(1.05);
}

.iw-mobile-toggle span {
    display: block;
    height: 3px;
    width: 25px;
    background: #d4a373;
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.iw-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.iw-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.iw-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Main Content */
.iw-departments-main {
    padding: 40px 0;
}

.iw-department-section {
    background: white;
    margin: 40px 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid #d4a373;
}

.iw-department-header {
    background: linear-gradient(135deg, #234e52, #2c5d62);
    padding: 30px;
    text-align: center;
    border-bottom: 3px solid #d4a373;
}

.iw-department-title-arabic {
    font-family: 'Amiri', serif;
    font-size: 2.5em;
    color: #d4a373;
    margin: 0 0 10px 0;
    font-weight: bold;
}

.iw-department-title-english {
    font-size: 1.8em;
    color: white;
    margin: 0;
    font-weight: normal;
}

.iw-department-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding: 30px;
    align-items: start;
}

.iw-department-image {
    text-align: center;
}

.iw-department-image img {
    width: 100%;
    max-width: 450px;
    height: 800px;
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid #a3be8c;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.iw-department-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.iw-department-intro h3 {
    color: #234e52;
    font-size: 1.5em;
    margin-bottom: 15px;
    border-bottom: 2px solid #d4a373;
    padding-bottom: 5px;
}

.iw-department-intro p {
    line-height: 1.8;
    color: #333;
    font-size: 1.1em;
}

.iw-books-section h3 {
    color: #234e52;
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 2px solid #7f1102;
    padding-bottom: 5px;
}

.iw-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.iw-book-item {
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #a3be8c;
    text-align: center;
}

.iw-book-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: #d4a373;
}

.iw-book-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid #a3be8c;
}

.iw-book-info {
    padding: 15px;
}

.iw-book-info h4 {
    color: #234e52;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.iw-book-info p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .iw-department-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .iw-department-image img {
        max-width: 350px;
        height: 600px;
    }
    
    .iw-nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .iw-department-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .iw-departments-container {
        padding: 0 15px;
    }
    
    .iw-nav-container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    /* Mobile Toggle Styles */
    .iw-mobile-toggle {
        display: flex;
    }
    
    .iw-department-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(35, 78, 82, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-radius: 0 0 15px 15px;
        border-top: 2px solid #d4a373;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        gap: 15px;
        z-index: 1001;
    }
    
    .iw-department-links.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    .iw-nav-link {
        text-align: center;
        padding: 12px 20px;
        font-size: 16px;
        border: 1px solid rgba(212, 163, 115, 0.3);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .iw-nav-link:hover {
        background: #d4a373;
        color: #234e52;
        transform: translateX(5px);
    }
    
    .iw-enroll-btn {
        margin-top: 10px;
        text-align: center;
        display: block;
        width: 100%;
    }
    
    .iw-department-title-arabic {
        font-size: 2em;
    }
    
    .iw-department-title-english {
        font-size: 1.5em;
    }
    
    .iw-department-header {
        padding: 20px;
    }
    
    .iw-department-content {
        padding: 20px;
    }
    
    .iw-department-image img {
        max-width: 280px;
        height: 500px;
    }
    
    .iw-books-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .iw-book-item img {
        height: 150px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .iw-department-image img {
        max-width: 200px;
        height: 350px;
    }
    
    .iw-books-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .iw-book-info {
        padding: 10px;
    }
    
    .iw-book-info h4 {
        font-size: 1em;
    }
    
    .iw-book-info p {
        font-size: 0.8em;
    }
    
    .iw-department-title-arabic {
        font-size: 1.5em;
    }
    
    .iw-department-title-english {
        font-size: 1.2em;
    }
    
    .iw-mobile-toggle {
        width: 40px;
        height: 40px;
    }
    
    .iw-mobile-toggle span {
        width: 22px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Active nav link highlight */
.iw-nav-link.active {
    background: #d4a373;
    color: #234e52;
}