/* 
   ECE Department Specific Styles 
   Optimized animations and branding
*/

:root {
    --accent-color: #0284c7;
    /* Cerulean Blue */
    --accent-hover: #0369a1;
    --secondary-color: #6366f1;
    /* Indigo */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --gradient-primary: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    --gradient-accent: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
}

/* Sidebar Scrollbar - Enhanced Beauty */
.sidebar::-webkit-scrollbar {
    width: 5px;
    /* Slim and sleek */
    height: 5px;
}

/* Standard Property for Firefox/Modern Browsers */
.sidebar {
    scrollbar-width: thin;
    /* Slim standard scrollbar */
    scrollbar-color: #94a3b8 #f1f5f9;
    /* Thumb Track */
}

.sidebar::-webkit-scrollbar-track {
    background: #e0f2fe;
    /* Light blue tint track */
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0ea5e9, #6366f1);
    /* Vibrant Sky to Indigo */
    border-radius: 10px;
    border: 1px solid #ffffff;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0284c7, #4f46e5);
    /* Darker on hover */
}

/* Flatten right side border radius */
.sidebar {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.sidebar-header {
    border-top-right-radius: 0 !important;
}

/* Sidebar Active State */
.sidebar-link.active {
    background: #f0f9ff;
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--accent-color);
}

/* Section Title Icon Gradient */
.section-title i {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Badges */
.badge-tech {
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
    color: #0369a1;
    border: 1px solid rgba(186, 230, 253, 0.5);
    box-shadow: var(--shadow-sm);
}

.badge-grad {
    background: linear-gradient(135deg, #eff6ff, #e0e7ff);
    color: #1d4ed8;
    border: 1px solid rgba(191, 219, 254, 0.5);
    box-shadow: var(--shadow-sm);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}


/* ==== Hero Section Animations ==== */
.ece-hero {
    background: linear-gradient(-45deg, #0f172a, #1e293b, #0369a1, #1e293b, #0f172a);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding: 60px 0 80px;
    /* Compacted from 80px 0 100px */
    color: white;
    text-align: center;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    /* content-visibility: auto; Optimization: Defer offscreen rendering */
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Particle Canvas Container */
#ece-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Animated gradient text with glow */
.ece-hero h1 {
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #60a5fa, #a78bfa);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-clip: text;
    font-size: 2.5rem;
    /* Compacted from 3rem */
    position: relative;
    z-index: 1;
    animation: textGradient 8s ease infinite;
    filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.4));
    will-change: background-position;
}

@keyframes textGradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Subtitle with fade animation */
.ece-hero p {
    color: #cbd5e1;
    font-size: 1.15rem;
    /* Compacted from 1.25rem */
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Feature Cards with Hover Effects */
.feature-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* .rvit-data-table has been moved to department-common.css */

/* Compact Table (User Requested) */
.ece-table-compact {
    border-collapse: collapse;
    width: 100%;
}

.ece-table-compact th,
.ece-table-compact td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.ece-table-compact tr:last-child td {
    border-bottom: none;
}

.ece-table-compact tr:hover {
    background-color: #f8fafc;
}


/* Mobile Media Queries for Hero */
@media (max-width: 991px) {
    .ece-hero h1 {
        font-size: 2.2rem;
    }

    .ece-hero {
        padding: 50px 0 60px;
    }
}

/* =========================================
   New Enhancements: Stats, Timeline, Cards
   ========================================= */

/* 1. Research Stat Cards */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    /* Compacted from 24px */
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-accent);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #f0f9ff;
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 16px;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-color);
    color: white;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 2. Timeline Styles (History) */

.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 20px;
    position: relative;
    margin-bottom: 30px;
}

.timeline-badge {
    width: 40px;
    height: 40px;
    background: white;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-weight: bold;
    box-shadow: 0 0 0 4px #f1f5f9;
}

.timeline-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--accent-color);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
    }

    .timeline-badge {
        left: 20px;
    }

    .timeline-content {
        margin-left: 50px;
    }
}


/* 3. Innovation Cards (Teaching) */
.innovation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.innovation-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.innovation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.innovation-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.innovation-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #1e293b;
}

.innovation-detail {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.innovation-detail i {
    color: var(--secondary-color);
    margin-top: 4px;
}

/* Fix for Highlight Icons being oval/compressed */
.highlight-icon-circle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    /* Prevent compression */
    min-height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Important for flex containers */
}

/* Highlight Icons */
.highlight-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Table Manager Styles moved to department-common.css --- */