/* ====================================
   DEPARTMENT PAGE STYLES - REDESIGNED
   ==================================== */

.container {
    width: 85%;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.content {
    width: 75%;
    flex: 1;
}

/* Cover Photo */
.content-cover-photo {
    width: 100%;
    height: 450px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    margin-bottom: 30px;
}

.content-cover-photo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(46, 80, 119, 0.7), transparent);
    pointer-events: none;
}

.content-cover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.content-cover-photo:hover img {
    transform: scale(1.05);
}

/* Department Heading */
.department-heading {
    padding: 0 0 20px 0;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--border-light);
    position: relative;
}

.department-heading::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.department-heading p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.department-heading span {
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* Underline - Deprecated in favor of ::after */
.underline {
    display: none;
}

.broad-underline,
.thin-underline {
    display: none;
}

/* Department Content */
.department-content {
    padding-bottom: 20px;
    transition: var(--transition);
}

#dept-staffProfile {
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
}

/* About Department */
.about-department {
    padding-bottom: 20px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
}

.about-dept-heading {
    font-size: 20px;
    color: var(--primary-color);
    font-family: 'Poppins-Medium', sans-serif;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-dept-heading::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
    border-radius: 4px;
}

.about-dept-desc {
    font-size: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
    color: var(--text-primary);
    line-height: 1.8;
}

/* Programme Cards */
.about-dept-programmes {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.about-dept-programmes:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.about-dept-programmes:last-child {
    margin-bottom: 0;
}

.dept-programmes-heading {
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 18px;
    padding-bottom: 16px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-light);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dept-programmes-heading button {
    border: none;
    background: var(--secondary-light);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.dept-programmes-heading button:hover {
    background: var(--secondary-color);
    transform: rotate(180deg);
}

.programmes {
    padding-top: 16px;
    height: 0;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.programmes li {
    margin-bottom: 12px;
    padding-left: 8px;
    position: relative;
}

.programmes li::before {
    content: '▸';
    position: absolute;
    left: -8px;
    color: var(--accent-color);
}

.programme {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--background);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--secondary-color);
}

.programme-description {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    line-height: 1.7;
}

.programme b {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
}

/* Right Sidebar */
.dept-right-menu-bar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.dept-right-menu-bar-content-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dept-right-menu-bar-content-box:hover {
    box-shadow: var(--shadow-md);
}

.dept-right-menu-bar-content-box:last-child {
    margin-bottom: 0;
}

.dept-right-menu-heading {
    font-size: 18px;
    font-family: 'Poppins-Medium', sans-serif;
    color: var(--primary-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
    font-weight: 600;
}

.dept-right-menu-links {
    padding: 0;
}

.dept-right-menu-links a {
    color: var(--text-primary);
    margin: 0;
    padding: 12px 16px;
    display: block;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-size: 14px;
    position: relative;
    padding-left: 28px;
}

.dept-right-menu-links a::before {
    content: '→';
    position: absolute;
    left: 12px;
    opacity: 0;
    transition: var(--transition);
    color: var(--secondary-color);
}

.dept-right-menu-links a:hover {
    background: var(--background);
    color: var(--primary-color);
    padding-left: 32px;
}

.dept-right-menu-links a:hover::before {
    opacity: 1;
    left: 16px;
}

/* Staff Profiles */
.dept-staff-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.staff-profile {
    display: flex;
    flex-direction: row;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.staff-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.staff-profile:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.staff-profile:hover::before {
    transform: scaleY(1);
}

@keyframes load-staff {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.staff-profile {
    animation: load-staff 0.4s ease-out backwards;
}

.staff-photo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
    border-radius: 50%;
    border: 4px solid var(--secondary-light);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.staff-profile:hover .staff-photo {
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.staff-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.staff-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.staff-text p {
    margin: 0;
}

.staff-name {
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.staff-designation {
    padding: 0 0 8px 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 14px;
}

.staff-view-profile {
    color: var(--accent-color);
    text-decoration: none;
    font-family: 'Poppins-Regular', sans-serif;
    transition: var(--transition);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
    padding: 0;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.staff-view-profile::after {
    content: '→';
    transition: var(--transition);
}

.staff-view-profile:hover {
    color: var(--primary-color);
}

.staff-view-profile:hover::after {
    transform: translateX(4px);
}

/* Staff Profile Modal */
.staffProfileContainer {
    width: 100%;
    height: 100vh;
    background-color: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(8px);
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes showContainer {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.staffProfileWrapper {
    width: 100%;
    max-width: 900px;
    background: var(--surface);
    padding: 32px;
    margin: auto;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-xl);
    max-height: 90vh;
    overflow: auto;
    animation: showContainer 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.staffProfileBox {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.staffProfileHeader {
    display: flex;
    flex-direction: row;
    position: relative;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-light);
}

.staffName {
    font-family: 'Poppins-Medium', sans-serif;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 600;
}

.staffDesignation {
    color: var(--text-secondary);
    margin: 0 0 4px 0;
    font-style: italic;
}

.staffEmail {
    color: var(--accent-color);
    margin: 0;
    font-size: 14px;
}

.staffProfileImage {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--secondary-light);
    box-shadow: var(--shadow-md);
    margin-right: 24px;
    flex-shrink: 0;
}

.staffProfileImage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.staffProfileAttribute {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.staffProfileAttribute:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.attributeHeading {
    font-family: 'Poppins-Medium', sans-serif;
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.attributeHeading::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.attributeList {
    padding-left: 20px;
}

.attributeList li {
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.6;
}

.attributeList li:last-child {
    margin-bottom: 0;
}

.staffProfileFooter {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 20px;
    border-top: 2px solid var(--border-light);
}

.staffProfileFooter .footerItem {
    width: fit-content;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
    border-radius: var(--radius-md);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.staffProfileFooter .footerItem:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.footerItem a {
    color: var(--white);
    text-transform: uppercase;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.staffProfileClose {
    position: absolute;
    right: 0;
    top: 0;
    border: none;
    background: var(--danger);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.staffProfileClose:hover {
    background: #c82333;
    transform: rotate(90deg);
}

/* Programme Syllabus */
.programmeSyllabus a {
    color: var(--primary-color);
    font-size: 16px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.programmeSyllabus a::after {
    content: '↗';
    transition: var(--transition);
}

.programmeSyllabus a:hover {
    color: var(--accent-color);
}

.programmeSyllabus a:hover::after {
    transform: translate(2px, -2px);
}

.programmeHeading {
    font-family: 'Poppins-Medium', sans-serif;
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
}

.programmeDescription {
    text-align: justify;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Tables */
.project-table-container {
    width: 100%;
    overflow: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
}

.project-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

.project-table tr {
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.project-table tr:hover {
    background: var(--background);
}

.project-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.project-table th,
.project-table td {
    padding: 16px 20px;
    text-align: left;
    border: none;
    font-size: 14px;
}

.project-table td {
    color: var(--text-primary);
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}



.project-link:hover {
    color: var(--accent-color);
}

.project-link:hover::after {
    transform: translateX(4px);
}

/* Association Member Table */
.association-member-table-container {
    width: 100%;
    overflow: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
}

.association-member-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

.association-member-table tr {
    border-bottom: 1px solid var(--border);
}

.association-member-table tr:hover {
    background: var(--background);
}

.association-member-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.association-member-table th,
.association-member-table td {
    padding: 14px 18px;
    text-align: left;
    border: none;
}

/* Department Contacts Table */
.department-contacts-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.department-contacts-table tr {
    border-bottom: 1px solid var(--border);
}

.department-contacts-table tr:hover {
    background: var(--background);
}

.department-contacts-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.department-contacts-table th,
.department-contacts-table td {
    padding: 14px 18px;
    text-align: left;
    border: none;
}

/* Department Events */
.dept-events-heading {
    font-size: 22px;
    color: var(--primary-color);
    padding-bottom: 12px;
    padding-top: 20px;
    font-weight: 600;
    font-family: 'Poppins-Medium', sans-serif;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 20px;
}

.dept-events {
    overflow-x: auto;
    overflow-y: hidden;
}

.dept-events::-webkit-scrollbar {
    display: none;
}

.dept-events::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 4px;
}

.dept-events::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

.dept-events::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.dept-events-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 24px;
}

.dept-events-item {
    width: 380px;
    height: 480px;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dept-events-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.dept-events-item .img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.dept-events-item .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.dept-events-item:hover .img img {
    transform: scale(1.1);
}

.dept-events-item .img .label {
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, var(--accent-color), #5aa4b4);
    color: var(--white);
    padding: 12px 20px;
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
    border-top-right-radius: var(--radius-md);
}

.dept-events-item .full-label {
    background: var(--accent-color);
    width: 100%;
    height: 4px;
}

.dept-events-item .txt-box2 {
    padding: 20px;
    line-height: 1.7;
}

.dept-events-item .txt-box2 a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
}

.txt-box2 a:hover {
    color: var(--accent-color);
}

.dept-events-item .txt-box2 p {
    font-size: 14px;
    text-align: justify;
    color: var(--text-secondary);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* read more button */


 .read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.read-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.read-more-btn:hover::before {
    left: 100%;
}

.read-more-btn::after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.read-more-btn:hover::after {
    transform: translateX(4px);
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

@media (max-width: 1200px) and (min-width: 768px) {
    .container {
        width: 95%;
    }
    
    .dept-staff-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .container,
    .content {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
    }

    .container {
        margin: 0;
        padding: 0;
        gap: 0;
    }

    .content {
        padding: 0;
        width: 100%;
    }

    .dept-right-menu-bar {
        display: none;
    }

    .content-cover-photo {
        height: 250px;
        border-radius: 0;
    }

    .department-content {
        padding: 0 16px;
    }

    .department-heading {
        padding: 16px;
    }

    .department-heading p {
        font-size: 14px;
    }

    .department-heading span {
        font-size: 24px;
    }

    .department-contacts-table {
        font-size: 12px;
    }

    .department-contacts-table th,
    .department-contacts-table td {
        padding: 10px;
    }

    .association-member-table-container {
        overflow: auto;
    }

    .association-member-table {
        min-width: 400px;
        font-size: 12px;
    }

    .dept-staff-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .staff-profile {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .staff-photo {
        margin: 0 0 16px 0;
    }

    .staff-text p {
        text-align: center;
    }

    .staffProfileWrapper {
        width: 95%;
        max-height: 85vh;
        padding: 20px;
    }

    .staffProfileHeader {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .staffProfileImage {
        margin-right: 0;
        margin-bottom: 16px;
    }

    .staffProfileFooter {
        flex-direction: column;
        gap: 10px;
    }

    .staffProfileFooter .footerItem {
        width: 100%;
        text-align: center;
    }

    .project-table {
        font-size: 12px;
    }

    .project-table th,
    .project-table td {
        padding: 10px;
    }

    .dept-events-item {
        width: 320px;
    }

    .about-dept-programmes {
        padding: 16px;
    }
}