/* =============================================================
   Department Page — Scoped Styles  (dept-* prefix)
   Covers: sidebar tabs, tab content, faculty cards, rich content
   Does NOT affect header, footer, or other pages.
   ============================================================= */

/* ------------------------------------------------------------------
   1. PAGE BACKGROUND & SECTION WRAPPER
   ------------------------------------------------------------------ */
.dept-section {
    padding: 40px 0 64px;
    background: #eef2f9;
    background-image:
        radial-gradient(circle at 8% 15%,  rgba(28, 79, 139, 0.05) 0%, transparent 55%),
        radial-gradient(circle at 92% 85%,  rgba(21, 49, 84, 0.04) 0%, transparent 55%);
}

/* ------------------------------------------------------------------
   2. SIDEBAR — tab navigation panel
   ------------------------------------------------------------------ */
.dept-sidebar {
    position: sticky;
    top: 88px;
}

.dept-nav-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 6px 20px rgba(21, 49, 84, 0.07);
}

/* Sidebar heading */
.dept-nav-card__header {
    padding: 16px 20px 14px;
    background: #f8fafd;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 11px;
}

.dept-nav-card__header-icon {
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #1c4f8b 0%, #2a6fc9 100%);
    border-radius: 3px;
    flex-shrink: 0;
}

.dept-nav-card__header-text {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0;
    font-family: var(--font__inter, 'Inter', sans-serif);
    line-height: 1;
}

/* Tab buttons list wrapper */
.dept-nav-list {
    padding: 8px 0;
}

/* Override Bootstrap nav-pills inside dept sidebar */
.dept-nav-card .nav-pills .nav-link {
    width: 100%;
    text-align: left;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 10px 18px !important;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151 !important;
    background: transparent !important;
    font-family: var(--font__inter, 'Inter', sans-serif);
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease !important;
    border-bottom: 1px solid #f3f4f6 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.45;
}

/* Square icon badge */
.dept-nav-card .nav-pills .nav-link::before {
    content: '';
    display: inline-block;
    min-width: 20px;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background-color: #eef2f9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolyline points='3,2 7,5 3,8' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 10px;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.dept-nav-card .nav-pills .nav-link:last-child {
    border-bottom: none !important;
}

.dept-nav-card .nav-pills .nav-link:hover {
    background: #f0f5ff !important;
    color: #1c4f8b !important;
    padding-left: 22px !important;
}

.dept-nav-card .nav-pills .nav-link:hover::before {
    background-color: #dbeafe;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolyline points='3,2 7,5 3,8' fill='none' stroke='%231c4f8b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.dept-nav-card .nav-pills .nav-link.active {
    background: #eef4ff !important;
    color: #1c4f8b !important;
    font-weight: 600 !important;
    padding-left: 18px !important;
    box-shadow: inset 3px 0 0 #1c4f8b !important;
}

.dept-nav-card .nav-pills .nav-link.active::before {
    background-color: #1c4f8b;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolyline points='3,2 7,5 3,8' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------
   3. CONTENT CARD
   ------------------------------------------------------------------ */
.dept-content-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow:
        0 1px 3px  rgba(21, 49, 84, 0.06),
        0 8px 32px rgba(21, 49, 84, 0.09);
    border: 1px solid #dde6f5;
    border-top: 4px solid #1c4f8b;
    min-height: 400px;
}

/* ------------------------------------------------------------------
   4. TAB CONTENT — general rich-text styles
   ------------------------------------------------------------------ */
.dept-tab-body {
    font-family: var(--font__inter, 'Inter', sans-serif);
    font-size: 0.96rem;
    line-height: 1.85;
    color: #374151;
}

/* Section title inside tab */
.dept-tab-body .content-title,
.dept-tab-body h2,
.dept-tab-body h3 {
    font-family: var(--font__inter, 'Inter', sans-serif);
    font-weight: 700;
    color: #153154;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 1rem;
}

.dept-tab-body h2,
.dept-tab-body .content-title {
    font-size: 1.35rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #e4ecf7;
    position: relative;
}

.dept-tab-body h2::after,
.dept-tab-body .content-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 44px;
    height: 2px;
    background: linear-gradient(90deg, #153154, #2a6fc9);
    border-radius: 2px;
}

.dept-tab-body h3 { font-size: 1.1rem; color: #1c4f8b; margin-top: 1.6rem; }
.dept-tab-body h4 { font-size: 1rem;   color: #1e3d72; margin-top: 1.2rem; }

.dept-tab-body p   { margin-bottom: 1rem; }
.dept-tab-body strong, .dept-tab-body b { color: #1a2e4a; font-weight: 700; }

.dept-tab-body a {
    color: #1c4f8b;
    text-decoration: none;
    border-bottom: 1px solid rgba(28, 79, 139, 0.3);
    transition: color 0.2s, border-color 0.2s;
}
.dept-tab-body a:hover { color: #153154; border-bottom-color: #153154; }

/* Lists */
.dept-tab-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.2rem;
}

.dept-tab-body ul li {
    position: relative;
    padding: 6px 0 6px 24px;
    border-bottom: 1px dashed #edf0f7;
    font-size: 0.94rem;
    color: #374151;
    line-height: 1.6;
}

.dept-tab-body ul li:last-child { border-bottom: none; }

.dept-tab-body ul li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    background: #1c4f8b;
    border-radius: 2px;
}

.dept-tab-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.dept-tab-body ol li {
    padding: 4px 0;
    font-size: 0.94rem;
    color: #374151;
    line-height: 1.6;
}

/* Tables */
.dept-tab-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
    font-size: 0.91rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(21, 49, 84, 0.08);
    border: 1px solid #dde6f5;
}

.dept-tab-body table thead tr {
    background: linear-gradient(90deg, #153154 0%, #1c4f8b 100%);
    color: #ffffff;
}

.dept-tab-body table thead th {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.83rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    border: none;
}

.dept-tab-body table tbody tr:nth-child(odd)  td { background: #ffffff; }
.dept-tab-body table tbody tr:nth-child(even) td { background: #f4f8ff; }
.dept-tab-body table tbody tr:hover           td { background: #e8f0fb !important; }

.dept-tab-body table tbody td {
    padding: 11px 16px;
    vertical-align: middle;
    color: #374151;
    border-bottom: 1px solid #e4ecf7;
}

.dept-tab-body table tbody tr:last-child td { border-bottom: none; }

/* Images */
.dept-tab-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;    
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Blockquote */
.dept-tab-body blockquote {
    border-left: 5px solid #1c4f8b;
    background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fb 100%);
    margin: 1.5rem 0;
    padding: 16px 22px;
    border-radius: 0 10px 10px 0;
    color: #374151;
    font-style: italic;
    font-size: 0.97rem;
    line-height: 1.7;
}

/* HR */
.dept-tab-body hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, #dde6f5 0%, transparent 100%);
    margin: 2rem 0;
    border-radius: 2px;
}

/* ------------------------------------------------------------------
   5. FACULTY CARDS
   ------------------------------------------------------------------ */
.dept-faculty-grid .faculty-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #dde6f5;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(21, 49, 84, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
}

.dept-faculty-grid .faculty-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(21, 49, 84, 0.14);
}

/* Photo column */
.dept-faculty-grid .faculty-img-wrap {
    position: relative;
    height: 100%;
    min-height: 160px;
    overflow: hidden;    
}

.dept-faculty-grid .faculty-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    min-height: 160px;
    transition: transform 0.35s ease;
}

.dept-faculty-grid .faculty-card:hover .faculty-img {
    transform: scale(1.04);
}

/* Info column */
.dept-faculty-grid .faculty-info {
    padding: 18px 16px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.dept-faculty-grid .faculty-name {
    font-size: 0.97rem;
    font-weight: 700;
    color: #153154;
    line-height: 1.35;
    margin-bottom: 6px;
    font-family: var(--font__inter, 'Inter', sans-serif);
}

.dept-faculty-grid .designation {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1c4f8b;
    background: #eef4ff;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 14px;
    line-height: 1.4;
    border: 1px solid #ccdcf5;
}

.dept-faculty-grid .btn-profile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1c4f8b;
    background: #ffffff;
    border: 1.5px solid #1c4f8b;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    align-self: flex-start;
    letter-spacing: 0.01em;
    cursor: pointer;
}

.dept-faculty-grid .btn-profile::after {
    content: '→';
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.dept-faculty-grid .faculty-card:hover .btn-profile {
    background: #1c4f8b;
    color: #ffffff;
}

.dept-faculty-grid .faculty-card:hover .btn-profile::after {
    transform: translateX(3px);
}

/* ------------------------------------------------------------------
   6. RESPONSIVE
   ------------------------------------------------------------------ */
@media (max-width: 991.98px) {
    .dept-section      { padding: 28px 0 48px; }
    .dept-content-card { padding: 28px 24px; }

    .dept-sidebar {
        position: static;
        margin-bottom: 4px;
    }

    /* Horizontal scrollable tab pills on tablet */
    .dept-nav-card .dept-nav-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px 12px;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dept-nav-card .dept-nav-list::-webkit-scrollbar { display: none; }

    .dept-nav-card .nav-pills .nav-link {
        white-space: nowrap;
        border-radius: 8px !important;
        border: 1px solid rgba(255,255,255,0.15) !important;
        padding: 8px 16px !important;
        font-size: 0.82rem;
        width: auto;
    }

    .dept-nav-card .nav-pills .nav-link.active {
        box-shadow: none;
    }
}

@media (max-width: 767.98px) {
    .dept-content-card {
        padding: 22px 18px;
        border-radius: 12px;
    }

    .dept-tab-body h2,
    .dept-tab-body .content-title { font-size: 1.15rem; }
}

@media (max-width: 575.98px) {
    .dept-section      { padding: 20px 0 36px; }
    .dept-content-card {
        padding: 18px 14px;
        border-radius: 10px;
        border-top-width: 3px;
    }

    .dept-tab-body { font-size: 0.91rem; line-height: 1.75; }

    .dept-tab-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    /* Faculty card stacks vertically on very small screens */
    .dept-faculty-grid .faculty-img-wrap {
        min-height: 200px;
        height: 200px;
    }
}
