/**
 * C.M. SCIENCE COLLEGE, DARBHANGA
 * Official Portal Main Stylesheet
 * 
 * COLOR PALETTE:
 * Primary Blue: #0B4F8A
 * Dark Blue:    #06345C
 * Orange:       #F28C28
 * Light Orange: #FFF1E2
 * Light Blue:   #EFF6FC
 * Light Gray:   #F5F7FA
 * Dark Text:    #1F2937
 * White:        #FFFFFF
 */

:root {
  --primary-blue: #0B4F8A;
  --dark-blue: #06345C;
  --orange: #F28C28;
  --orange-hover: #d9771e;
  --light-orange: #FFF1E2;
  --light-blue: #EFF6FC;
  --light-gray: #F5F7FA;
  --dark-text: #1F2937;
  --muted-text: #4B5563;
  --white: #FFFFFF;
  --border-color: #E5E7EB;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(11,79,138,0.10);
  --shadow-lg: 0 10px 25px rgba(6,52,92,0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-main: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', sans-serif;
}

body {
  font-family: var(--font-main);
  color: var(--dark-text);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========================================================
   TOP INFORMATION BAR
   ======================================================== */
.top-info-bar {
  background-color: var(--dark-blue);
  color: #D1D5DB;
  font-size: 0.82rem;
  border-bottom: 2px solid var(--orange);
  padding: 6px 0;
}

.top-info-bar a {
  color: #E5E7EB;
  text-decoration: none;
  transition: var(--transition);
}

.top-info-bar a:hover {
  color: var(--orange);
}

.top-info-bar .info-item {
  display: inline-flex;
  align-items: center;
  margin-right: 18px;
}

.top-info-bar .info-item i {
  color: var(--orange);
  margin-right: 6px;
}

.top-portal-btn {
  background-color: var(--orange);
  color: var(--white) !important;
  padding: 3px 12px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(242, 140, 40, 0.4);
}

.top-portal-btn:hover {
  background-color: #d9771e;
  color: var(--white) !important;
}

/* ========================================================
   MAIN BRANDING HEADER
   ======================================================== */
.main-header {
  background-color: var(--white);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

.college-emblem-wrap {
  display: flex;
  align-items: center;
}

.college-emblem-svg {
  width: 85px;
  height: 85px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 6px rgba(11, 79, 138, 0.2));
}

.college-identity {
  padding-left: 18px;
}

.college-identity h1 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary-blue);
  margin: 0;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  line-height: 1.2;
}

.college-identity .hindi-name {
  font-size: 1.05rem;
  color: #B45309;
  font-weight: 700;
  margin-bottom: 2px;
}

.college-identity .tagline {
  font-size: 0.88rem;
  color: var(--muted-text);
  margin: 0;
  font-weight: 500;
}

.college-identity .affiliation-badge {
  font-size: 0.78rem;
  color: var(--dark-blue);
  background: var(--light-blue);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  border-left: 3px solid var(--primary-blue);
  margin-top: 4px;
  font-weight: 600;
}

.naac-badge-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.naac-logo-box {
  background: linear-gradient(135deg, var(--light-orange), #ffffff);
  border: 1px solid #fed7aa;
  padding: 6px 14px;
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.naac-grade {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
}

.naac-label {
  font-size: 0.68rem;
  color: var(--dark-blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================================
   NAVIGATION BAR & MEGA DROPDOWNS
   ======================================================== */
.main-navbar {
  background-color: var(--primary-blue);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  padding: 0;
  z-index: 1020;
}

.main-navbar.sticky-top {
  position: sticky;
  top: 0;
  transition: var(--transition);
}

.main-navbar .navbar-nav > .nav-item > .nav-link {
  color: var(--white);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 14px 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  transition: var(--transition);
}

.main-navbar .navbar-nav > .nav-item > .nav-link:hover,
.main-navbar .navbar-nav > .nav-item > .nav-link:focus,
.main-navbar .navbar-nav > .nav-item.active > .nav-link {
  background-color: var(--dark-blue);
  color: var(--orange);
}

.main-navbar .navbar-nav > .nav-item > .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--orange);
  transition: var(--transition);
}

.main-navbar .navbar-nav > .nav-item > .nav-link:hover::after,
.main-navbar .navbar-nav > .nav-item.active > .nav-link::after {
  width: 100%;
}

/* STUDENT CORNER SPECIAL ACCENT */
.nav-student-corner {
  background-color: rgba(242, 140, 40, 0.22);
  border-left: 2px solid var(--orange);
  border-right: 2px solid var(--orange);
}

.nav-student-corner > .nav-link {
  color: #FFE7D1 !important;
  font-weight: 700 !important;
}

.nav-student-corner > .nav-link i {
  color: var(--orange);
  animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* DROPDOWN MENU STYLING */
.main-navbar .dropdown-menu {
  background-color: var(--white);
  border: 1px solid rgba(11, 79, 138, 0.15);
  border-top: 3px solid var(--orange);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  margin-top: 0;
  min-width: 250px;
  animation: fadeInDown 0.25s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-navbar .dropdown-item {
  color: var(--dark-blue);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.main-navbar .dropdown-item i {
  width: 20px;
  color: var(--primary-blue);
  margin-right: 8px;
  font-size: 0.82rem;
  transition: var(--transition);
}

.main-navbar .dropdown-item:hover,
.main-navbar .dropdown-item:focus {
  background-color: var(--light-blue);
  color: var(--primary-blue);
  border-left-color: var(--orange);
  padding-left: 22px;
}

.main-navbar .dropdown-item:hover i {
  color: var(--orange);
}

/* MEGA MENU STYLING (FOR STUDENT CORNER & ACADEMICS) */
.mega-menu {
  width: 640px !important;
  padding: 16px !important;
}

.mega-menu .mega-col {
  padding: 0 10px;
}

.mega-menu .mega-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--orange);
  border-bottom: 2px solid var(--light-orange);
  padding-bottom: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========================================================
   NOTIFICATION TICKER
   ======================================================== */
.notice-ticker-bar {
  background: linear-gradient(90deg, var(--dark-blue), var(--primary-blue));
  color: var(--white);
  padding: 8px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ticker-label {
  background-color: var(--orange);
  color: var(--white);
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ticker-content a {
  color: #F3F4F6;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.ticker-content a:hover {
  color: var(--orange);
  text-decoration: underline;
}

.badge-new {
  background-color: #EF4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-left: 6px;
  animation: blink-badge 1.5s infinite;
}

@keyframes blink-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ========================================================
   HERO SLIDER
   ======================================================== */
.hero-slider-wrap {
  position: relative;
  overflow: hidden;
}

.hero-slider-wrap .carousel-item {
  height: 520px;
  background-color: var(--dark-blue);
  position: relative;
}

.hero-slider-wrap .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

.hero-caption {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 10;
  text-align: left;
}

.hero-badge {
  background: rgba(242, 140, 40, 0.9);
  color: white;
  display: inline-block;
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #E5E7EB;
  max-width: 650px;
  margin-bottom: 24px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero-actions .btn {
  padding: 10px 24px;
  font-weight: 600;
  border-radius: 6px;
  margin-right: 12px;
  transition: var(--transition);
}

.btn-college-orange {
  background-color: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.btn-college-orange:hover {
  background-color: var(--orange-hover);
  border-color: var(--orange-hover);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(242, 140, 40, 0.35);
}

.btn-college-outline {
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
}

.btn-college-outline:hover {
  background-color: var(--white);
  color: var(--primary-blue);
}

/* ========================================================
   QUICK LINKS SECTION
   ======================================================== */
.quick-links-section {
  position: relative;
  margin-top: -40px;
  z-index: 20;
}

.quick-link-card {
  background: var(--white);
  border-radius: 8px;
  padding: 18px 12px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  display: block;
  color: var(--dark-text);
  height: 100%;
}

.quick-link-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--orange);
  color: var(--primary-blue);
}

.quick-link-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--light-blue);
  color: var(--primary-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 10px;
  transition: var(--transition);
}

.quick-link-card:hover .quick-link-icon {
  background: var(--orange);
  color: var(--white);
}

.quick-link-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

/* ========================================================
   SECTION HEADINGS & BASICS
   ======================================================== */
.section-padding {
  padding: 60px 0;
}

.section-bg-light {
  background-color: var(--light-blue);
}

.section-bg-gray {
  background-color: var(--light-gray);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.section-subtitle {
  color: var(--orange);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}

.section-title {
  color: var(--primary-blue);
  font-size: 2.1rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-divider {
  width: 80px;
  height: 3px;
  background-color: var(--orange);
  margin: 0 auto;
  position: relative;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 9px;
  background-color: var(--primary-blue);
  border-radius: 4px;
}

/* ========================================================
   CARDS & COMPONENTS
   ======================================================== */
.academic-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.academic-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.academic-card-header {
  background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
  color: var(--white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.academic-card-body {
  padding: 20px;
  flex-grow: 1;
}

.academic-card-footer {
  padding: 12px 20px;
  background-color: var(--light-gray);
  border-top: 1px solid var(--border-color);
}

/* FACULTY PROFILE CARD */
.faculty-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  text-align: center;
  padding: 22px 16px;
  height: 100%;
}

.faculty-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-top: 3px solid var(--orange);
}

.faculty-img-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 3px solid var(--primary-blue);
  box-shadow: var(--shadow-sm);
}

.faculty-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faculty-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 4px;
}

.faculty-desig {
  font-size: 0.85rem;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 6px;
}

.faculty-dept {
  font-size: 0.82rem;
  color: var(--muted-text);
  margin-bottom: 12px;
}

/* STATS COUNTER SECTION */
.stats-section {
  background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
  color: var(--white);
  padding: 60px 0;
  position: relative;
}

.stat-box {
  text-align: center;
  padding: 20px 10px;
}

.stat-icon {
  font-size: 2.4rem;
  color: var(--orange);
  margin-bottom: 12px;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--white);
}

.stat-title {
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #D1D5DB;
}

/* ========================================================
   NOTICE BOARD LIST & TABS
   ======================================================== */
.notice-item-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  background: var(--white);
}

.notice-item-row:hover {
  background-color: var(--light-blue);
}

.notice-date-badge {
  background: var(--light-orange);
  border: 1px solid #fed7aa;
  border-radius: 6px;
  text-align: center;
  padding: 6px 12px;
  min-width: 75px;
  margin-right: 16px;
  flex-shrink: 0;
}

.notice-day {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
}

.notice-mon {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dark-blue);
}

.notice-info {
  flex-grow: 1;
}

.notice-category-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--light-blue);
  color: var(--primary-blue);
  display: inline-block;
  margin-bottom: 4px;
}

.notice-title-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-text);
  text-decoration: none;
  display: block;
}

.notice-title-link:hover {
  color: var(--primary-blue);
}

/* ========================================================
   FOOTER
   ======================================================== */
.site-footer {
  background-color: var(--dark-blue);
  color: #D1D5DB;
  font-size: 0.88rem;
  border-top: 4px solid var(--orange);
}

.footer-top {
  padding: 60px 0 35px;
}

.footer-widget-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-widget-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--orange);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #D1D5DB;
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links a i {
  color: var(--orange);
  font-size: 0.75rem;
}

.footer-links a:hover {
  color: var(--orange);
  padding-left: 6px;
}

.footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-contact-item i {
  color: var(--orange);
  font-size: 1.1rem;
  margin-top: 4px;
}

.footer-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  margin-right: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.footer-social-links a:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-3px);
}

.footer-bottom {
  background-color: #032038;
  padding: 16px 0;
  font-size: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ========================================================
   BACK TO TOP & FLOATING ELEMENTS
   ======================================================== */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  background-color: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-blue);
  color: var(--white);
  transform: translateY(-4px);
}

/* ========================================================
   PORTAL CARDS & DASHBOARDS
   ======================================================== */
.portal-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--dark-text);
  display: block;
  height: 100%;
}

.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--orange);
  color: var(--primary-blue);
}

.portal-card-icon {
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 12px;
}

.portal-card:hover .portal-card-icon {
  color: var(--orange);
}

.table-responsive {
  border-radius: 6px;
  overflow-x: auto;
}

/* MARKSHEET STYLING */
.marksheet-box {
  background: #ffffff;
  border: 2px solid var(--primary-blue);
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.marksheet-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  pointer-events: none;
  width: 320px;
}

/* PRINT STYLES */
@media print {
  .top-info-bar,
  .main-navbar,
  .site-footer,
  .back-to-top,
  .no-print {
    display: none !important;
  }
  .marksheet-box {
    border: 1px solid #000 !important;
    box-shadow: none !important;
    padding: 10px !important;
  }
}

/* MOBILE RESPONSIVE OVERRIDES */
@media (max-width: 991.98px) {
  .college-emblem-svg {
    width: 65px;
    height: 65px;
  }
  .college-identity h1 {
    font-size: 1.35rem;
  }
  .naac-badge-header {
    justify-content: flex-start;
    margin-top: 10px;
  }
  .mega-menu {
    width: 100% !important;
  }
  .hero-slider-wrap .carousel-item {
    height: 380px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .quick-links-section {
    margin-top: 15px;
  }
  .main-navbar .navbar-nav > .nav-item > .nav-link {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .main-navbar .dropdown-menu {
    border: none;
    background-color: #06345C;
    padding: 4px 10px;
  }
  .main-navbar .dropdown-item {
    color: #E5E7EB;
  }
}
