.department-faculties {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.depart-content {
    display: flex;
    flex-direction: row;
    align-items: start;
    justify-content: center;
    width: 100%;
    gap: 10px;
    margin-top: 1rem;
}

.depart-toggle {
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 2px;
}

.depart-toggle a {
    padding: 8px 5px;
    background: var(--light-gray);
    color: var(--dark-color);
    width: 100%;
    text-decoration: none;
}

.depart-toggle a:hover {
    background: var(--dark-color);
    color: var(--light-gray);
}

.depart-box {
    width: 70%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
}

.depart-card {
    width: 100%;
    margin-bottom: 1rem;
}

.card-header {
    background: var(--dark-color);
    color: var(--light-gray);
    width: 100%;
    padding: 0.5rem;
}

.faculties {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    position: relative;
}

.main-card-wrapper {
    overflow: hidden;
    position: relative;
    padding: 1rem;
}

.main-card {
    display: flex;
    gap: 1rem;
    transition: transform 0.5s ease-in-out;
    white-space: nowrap;
}

.card {
    background: var(--white-color);
    border-radius: 12px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
    text-align: center;
    flex: 0 0 calc(45% - 1rem);
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
}

.card-title{
    background: #f8f9fa;
    width: 100%;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
}

.card-title .img {
    height: 80px;
    width: 80px;
    border-radius: 50%;
}

.card-title .img img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.card-title .name {
    font-size: 20px;
    font-weight: 500;
    word-break: break-word;
}

.card-title .job {
    font-size: 15px;
    color: #FF676D;
    word-break: break-word;
}

.name-design{
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
}

.card-details{
    font-size: 13px;
    padding: 20px 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 5px;
    color: var(--dark-color);
    text-align: left;
    padding: 10px;
    border-radius: 0 0 12px 12px;
}

.card-details tbody tr td, .card-details tbody tr th{ word-break: break-word;}
.card-details tbody tr td{ padding: 4px; }
.card-details tbody tr td:nth-child(1){
    display: flex;
    justify-content: start;
}

.card-details tbody tr td:nth-child(2){
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 200px;
}

.nav-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.nav-btns button {
    padding: 8px 16px;
    font-size: 16px;
    border: none;
    background: var(--dark-color);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.nav-btns button:disabled {
    background: #999;
    cursor: not-allowed;
}

.department-about,
.syllabus-box,
.gallery-box{ 
    padding: 1rem; 
    text-align: justify;
}


.gallery-box{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: start;
    gap: 5px;
}

.gallery-box img{
    width: 100%;
    height: 100%;
    max-width: 18vw;
    max-height: 18vw;
    object-fit: contain;
    aspect-ratio: 3/1.6;
}


@media (max-width: 1330px){
    .department{ margin: 0 2%; }
}

@media (max-width: 500px){
    .depart-content{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .depart-toggle, .depart-box{ width: 100%; }
    .department-header{ 
        text-align: center;
        width: 100%;
        font-size: 1rem; 
        padding: 0.5rem;
    }

    .gallery-box img{
        max-width: 30vw;
        max-height: 30vw;
    }
}


@media (max-width: 1265px) {
    .card .card-details{ font-size: 1vw; }
    .card { flex: 0 0 calc(50% - 0.5rem); }
}

@media (max-width: 900px){ 
    .card .img {
        height: 110px;
        width: 110px;
        margin: 8px 30px;
    }
    .card { flex: 0 0 calc(65% - 0.5rem); }
    .card .card-details{ font-size: 12px;} 
}

@media (max-width: 780px) {
    .card .img {
        height: 80px;
        width: 80px;
    }
    .card { flex: 0 0 100%; } /* Show 1 card */
}

