/* =========================================================
   COMPUTER SCIENCE & ENGINEERING DEPARTMENT STYLES
   ========================================================= */

/* CSS Variables for CSE - Blue Theme */
:root {
  --cse-primary: #0066cc;
  --cse-secondary: #004d99;
  --cse-light: #e6f2ff;
  --cse-dark: #003366;
  --cse-accent: #3399ff;
  --cse-gradient: linear-gradient(135deg, #0066cc 0%, #004d99 100%);

  --shadow-sm: 0 2px 8px rgba(0, 102, 204, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 102, 204, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 102, 204, 0.2);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* =========================================================
   DEPARTMENT HEADER - CSE
   ========================================================= */
.department-header {
  background: var(--cse-gradient);
  position: relative;
  overflow: hidden;
}

.department-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.05"><path d="M0,0 Q250,50 500,0 T1000,0 L1000,100 L0,100 Z" /><path d="M0,100 Q250,50 500,100 T1000,100"/></svg>');
  background-size: cover;
}

.department-header .lead {
  font-size: 1.25rem;
  opacity: 0.9;
}

.department-info .badge {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.department-icon {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 3.5rem;
  color: white;
  border: 4px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease;
}

.department-icon:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.25);
}

/* =========================================================
   INTERNAL NAVIGATION - CSE
   ========================================================= */
.internal-nav {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 102, 204, 0.1);
}

.internal-nav .navbar-nav {
  gap: 0.5rem;
}

.internal-nav .nav-link {
  position: relative;
  color: var(--cse-dark);
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  border-radius: 20px;
  font-size: 0.9rem;
}

.internal-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--cse-accent);
  transition: all 0.3s ease;
  border-radius: 2px;
  transform: translateX(-50%);
}

.internal-nav .nav-link:hover,
.internal-nav .nav-link.active {
  color: var(--cse-primary);
  background: var(--cse-light);
}

.internal-nav .nav-link:hover::after,
.internal-nav .nav-link.active::after {
  width: 80%;
}

/* =========================================================
   SECTION COMMON STYLES - CSE
   ========================================================= */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--cse-dark);
  margin-bottom: 1.5rem;
  position: relative;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: var(--cse-gradient);
  border-radius: 2px;
  margin: 1rem 0 2rem;
}

.section-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--cse-primary);
  transition: transform 0.3s ease;
}

.section-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.highlight-box {
  background: linear-gradient(135deg, var(--cse-light) 0%, #e6f2ff 100%);
  border-left: 4px solid var(--cse-accent);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.highlight-box h5 {
  color: var(--cse-dark);
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.info-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f0f0f0;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--cse-accent);
}

.info-card i {
  font-size: 2rem;
  color: var(--cse-primary);
  margin-bottom: 1rem;
}

.info-card h5 {
  color: var(--cse-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.info-card p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

/* =========================================================
   MISSION & VISION CARDS - CSE
   ========================================================= */
.mission-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  height: 100%;
}

.mission-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--cse-accent);
}

.mission-icon {
  width: 60px;
  height: 60px;
  background: var(--cse-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--cse-primary);
}

.mission-title {
  color: var(--cse-dark);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.mission-text {
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.mission-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mission-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #555;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.mission-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--cse-accent);
  font-size: 1.2rem;
  line-height: 1;
}

/* =========================================================
   PROGRAMMES SECTION - CSE
   ========================================================= */
.programme-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid #e0e0e0;
  height: 100%;
}

.programme-header {
  background: var(--cse-gradient);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.programme-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
}

.programme-header .badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.programme-body {
  padding: 1.5rem;
}

.programme-info h5 {
  color: var(--cse-dark);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.programme-info p {
  color: #555;
  font-size: 1rem;
  margin: 0;
  padding-left: 1.75rem;
}

.programme-highlights h5 {
  color: var(--cse-dark);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.programme-highlights ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.programme-highlights li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #555;
}

.programme-highlights li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--cse-accent);
  font-weight: bold;
}

/* =========================================================
   CURRICULUM SELECTOR - CSE
   ========================================================= */
.curriculum-selector {
  background: var(--cse-light);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.curriculum-selector h5 {
  color: var(--cse-dark);
  margin-bottom: 1rem;
  font-weight: 600;
}

.curriculum-selector .btn-group {
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.curriculum-selector .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-color: var(--cse-primary);
}

.curriculum-selector .btn.active {
  background: var(--cse-primary);
  color: white;
}

/* =========================================================
   COURSES SECTION - CSE
   ========================================================= */
.courses-accordion .accordion-item {
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-sm) !important;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.courses-accordion .accordion-item:hover {
  border-color: var(--cse-accent);
  box-shadow: var(--shadow-sm);
}

.courses-accordion .accordion-button {
  background: var(--cse-light);
  color: var(--cse-dark);
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
}

.courses-accordion .accordion-button:not(.collapsed) {
  background: var(--cse-gradient);
  color: white;
}

.courses-accordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230066cc'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.courses-accordion .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.courses-accordion .accordion-body {
  padding: 1.5rem;
  background: white;
}

.course-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
}

.course-item {
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--cse-accent);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.course-item:hover {
  background: white;
  box-shadow: var(--shadow-sm);
  transform: translateX(5px);
}

.course-item i {
  color: var(--cse-primary);
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.course-item a {
  color: var(--cse-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.course-item a:hover {
  color: var(--cse-dark);
  text-decoration: underline;
}

.course-materials {
  background: var(--cse-light);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  border-left: 4px solid var(--cse-primary);
}

.course-materials p {
  color: #555;
  margin-bottom: 1rem;
}

.course-materials .btn {
  font-weight: 600;
}

/* =========================================================
   PEOs, POs & PSOs SECTION - CSE
   ========================================================= */
.peo-card,
.pso-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--cse-accent);
  transition: all 0.3s ease;
}

.peo-card:hover,
.pso-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-sm);
}

.peo-header,
.pso-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.peo-number,
.pso-number {
  background: var(--cse-primary);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.peo-header h5,
.pso-header h5 {
  color: var(--cse-dark);
  font-weight: 600;
  margin: 0;
  font-size: 1.1rem;
}

.peo-body p,
.pso-body p {
  color: #555;
  margin: 0;
  line-height: 1.6;
}

/* PO Table Styles */
#poTableBody tr {
  transition: background-color 0.3s ease;
}

#poTableBody tr:hover {
  background-color: var(--cse-light);
}

#poTableBody td:first-child {
  font-weight: 600;
  color: var(--cse-dark);
  background: var(--cse-light);
}

/* =========================================================
   FACILITIES SECTION - CSE
   ========================================================= */
.facility-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  height: 100%;
  text-align: center;
}

.facility-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--cse-accent);
}

.facility-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: var(--cse-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--cse-primary);
}

.facility-card h5 {
  color: var(--cse-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.facility-card p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

/* =========================================================
   RESEARCH SECTION - CSE
   ========================================================= */
.research-area-card {
  display: flex;
  align-items: center;
  padding: 1rem;
  margin-bottom: 1rem;
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.research-area-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-sm);
  border-color: var(--cse-accent);
}

.research-area-card i {
  font-size: 1.5rem;
  color: var(--cse-primary);
  margin-right: 1rem;
  width: 40px;
  height: 40px;
  background: var(--cse-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.research-area-card h5 {
  color: var(--cse-dark);
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.research-area-card p {
  color: #666;
  font-size: 0.85rem;
  margin: 0;
}

/* =========================================================
   CAREER SECTION - CSE
   ========================================================= */
.career-content {
  background: white;
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.career-roles h4 {
  color: var(--cse-dark);
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--cse-light);
}

.career-role-card {
  background: var(--cse-light);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  border-left: 4px solid var(--cse-accent);
  transition: all 0.3s ease;
  height: 100%;
}

.career-role-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  background: white;
  border-color: var(--cse-primary);
}

.career-role-card h6 {
  color: var(--cse-dark);
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.career-role-card p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* =========================================================
   EVENTS SECTION - CSE
   ========================================================= */
#eventsTableBody tr {
  transition: background-color 0.3s ease;
}

#eventsTableBody tr:hover {
  background-color: var(--cse-light);
}

#eventsTableBody th {
  background: linear-gradient(135deg, var(--cse-light) 0%, #e6f2ff 100%);
  color: var(--cse-dark);
  font-weight: 600;
  border-color: #dee2e6;
}

#eventsTableBody td {
  border-color: #dee2e6;
  color: #555;
}

#eventsTableBody a {
  color: var(--cse-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

#eventsTableBody a:hover {
  color: var(--cse-dark);
  text-decoration: underline;
}

/* =========================================================
   TIE-UPS SECTION - CSE
   ========================================================= */
.tieup-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  height: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tieup-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--cse-accent);
}

.tieup-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--cse-light);
  transition: all 0.3s ease;
}

.tieup-card:hover .tieup-logo {
  border-color: var(--cse-accent);
  transform: scale(1.05);
}

.tieup-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tieup-card h5 {
  color: var(--cse-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.tieup-card p {
  color: #666;
  font-size: 0.85rem;
  margin: 0;
}

/* =========================================================
   CONTACT SECTION - CSE
   ========================================================= */
.contact-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--cse-primary);
}

.contact-info {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--cse-primary);
  margin-top: 0.25rem;
}

.contact-item h5 {
  color: var(--cse-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.contact-item p {
  color: #555;
  margin: 0;
  line-height: 1.6;
}

.contact-map {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.contact-map iframe {
  border-radius: var(--radius-sm);
}

/* =========================================================
   BACK TO TOP BUTTON - CSE
   ========================================================= */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--cse-gradient);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
  box-shadow: var(--shadow-md);
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  background: linear-gradient(
    135deg,
    var(--cse-secondary) 0%,
    var(--cse-dark) 100%
  );
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* =========================================================
   RESPONSIVE DESIGN - CSE
   ========================================================= */
@media (max-width: 768px) {
  .department-header {
    padding: 2.5rem 0;
  }

  .department-header h1 {
    font-size: 2rem;
  }

  .department-icon {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    margin-top: 1.5rem;
  }

  .section-card,
  .programme-card,
  .mission-card,
  .contact-card,
  .career-content {
    padding: 1.5rem;
  }

  .internal-nav .navbar-nav {
    gap: 0.25rem;
    text-align: center;
  }

  .internal-nav .nav-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }

  .programme-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .programme-header .badge {
    align-self: flex-start;
  }

  .contact-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .contact-item i {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .course-list {
    grid-template-columns: 1fr;
  }

  #backToTop {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .info-card,
  .facility-card,
  .tieup-card {
    margin-bottom: 1rem;
  }

  .mission-list li {
    padding-left: 1.5rem;
    font-size: 0.9rem;
  }

  .career-role-card {
    padding: 1.25rem;
  }

  .peo-number,
  .pso-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .peo-header h5,
  .pso-header h5 {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .department-header .badge {
    display: block;
    margin: 0.5rem 0;
    width: 100%;
    text-align: center;
  }

  .section-card,
  .programme-card,
  .mission-card {
    padding: 1.25rem;
  }

  .highlight-box {
    padding: 1rem;
  }

  .tieup-card {
    padding: 1.25rem;
  }

  .tieup-logo {
    width: 100px;
    height: 100px;
  }

  .contact-card {
    padding: 1.5rem;
  }

  .course-item {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  .career-role-card h6 {
    font-size: 0.9rem;
  }

  .career-role-card p {
    font-size: 0.8rem;
  }

  .research-area-card {
    padding: 0.75rem;
  }

  .research-area-card i {
    font-size: 1.25rem;
    width: 35px;
    height: 35px;
    margin-right: 0.75rem;
  }

  .research-area-card h5 {
    font-size: 0.9rem;
  }

  .research-area-card p {
    font-size: 0.8rem;
  }
}

/* =========================================================
   ANIMATIONS - CSE
   ========================================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* =========================================================
   PRINT STYLES - CSE
   ========================================================= */
@media print {
  .internal-nav,
  #backToTop,
  .btn,
  .department-icon,
  .contact-map,
  .tieup-card:hover,
  .facility-icon,
  .mission-icon {
    display: none !important;
  }

  .section-card,
  .programme-card,
  .mission-card,
  .contact-card,
  .career-content,
  .peo-card,
  .pso-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }

  .department-header {
    background: white !important;
    color: black !important;
    padding: 1rem 0 !important;
  }

  .department-header .badge {
    background: #f0f0f0 !important;
    color: black !important;
    border: 1px solid #ccc !important;
  }

  a {
    color: black !important;
    text-decoration: none !important;
  }

  .table {
    break-inside: avoid;
  }

  .course-item a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
