/* 
   Department Common Styles 
   Shared across ECE, CSE, etc.
   Optimized for Performance & Premium UI
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary-color: #0f172a;
    --primary-light: #1e293b;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;

    /* Apple-inspired Radii */
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Premium Shadows */
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* Base Reveal Class */
.rvit-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

/* Active State Triggered by JS */
.rvit-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Global Handling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 15px;
    /* Common Base Font Size */
}

p,
li,
dl,
address {
    font-size: 15px;
    margin-bottom: 1rem;
}

/* Page Layout */
.dept-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    max-width: 1400px;
    margin: -60px auto 50px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* ==== Sidebar (Performance Optimized) ==== */
.sidebar {
    width: 280px;
    background: #ffffff;
    /* Solid for perf */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    /* scrollbar-color set in page-specific CSS */
    flex-shrink: 0;
    border: 1px solid rgba(226, 232, 240, 0.8);
    will-change: transform;
    z-index: 20;
}

.sidebar-toggle {
    display: none;
}

.sidebar-header {
    padding: 24px;
    background: var(--primary-light);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 1.1rem;
    border-radius: 20px 20px 0 0;
    /* Fallback */
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.nav-group {
    padding: 12px 0;
}

.nav-label {
    padding: 10px 24px 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    /* Slightly more compact */
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.925rem;
    /* Better scale */
    gap: 12px;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.sidebar-link:hover {
    background: #f8fafc;
    padding-left: 28px;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s;
}

/* ==== Content Area & Cards ==== */
.content-area {
    flex: 1;
    width: 100%;
    min-width: 0;
}

.section-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 24px;
    /* Compacted from 32px */
    margin-bottom: 20px;
    /* Compacted from 24px */
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.8);
    scroll-margin-top: 100px;
    animation: fadeIn 0.4s ease-out;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
    transform: translateZ(0);
    /* Hardware accel */
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-weight: 800;
    font-size: 1.5rem;
    /* Compacted from 1.7rem */
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    /* Smaller gap */
    padding-bottom: 12px;
    /* Compacted */
    /* Compacted from 20px */
    position: relative;
    border-bottom: none;
    letter-spacing: -0.5px;
    color: var(--primary-color);
}

.section-title i {
    width: 45px;
    height: 45px;
    background: var(--primary-light);
    /* Fallback */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ==== Tabs (Premium Capsule Pill Style) ==== */
.nav-tabs {
    background-color: #f1f5f9;
    /* Slate 100 Track */
    border-radius: 99px;
    /* Fully rounded capsule */
    padding: 8px;
    /* Breathing room for the track */
    border: 1px solid #e2e8f0;
    display: inline-flex;
    justify-content: flex-start;
    /* Start items inside (Prevents cut-off on scroll) */
    flex-wrap: nowrap;
    gap: 15px;
    /* Increased spacing to separate tabs clearly */
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
    width: auto;
    min-width: 0;
    margin: 0 auto 24px;
    /* Center widget on page */
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 99px;
    /* Fully rounded pills */
    color: #64748b;
    /* Muted Slate Text */
    font-weight: 600;
    padding: 12px 24px;
    /* Restored Standard Padding */
    /* Generous touch target handled by hit area */
    background: transparent;
    font-size: 1rem;
    /* Restored to 16px (Old Size) */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
}

.nav-tabs .nav-link:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.5);
}

.nav-tabs .nav-link.active {
    background: #ffffff !important;
    /* Solid White */
    color: #0284c7 !important;
    /* Premium Blue Active Text */
    box-shadow: 0 6px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.1) !important;
    font-weight: 700;
    border: none !important;
    opacity: 1 !important;
}

/* ==== Common UI Elements ==== */
.feature-card {
    padding: 25px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    background: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-3px);
    border-color: transparent;
}

.custom-badge {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.custom-badge:hover {
    transform: translateY(-2px);
}

/* ==== Video Container ==== */
.video-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
    will-change: transform;
    background: #000;
}

.video-container:hover {
    transform: scale(1.01);
}

/* ==== Premium Tables ==== */
.dept-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    background: white;
}

.dept-table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
}

/* =========================================
   Universal Data Table (.rvit-data-table)
   Standardized structure for all website tables.
   ========================================= */

.rvit-data-table {
    width: 100%;
    border-collapse: separate;
    /* Allows for border-radius on rows/cells */
    border-spacing: 0 6px;
    /* Spaced rows for floating effect */
    margin-bottom: 1rem;
}

.rvit-data-table thead th {
    background-color: #f8fafc;
    /* Light gray header */
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 16px;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
    /* Ensure header stays on top */
    box-shadow: 0 1px 0 #cbd5e1;
    /* Subtle separator */
}

.rvit-data-table tbody tr {
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
}

.rvit-data-table tbody tr:hover {
    transform: scale(1.005);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 5;
    position: relative;
    background-color: #fff;
    /* Ensure bg is white on hover */
}

.rvit-data-table tbody tr:hover td:first-child {
    box-shadow: inset 5px 0 0 var(--table-hover-color, #3b82f6);
    /* Blue default, can be overridden */
}

.rvit-data-table td {
    padding: 16px;
    vertical-align: middle;
    color: #334155;
    font-size: 0.95rem;
    border: solid transparent;
    /* Placeholder for spacing */
}

/* Rounded Corners for Rows */
.rvit-data-table td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.rvit-data-table td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Cell Content Styling */
.rvit-data-table td strong {
    color: #0f172a;
}

/* Responsive Wrapper Helper */
.rvit-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    padding: 4px;
    /* Space for hover shadows */
}

/* Compact Variation */
.rvit-data-table.compact td,
.rvit-data-table.compact th {
    padding: 10px 12px;
    font-size: 0.9rem;
}

/* --- Table Manager Styles (Search, Buttons, Modal) --- */

.table-toolbar {
    transition: all 0.3s ease;
}

.search-container input {
    background-color: #f8fafc !important;
    color: #334155;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.search-container input:focus {
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
}

.btn-icon-action {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.btn-icon-action:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

.btn-icon-action:active {
    transform: translateY(0);
}

.text-success {
    color: #10b981 !important;
}

.text-primary {
    color: #0ea5e9 !important;
}

/* Security Modal */
.tm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.tm-modal-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: #ef4444;
}

.tm-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

#tm-password-input {
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
}

#tm-password-input:focus {
    box-shadow: none;
    border-color: #3b82f6;
    background-color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==== Consultancy Section ==== */
.consultancy-intro-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.consultancy-stat-row {
    margin-bottom: 50px;
    padding: 0 20px;
}

.consultancy-stat {
    text-align: left;
}

.consultancy-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.consultancy-stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Match feature cards to image (cleaner) */
.consultancy-feature-card {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 30px;
    height: 100%;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.consultancy-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.icon-list-premium {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* ==== Mobile Responsive ==== */
@media (max-width: 991px) {
    .dept-layout {
        flex-direction: column;
        padding: 15px;
        margin-top: -30px;
    }

    .sidebar {
        width: 100%;
        position: sticky;
        top: 70px;
        z-index: 100;
        margin-bottom: 20px;
        max-height: none;
        border-radius: 12px;
    }

    .sidebar-toggle {
        display: flex;
        width: 100%;
        padding: 15px 20px;
        background: white;
        color: var(--primary-color);
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        font-weight: 700;
        justify-content: space-between;
        align-items: center;
        box-shadow: var(--shadow-sm);
    }

    .sidebar.active .sidebar-toggle {
        border-radius: 12px 12px 0 0;
        background: var(--primary-light);
        color: white;
    }

    .sidebar-content {
        display: none;
        background: white;
        border: 1px solid #e2e8f0;
        border-top: none;
        border-radius: 0 0 12px 12px;
        max-height: 60vh;
        overflow-y: auto;
    }

    .sidebar.active .sidebar-content {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .section-card {
        padding: 25px;
    }

    .section-title {
        font-size: 1.4rem;
    }
}

/* =========================================
   Universal Data Table (.rvit-data-table)
   Standardized structure for all website tables.
   ========================================= */

.rvit-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    /* Tighter row spacing */
    margin-bottom: 1rem;
}


/* Beautified Table Header */
.rvit-data-table thead th {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    /* Premium Slate Gradient */
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.8px;
    padding: 12px 14px;
    /* Compact Header */
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Rounded Header Corners */
/* Rounded Header Corners - Top Only for connection with body */
.rvit-data-table thead th:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 0;
}

.rvit-data-table thead th:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 0;
}

.rvit-data-table tbody tr {
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
}

.rvit-data-table tbody tr:hover {
    transform: scale(1.002);
    /* More subtle scale */
    box-shadow: 0 4px 12px -3px rgba(0, 0, 0, 0.1);
    z-index: 5;
    position: relative;
    background-color: #fff;
}

/* Creative Accent on Hover */
/* Creative Accent removed by user request */
/* .rvit-data-table tbody tr:hover td:first-child {
    box-shadow: inset 4px 0 0 #3b82f6; 
} */

.rvit-data-table td {
    padding: 10px 14px;
    /* Compact Cell Padding */
    vertical-align: middle;
    color: #334155;
    font-size: 0.88rem;
    /* Slightly smaller text */
    border: solid transparent;
}

.rvit-data-table td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.rvit-data-table td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.rvit-data-table td strong {
    color: #0f172a;
}

.rvit-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    padding: 4px;
}

.rvit-data-table.compact td,
.rvit-data-table.compact th {
    padding: 10px 12px;
    font-size: 0.9rem;
}

/* --- Table Manager Styles --- */
.table-toolbar {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Added outer shadow for toolbar */
}

.search-container input {
    background-color: #f1f5f9 !important;
    /* Slightly darker for contrast */
    color: #334155;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent !important;
    /* Prepare for focus */
}

.search-container input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.search-container input:focus {
    background-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15) !important;
    /* Stronger focus shadow */
    border-color: #3b82f6 !important;
    transform: scale(1.01);
    /* Subtle grow */
}

.btn-icon-action {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    width: 45px !important;
    /* Larger buttons */
    height: 45px !important;
    font-size: 1.1rem;
    /* Larger icon */
}

.btn-icon-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    filter: brightness(0.95);
}

.btn-icon-action:active {
    transform: translateY(0);
}

.text-success {
    color: #10b981 !important;
}

.text-primary {
    color: #0ea5e9 !important;
}

/* Security Modal */
.tm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.tm-modal-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: #ef4444;
}

.tm-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

#tm-password-input {
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
}

#tm-password-input:focus {
    box-shadow: none;
    border-color: #3b82f6;
    background-color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* common animation - rvit reveal */
.rvit-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.rvit-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.rvit-reveal-delay-1 {
    transition-delay: 0.1s;
}

.rvit-reveal-delay-2 {
    transition-delay: 0.2s;
}

.rvit-reveal-delay-3 {
    transition-delay: 0.3s;
}