/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    gap: 5px;
    margin-bottom: 0;
    border-bottom: 3px solid #ddd;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 24px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    border: 2px solid #ddd;
    border-bottom: none;
    position: relative;
    bottom: -3px;
}

/* Odd semester tabs - Blue theme */
.tab-button.odd-sem {
    background: linear-gradient(to bottom, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border-color: #90caf9;
}

.tab-button.odd-sem:hover {
    background: linear-gradient(to bottom, #64b5f6 0%, #42a5f5 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 165, 245, 0.4);
}

.tab-button.odd-sem.active {
    background: linear-gradient(to bottom, #0d47a1 0%, #1565c0 100%);
    color: white;
    border-color: #0d47a1;
    box-shadow: 0 6px 12px rgba(13, 71, 161, 0.5);
    font-weight: 700;
    transform: scale(1.05);
}

/* Even semester tabs - Green theme */
.tab-button.even-sem {
    background: linear-gradient(to bottom, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-color: #a5d6a7;
}

.tab-button.even-sem:hover {
    background: linear-gradient(to bottom, #66bb6a 0%, #4caf50 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.tab-button.even-sem.active {
    background: linear-gradient(to bottom, #1b5e20 0%, #2e7d32 100%);
    color: white;
    border-color: #1b5e20;
    box-shadow: 0 6px 12px rgba(27, 94, 32, 0.5);
    font-weight: 700;
    transform: scale(1.05);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.semester-content {
    max-height: 65vh;
    overflow: auto;
    padding: 20px;
    border: 2px solid #ddd;
    border-top: none;
    border-radius: 0 8px 8px 8px;
    background: white;
}

table.curriculum {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
}

table.curriculum th,
table.curriculum td {
    border: 1px solid #999;
    padding: 10px 12px;
    font-size: 14px;
    text-align: left;
}

/* Column width controls */
table.curriculum th:nth-child(1),
table.curriculum td:nth-child(1) {
    width: 5%;
}

/* Sem */
table.curriculum th:nth-child(2),
table.curriculum td:nth-child(2) {
    width: 10%;
}

/* Course No */
table.curriculum th:nth-child(3),
table.curriculum td:nth-child(3) {
    width: 37%;
}

/* Course Title */
table.curriculum th:nth-child(4),
table.curriculum td:nth-child(4) {
    width: 4%;
}

/* Lecture */
table.curriculum th:nth-child(5),
table.curriculum td:nth-child(5) {
    width: 6%;
}

/* Tutorial */
table.curriculum th:nth-child(6),
table.curriculum td:nth-child(6) {
    width: 6%;
}

/* Ext. Tut. */
table.curriculum th:nth-child(7),
table.curriculum td:nth-child(7) {
    width: 5%;
}

/* Lab */
table.curriculum th:nth-child(8),
table.curriculum td:nth-child(8) {
    width: 12%;
    white-space: normal;
    word-wrap: break-word;
}

/* Time outside class */
table.curriculum th:nth-child(9),
table.curriculum td:nth-child(9) {
    width: 7%;
}

/* Credits */

/* Center align numeric columns */
table.curriculum td:nth-child(1),
table.curriculum td:nth-child(4),
table.curriculum td:nth-child(5),
table.curriculum td:nth-child(6),
table.curriculum td:nth-child(7),
table.curriculum td:nth-child(8),
table.curriculum td:nth-child(9) {
    text-align: center;
}

table.curriculum th {
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table.curriculum tr:hover {
    background-color: #f5f5f5;
}

/* Credit total rows */
tr.credit-row td {
    border: none;
    background: #e9ecef;
    font-weight: bold;
    font-size: 16px;
    padding: 15px 12px;
}

/* Semester badge */
.semester-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 18px;
}

.semester-badge.odd {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    box-shadow: 0 3px 6px rgba(25, 118, 210, 0.3);
}

.semester-badge.even {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
    color: white;
    box-shadow: 0 3px 6px rgba(56, 142, 60, 0.3);
}

/* Scrollbar styling */
.semester-content::-webkit-scrollbar {
    width: 10px;
}

.semester-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.semester-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

.semester-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* M.Tech specific styles */
.accordion-item {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-item summary {
    cursor: pointer;
    padding: 15px 20px;
    background: #f8f9fa;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.3s ease;
}

.accordion-item summary:hover {
    background: #e9ecef;
}

.accordion-icon {
    font-size: 20px;
    font-weight: bold;
    color: #666;
}

.accordion-content {
    padding: 20px;
    background: white;
}

.elective-list h3 {
    color: #1565c0;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.elective-list table {
    margin-bottom: 30px;
}

.elective-list table th {
    background: #f0f0f0;
    font-weight: 600;
}

.elective-list table td:first-child {
    text-align: center;
    font-weight: 500;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-family: sans-serif;
}

th,
td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

.theory {
    background-color: #eaf2ff;
}

/* light blue */
.systems {
    background-color: #fff3e0;
}

/* light orange */
.aiml {
    background-color: #e8f5e9;
}

/* light green */
caption {
    text-align: left;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 5px;
}

/* Hide Acronym column everywhere */
table.theory th:nth-child(3),
table.theory td:nth-child(3),
table.aiml th:nth-child(3),
table.aiml td:nth-child(3),
table.systems th:nth-child(3),
table.systems td:nth-child(3) {
    display: none;
}

/* Hide Remarks column in systems table */
table.systems th:nth-child(4),
table.systems td:nth-child(4) {
    display: none;
}

.accordion-container {
    margin: 15px auto 25px auto;
    padding: 5px;
}

.accordion-item {
    width: 100%;
    margin-bottom: 20px;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f4f4f4;
    padding: 14px 18px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
}

.accordion-content {
    margin-top: 10px;
}

.accordion-icon {
    transition: transform 0.3s;
}

/* Scrollable region for accordion tables */
.table-scroll {
    max-height: 80vh;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Keep header visible while scrolling */
.table-scroll thead th {
    position: sticky;
    top: 0;
    background: #f2f2f2;
    z-index: 2;
}