/* Kaliabor College of Education - Premium Academic Theme
   Design Reference inspired by Dhamdhama Anchalik College (dacollege.in)
*/

:root {
  --primary-color: #0f2b5c;       /* Deep Academic Navy */
  --primary-dark: #0a1c3d;
  --primary-light: #1e4282;
  --secondary-color: #b91c1c;     /* Crimson / Maroon */
  --secondary-hover: #991b1b;
  --accent-gold: #d97706;        /* Warm Gold */
  --accent-gold-light: #fef3c7;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(15, 43, 92, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 43, 92, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.25s ease-in-out;
}

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background-color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

/* ================= TOP UTILITY BAR ================= */
.top-bar {
  background-color: var(--primary-dark);
  color: #e2e8f0;
  font-size: 0.84rem;
  padding: 6px 0;
  border-bottom: 2px solid var(--accent-gold);
}

.top-bar a {
  color: #cbd5e1;
  margin-right: 15px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.top-bar a:hover {
  color: #ffffff;
  text-decoration: none;
}

.top-bar .top-btn-group a {
  background: rgba(255,255,255,0.1);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  transition: var(--transition);
}

.top-bar .top-btn-group a:hover {
  background: var(--secondary-color);
  color: #fff;
}

/* ================= BRANDING HEADER ================= */
.college-header {
  background: #ffffff;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.college-logo-emblem {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 4px 10px rgba(15,43,92,0.2);
  border: 3px solid #fff;
  outline: 2px solid var(--accent-gold);
  flex-shrink: 0;
}

.college-title-block h1 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 2px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.college-title-block .college-sub {
  font-size: 0.95rem;
  color: var(--secondary-color);
  font-weight: 700;
  margin-bottom: 2px;
}

.college-title-block .college-estd {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.header-badges {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.ncte-badge {
  background: var(--accent-gold-light);
  border: 1px solid #fcd34d;
  color: #78350f;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================= MAIN NAVIGATION BAR ================= */
.main-navbar {
  background-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.main-navbar .nav-link {
  color: #f1f5f9 !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 14px !important;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-item.active .nav-link,
.main-navbar .nav-link.active {
  background: rgba(255,255,255,0.08);
  color: #ffffff !important;
  border-bottom-color: var(--accent-gold);
}

.main-navbar .dropdown-menu {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  margin-top: 0;
  border-top: 3px solid var(--secondary-color);
  animation: fadeIn 0.2s ease-in-out;
}

.main-navbar .dropdown-item {
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 18px;
  color: var(--text-dark);
  transition: var(--transition);
}

.main-navbar .dropdown-item:hover {
  background-color: #f1f5f9;
  color: var(--secondary-color);
  padding-left: 22px;
}

.btn-apply-cta {
  background: var(--secondary-color);
  color: #fff !important;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(185,28,28,0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-apply-cta:hover {
  background: var(--secondary-hover);
  color: #fff !important;
  transform: translateY(-1px);
}

/* ================= LATEST NOTICES TICKER ================= */
.ticker-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 44px;
}

.ticker-title {
  background: var(--secondary-color);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 6px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
}

.ticker-content {
  flex-grow: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-items {
  display: inline-block;
  animation: marquee 32s linear infinite;
  padding-left: 20px;
}

.ticker-items:hover {
  animation-play-state: paused;
}

.ticker-items a {
  color: var(--text-dark);
  font-size: 0.88rem;
  font-weight: 600;
  margin-right: 35px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.badge-new-pulse {
  background: var(--secondary-color);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(185,28,28, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(185,28,28, 0); }
  100% { box-shadow: 0 0 0 0 rgba(185,28,28, 0); }
}

@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* ================= HERO CAROUSEL ================= */
.hero-slider .carousel-item {
  height: 480px;
  background-color: var(--primary-dark);
  position: relative;
}

.hero-slider .carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  filter: brightness(0.72);
}

.hero-slider .carousel-caption {
  bottom: 80px;
  text-align: left;
  max-width: 800px;
  background: rgba(10, 28, 61, 0.85);
  backdrop-filter: blur(8px);
  padding: 28px 36px;
  border-radius: var(--radius-md);
  border-left: 5px solid var(--accent-gold);
}

.hero-slider .carousel-caption h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.25;
}

.hero-slider .carousel-caption p {
  font-size: 1.05rem;
  color: #e2e8f0;
  margin-bottom: 20px;
}

/* ================= QUICK ACCESS GRID ================= */
.quick-access-section {
  margin-top: -35px;
  position: relative;
  z-index: 10;
}

.quick-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: block;
  color: var(--text-dark);
  height: 100%;
  border-top: 3px solid var(--primary-color);
}

.quick-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--secondary-color);
  color: var(--secondary-color);
  text-decoration: none;
}

.quick-card .quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin: 0 auto 10px;
  transition: var(--transition);
}

.quick-card:hover .quick-icon {
  background: var(--primary-color);
  color: #fff;
}

.quick-card .quick-title {
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1.3;
}

/* ================= SECTION HEADINGS ================= */
.section-title-wrap {
  text-align: center;
  margin-bottom: 36px;
  position: relative;
}

.section-title-wrap .sub-badge {
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  display: inline-block;
}

.section-title-wrap h2 {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.section-title-wrap .title-divider {
  width: 70px;
  height: 4px;
  background: var(--accent-gold);
  margin: 0 auto;
  border-radius: 2px;
  position: relative;
}

.section-title-wrap .title-divider::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--secondary-color);
  border-radius: 50%;
}

/* ================= STATS COUNTER BAR ================= */
.stats-bar {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #fff;
  padding: 45px 0;
  position: relative;
}

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

.stat-item .stat-num {
  font-size: 2.6rem;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 4px;
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ================= ACADEMIC COURSES CARDS ================= */
.course-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.course-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: #fff;
  padding: 22px;
  position: relative;
}

.course-header.deled {
  background: linear-gradient(135deg, #065f46, #047857);
}

.course-header.ba {
  background: linear-gradient(135deg, #7c2d12, #9a3412);
}

.course-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.course-header h3 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.course-body {
  padding: 22px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.course-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.course-meta li {
  font-size: 0.88rem;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-color);
  display: flex;
  justify-content: space-between;
}

.course-meta li strong {
  color: var(--primary-color);
}

/* ================= NOTICE BOARD & EVENTS ================= */
.notice-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  height: 100%;
}

.notice-box-header {
  background: var(--primary-color);
  color: #fff;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--accent-gold);
}

.notice-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 420px;
  overflow-y: auto;
}

.notice-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.notice-item:hover {
  background: #f8fafc;
}

.notice-date-badge {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: center;
  min-width: 58px;
  flex-shrink: 0;
}

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

.notice-date-badge .month {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}

.notice-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.35;
}

.notice-text h4 a {
  color: var(--text-dark);
}

.notice-text h4 a:hover {
  color: var(--secondary-color);
}

.notice-text .category-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary-light);
  padding: 2px 7px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 6px;
}

/* ================= PRINCIPAL DESK SECTION ================= */
.principal-section {
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 60px 0;
}

.principal-card-box {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 35px;
  box-shadow: var(--shadow-md);
  border-left: 5px solid var(--primary-color);
}

.principal-photo-wrapper {
  text-align: center;
}

.principal-avatar {
  width: 190px;
  height: 220px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
  background: #e2e8f0;
}

/* ================= STAFF & DIRECTORY ================= */
.faculty-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.faculty-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.faculty-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 14px;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.faculty-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 4px;
}

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

.faculty-card .qual {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 12px;
}

/* ================= FOOTER ================= */
.site-footer {
  background-color: var(--primary-dark);
  color: #cbd5e1;
  padding-top: 60px;
  border-top: 4px solid var(--accent-gold);
  font-size: 0.9rem;
}

.site-footer h5 {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.site-footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-gold);
}

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

.site-footer ul li {
  margin-bottom: 9px;
}

.site-footer ul li a {
  color: #cbd5e1;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-footer ul li a:hover {
  color: #fbbf24;
  padding-left: 5px;
}

.footer-bottom {
  background-color: #050d1a;
  padding: 18px 0;
  margin-top: 50px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
}

/* Custom Table Styles */
.table-custom thead {
  background: var(--primary-color);
  color: #fff;
}

.table-custom thead th {
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  padding: 12px 16px;
}

.table-custom tbody tr:hover {
  background-color: #f8fafc;
}

@media (max-width: 991.98px) { #mainNav { max-height: calc(100dvh - 70px); overflow-y: auto; } .main-navbar .dropdown-menu { max-width: 100%; } }

/* Refined quick access cards and image-only branding. */
.brand-image {display:block;width:auto;max-width:100%;max-height:100px;object-fit:contain;}
.hero-slider .carousel-item img {filter:none;}
.quick-card {position:relative;overflow:hidden;min-height:150px;border:1px solid #dce3ed;border-top:0;border-radius:16px;background:linear-gradient(145deg,#fff,#f4f7fc);box-shadow:0 8px 24px rgba(15,43,92,.08);padding:24px 15px;transition:transform .2s,box-shadow .2s;}
.quick-card::before {content:"";position:absolute;left:24px;right:24px;top:0;height:3px;background:linear-gradient(90deg,#0f2b5c,#c6a558);border-radius:0 0 4px 4px;}
.quick-card .quick-icon {width:58px;height:58px;border-radius:16px;background:linear-gradient(135deg,#0f2b5c,#24477f);color:#fff;box-shadow:0 5px 12px rgba(15,43,92,.18);}
.quick-card .quick-title {color:#142b50;font-weight:700;}
.quick-card:hover,.quick-card:focus-visible {transform:translateY(-5px);box-shadow:0 14px 30px rgba(15,43,92,.16);border-color:#c6a558;}
.quick-card:hover .quick-icon {background:#c6a558;color:#fff;}
.home-event-card {overflow:hidden;border:1px solid #e1e7ef;border-radius:12px;background:#fff;box-shadow:0 5px 16px rgba(15,43,92,.06);}
.home-event-photo {width:100%;height:170px;object-fit:cover;display:block;}
.event-read-more {display:inline-flex;align-items:center;gap:8px;margin-top:12px;font-weight:700;color:#0f2b5c;text-decoration:none;}
.event-detail {max-width:960px;}
.event-detail-photo {width:100%;max-height:540px;object-fit:contain;background:#f4f7fc;}
.event-description {line-height:1.85;overflow-wrap:anywhere;}
@media(min-width:992px) {
 .main-navbar .dropdown:hover > .dropdown-menu {display:block;margin-top:0;}
}
@media(max-width:991.98px) {
 .college-header .row > div:first-child {justify-content:center;}
 .brand-image {max-height:80px;}
 .college-header .row > div:last-child {display:none!important;}
 .main-navbar .container {justify-content:space-between;}
 .main-navbar .dropdown-menu {position:static;width:100%;min-width:0;}
 .main-navbar .dropdown-item {white-space:normal;}
}
@media(prefers-reduced-motion:reduce) {.quick-card {transition:none;}.quick-card:hover {transform:none;}}
/* Quick links: editorial cards with clear icon, title and action. */
.quick-access-section {margin-top:0;padding:32px 0;background:#f3f6fa;}
.quick-access-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;}
.quick-card {text-align:left;min-height:180px;padding:24px;border:1px solid #dee5ee;border-radius:12px;background:#fff;box-shadow:0 4px 15px rgba(15,43,92,.04);}
.quick-card::before {left:0;right:auto;top:24px;bottom:24px;width:3px;height:auto;border-radius:0 4px 4px 0;background:#c6a558;}
.quick-card .quick-icon {margin:0 0 18px;width:46px;height:46px;border-radius:12px;font-size:1.3rem;}
.quick-card .quick-title {font-size:1.05rem;margin-bottom:12px;}
.quick-number {position:absolute;right:22px;top:21px;font-size:1.45rem;font-weight:800;color:#dce4ee;}
.quick-action {display:flex;gap:8px;align-items:center;font-size:.8rem;font-weight:600;color:#697b94;}
.quick-card:hover .quick-action,.quick-card:focus-visible .quick-action {color:#0f2b5c;}
@media(min-width:992px) {.main-navbar,#mainNav {overflow:visible!important;}.main-navbar .dropdown-menu {top:100%;margin-top:0;z-index:1050;}.main-navbar .dropdown-menu.show {display:block;}}
@media(max-width:991.98px) {.quick-access-grid {grid-template-columns:repeat(2,minmax(0,1fr));}.main-navbar .dropdown-menu.show {display:block;}}
@media(max-width:420px) {.quick-access-grid {gap:12px;}.quick-card {padding:20px 14px;min-height:170px;}.quick-card .quick-title {font-size:.95rem;}.quick-number {right:14px;font-size:1.2rem;}}

/* Mobile utility links remain visible and wrap within the screen. */
@media(max-width:991.98px) {
 .top-bar-layout {flex-direction:column;align-items:stretch!important;gap:8px;}
 .top-contact-group {flex-wrap:wrap;justify-content:center;gap:5px 12px;min-width:0;}
 .top-contact-group a {margin-right:0;max-width:100%;overflow-wrap:anywhere;}
 .top-contact-group a[href^="mailto:"] {min-width:0;word-break:break-word;}
 .top-contact-group > span.text-secondary {display:none;}
 .top-contact-group > span.ms-3 {margin-left:0!important;text-align:center;flex-basis:100%;}
 .top-bar .top-btn-group {flex-wrap:wrap;justify-content:center;gap:6px;}
 .top-bar .top-btn-group a {margin-right:0;padding:6px 10px;min-height:36px;}
 .main-navbar .navbar-toggler {margin-left:auto;}
}
