/* Department Pages Design System */

/* Hero Section with Parallax and Glassmorphism */
.dept-hero {
    height: 70vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
    background-color: #000;
}

.dept-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: transform 0.5s ease-out;
    filter: brightness(0.6);
}

.dept-hero:hover .dept-hero-bg {
    transform: scale(1.0);
}

.dept-hero-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    max-width: 800px;
}

.dept-hero h1 {
    font-family: var(--heading-font);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(45deg, #ffffff, #d48300);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glass Cards with Magnetic Hover */
.glass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.glass-card {
    background: white;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-maroon);
    transition: width 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(128, 0, 0, 0.1);
}

.glass-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.glass-card i {
    font-size: 3.5rem;
    color: var(--primary-maroon);
    margin-bottom: 25px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.glass-card:hover i {
    transform: rotate(15deg) scale(1.2);
    color: var(--primary-orange);
}

/* Animated Highlight Bars */
.highlight-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
}

.highlight-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-maroon), var(--primary-orange));
    width: 0;
    transition: width 1.5s cubic-bezier(0.1, 0.7, 1.0, 0.1);
}

/* Faculty Grid & Cards */
.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.faculty-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.faculty-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 40px rgba(128, 0, 0, 0.15);
    border-color: var(--primary-orange);
}

.faculty-img {
    height: 250px;
    background: #eee;
    position: relative;
}

.faculty-img img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.faculty-card:hover .faculty-img img {
    transform: scale(1.1);
}

.faculty-info {
    padding: 25px;
    text-align: center;
}

.faculty-info h4 {
    color: var(--primary-maroon);
    font-size: 1.4rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.faculty-info p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* Enhanced Footer Styles */
.dept-footer {
    display: block !important;
    /* Override global footer hidden style */
    background: var(--primary-maroon);
    background: linear-gradient(to bottom, #4a0e0e, #2d0808);
    color: white;
    padding: 80px 0 30px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    color: var(--primary-orange);
    font-size: 1.5rem;
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-orange);
}

.footer-col p {
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 15px;
}

.footer-col .icon-text {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-col .icon-text i {
    color: var(--primary-orange);
    margin-top: 5px;
}

.mail-us-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-orange);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background 0.3s ease;
    font-weight: 600;
}

.mail-us-btn:hover {
    background: #e69100;
}

/* Lab Section */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.lab-item {
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.lab-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.5s ease;
    filter: brightness(0.9);
}

.lab-item:hover img {
    transform: scale(1.1) rotate(1deg);
    filter: brightness(1.1);
}

.lab-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    transition: 0.75s;
    z-index: 4;
}

.lab-item:hover::after {
    left: 125%;
}

.lab-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    color: white;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 3;
}

.lab-item:hover .lab-overlay {
    opacity: 1;
    transform: translateY(0);
}

.lab-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--primary-orange);
}

.lab-overlay p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}



.lab-item:hover .lab-overlay {
    opacity: 1;
}

/* Animations Extension */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Aim Section Styles */
.aim-section {
    background: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.aim-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.aim-icon {
    font-size: 3rem;
    color: var(--primary-orange);
    margin-bottom: 20px;
    opacity: 0.2;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.aim-text {
    font-size: 1.8rem;
    font-family: var(--body-font);
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.5;
    font-weight: 400;
}

/* Stats Dashboard (Premium Layout) */
.stats-dashboard {
    background: var(--primary-maroon);
    background: linear-gradient(135deg, #800000 0%, #4a0e0e 100%);
    padding: 60px 0;
    margin: 40px 0;
    color: white;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.dashboard-item h2 {
    font-size: 3.5rem;
    color: var(--primary-orange);
    margin-bottom: 5px;
    font-weight: 700;
}

.dashboard-item p {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
}

/* Unique HOD Signature Layout */
.hod-signature-section {
    padding: 120px 0;
    background: #f9f9f9;
    position: relative;
    overflow: hidden;
}

.hod-flex {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hod-vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 5rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.03);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    pointer-events: none;
    text-transform: uppercase;
}

.hod-image-wrapper {
    flex: 1;
    position: relative;
    padding: 20px;
}

/* Removed hod-image-bg (marked red card) */
.hod-image-bg {
    display: none;
}

.hod-image-wrapper img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 30px;
    position: relative;
    z-index: 2;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.2);
    filter: grayscale(20%);
    transition: filter 0.5s ease;
}

.hod-image-wrapper:hover img {
    filter: grayscale(0%);
}

.hod-content {
    flex: 1.5;
}

.hod-quote {
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 30px;
    position: relative;
    padding-left: 40px;
}

.hod-quote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -20px;
    font-size: 5rem;
    color: var(--primary-orange);
    opacity: 0.3;
}

.hod-identity {
    border-left: 4px solid var(--primary-orange);
    padding-left: 20px;
}

.hod-identity h3 {
    font-size: 2rem;
    color: var(--primary-maroon);
    margin-bottom: 5px;
    font-weight: 700;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hod-flex {
        flex-direction: column;
        gap: 40px;
    }

    .hod-vertical-text {
        display: none;
    }

    .hod-image-wrapper img {
        height: 400px;
    }
}

/* =============================================================
   MOBILE RESPONSIVE OVERRIDES (max-width: 768px)
   ============================================================= */
@media (max-width: 768px) {
    /* GLOBAL FIXES */
    body {
        overflow-x: hidden !important;
    }

    section, 
    .dept-hero,
    .glass-grid,
    .faculty-grid,
    .lab-grid,
    .dashboard-grid,
    .hod-signature-section,
    .dept-footer {
        padding-left: 20px !important;
        padding-right: 20px !important;
        max-width: 100% !important;
    }

    /* HERO SECTION */
    .dept-hero {
        height: 60vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .dept-hero-content {
        padding: 25px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .dept-hero h1 {
        font-size: 2.2rem !important;
        letter-spacing: 2px !important;
        line-height: 1.2 !important;
    }

    /* GLASS CARDS */
    .glass-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .glass-card {
        padding: 25px !important;
        transform: none !important;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05) !important;
    }

    .glass-card:hover {
        transform: none !important;
    }

    .glass-card i {
        font-size: 2.5rem !important;
        margin-bottom: 15px !important;
    }

    /* FACULTY SECTION */
    .faculty-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .faculty-img {
        height: 220px !important;
    }

    .faculty-img img {
        height: 100% !important;
        transform: none !important;
    }

    .faculty-card:hover {
        transform: none !important;
        border-color: rgba(0, 0, 0, 0.05) !important;
    }

    .faculty-card:hover .faculty-img img {
        transform: none !important;
    }

    /* LAB SECTION */
    .lab-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .lab-item {
        height: 190px !important;
    }

    .lab-overlay {
        opacity: 1 !important;
        transform: none !important;
        background: rgba(0, 0, 0, 0.7) !important;
        padding: 20px !important;
    }

    .lab-overlay h3 {
        font-size: 1.3rem !important;
    }

    .lab-overlay p {
        font-size: 0.9rem !important;
    }

    /* STATS DASHBOARD */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .dashboard-item h2 {
        font-size: 2.8rem !important;
        margin-bottom: 5px !important;
    }

    /* HOD SECTION */
    .hod-flex {
        flex-direction: column !important;
        gap: 30px !important;
        text-align: center !important;
    }

    .hod-image-wrapper img {
        height: 300px !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }

    .hod-quote {
        font-size: 1.2rem !important;
        padding-left: 0 !important;
        margin-top: 20px !important;
    }

    .hod-quote::before {
        display: none !important;
    }

    .hod-identity {
        border-left: none !important;
        padding-left: 0 !important;
    }

    .hod-identity h3 {
        font-size: 1.6rem !important;
    }

    /* FOOTER */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        text-align: center !important;
    }

    .footer-col h3::after {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .icon-text {
        justify-content: center !important;
    }

    .mail-us-btn {
        width: 100% !important;
        max-width: 250px !important;
    }

    /* GENERAL IMPROVEMENTS */
    .highlight-fill {
        width: 85% !important; /* Animated visual for mobile */
    }

    h2.section-title {
        font-size: 1.8rem !important;
    }

    /* HEADER TOGGLE FIX */
    .mobile-menu-toggle {
        display: block !important;
        color: var(--primary-maroon) !important;
        background: rgba(255, 255, 255, 0.9);
        padding: 8px 12px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        z-index: 1100 !important;
    }
}
