/* =========================================================
   College Website & Admin Panel
   Professional Navy Theme
   Bootstrap 5 compatible
   ========================================================= */

:root {
  /* Brand colors */
  --college-dark: #1e3a5f;
  --college-darker: #142740;
  --college-accent: #2563eb;
  --college-light: #ffffff;

  /* Neutral colors */
  --surface: #f6f7f9;
  --surface-card: #ffffff;
  --surface-soft: #eaf2ff;

  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;

  /* Borders & shadows */
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-brand: 0 15px 30px rgba(37, 99, 235, .15);

  /* Layout */
  --sidebar-width: 260px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Typography */
  --font-base: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* =========================================================
   Base
   ========================================================= */

* {
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--college-light);
  color: var(--text-primary);
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
}

a {
  text-decoration: none;
}

/* Keyboard focus */
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .45);
  outline-offset: 2px;
}

/* =========================================================
   Navbar
   ========================================================= */

.navbar {
  background: linear-gradient(90deg, var(--college-dark), var(--college-darker));
  box-shadow: 0 2px 12px rgba(0, 0, 0, .10);
}

.navbar-brand {
  color: #ffffff;
  font-weight: 800;
}

.navbar .nav-link {
  color: rgba(255, 255, 255, .85);
  font-weight: 600;
  transition: color .2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  color: #ffffff;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  padding: 130px 0;
  text-align: center;
  color: #ffffff;
  background:
    linear-gradient(rgba(20, 39, 64, .88), rgba(30, 58, 95, .88)),
    url("https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
}

.hero h1 {
  font-weight: 800;
  text-shadow: 0 3px 15px rgba(0, 0, 0, .35);
}

.hero p {
  color: rgba(255, 255, 255, .92);
}

@media (max-width: 767.98px) {
  .hero {
    padding: 90px 0;
  }
}

/* =========================================================
   College logo
   ========================================================= */

.college-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  margin: 0 auto 18px;
  border-radius: 22px;
  background-color: #ffffff;
  color: var(--college-dark);
  font-size: 26px;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
}

.college-logo-small {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

/* =========================================================
   Section titles
   ========================================================= */

.section-title {
  color: var(--college-dark);
  font-weight: 800;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: .98rem;
}

.page-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: .95rem;
}

/* =========================================================
   Cards
   ========================================================= */

.card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
}

.stat-card,
.quick-card,
.course-card {
  height: 100%;
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.stat-card:hover,
.quick-card:hover,
.course-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, .25);
  box-shadow: var(--shadow-brand);
}

.course-card {
  border-top: 4px solid var(--college-accent);
}

.course-card .card-title {
  color: var(--text-primary);
  font-weight: 750;
}

.course-card .card-text {
  color: var(--text-secondary);
}

/* =========================================================
   Course & feature icons
   ========================================================= */

.course-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  border-radius: var(--radius-lg);
  background-color: var(--surface-soft);
  color: var(--college-dark);
  font-size: 24px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}

.feature-item i {
  margin-top: 3px;
  color: var(--college-dark);
  font-size: 20px;
}

.feature-item h6,
.feature-item strong {
  color: var(--text-primary);
}

.feature-item p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* =========================================================
   Badges
   ========================================================= */

.badge-soft-primary {
  display: inline-block;
  padding: .35rem .7rem;
  border-radius: 50rem;
  background-color: var(--surface-soft);
  color: var(--college-dark);
  font-weight: 700;
}

/* =========================================================
   Tables
   ========================================================= */

.table {
  --bs-table-hover-bg: #eef4ff;
  margin-bottom: 0;
}

.table th {
  background-color: var(--college-dark);
  color: #ffffff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  border-color: rgba(255, 255, 255, .18);
}

.table td {
  vertical-align: middle;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  font-weight: 650;
  border-radius: var(--radius-sm);
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

/* Bootstrap yellow button converted to professional blue */
.btn-warning {
  --bs-btn-bg: var(--college-accent);
  --bs-btn-border-color: var(--college-accent);
  --bs-btn-color: #ffffff;
  --bs-btn-hover-bg: var(--college-dark);
  --bs-btn-hover-border-color: var(--college-dark);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-active-bg: var(--college-darker);
  --bs-btn-active-border-color: var(--college-darker);
  --bs-btn-active-color: #ffffff;
  --bs-btn-disabled-bg: var(--college-accent);
  --bs-btn-disabled-border-color: var(--college-accent);
  --bs-btn-disabled-color: #ffffff;
}

/* Primary custom button */
.btn-college {
  --bs-btn-bg: var(--college-accent);
  --bs-btn-border-color: var(--college-accent);
  --bs-btn-color: #ffffff;
  --bs-btn-hover-bg: var(--college-dark);
  --bs-btn-hover-border-color: var(--college-dark);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-active-bg: var(--college-darker);
  --bs-btn-active-border-color: var(--college-darker);
  --bs-btn-active-color: #ffffff;
}

/* Secondary outline button */
.btn-outline-college {
  --bs-btn-color: var(--college-dark);
  --bs-btn-border-color: var(--college-dark);
  --bs-btn-hover-bg: var(--college-dark);
  --bs-btn-hover-border-color: var(--college-dark);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-active-bg: var(--college-darker);
  --bs-btn-active-border-color: var(--college-darker);
  --bs-btn-active-color: #ffffff;
}

/* =========================================================
   Forms
   ========================================================= */

.form-control,
.form-select {
  border-color: var(--border-color);
  border-radius: var(--radius-sm);
  padding: .65rem .85rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--college-accent);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15);
}

.form-label {
  color: var(--text-secondary);
  font-weight: 600;
}

/* =========================================================
   Admin sidebar
   ========================================================= */

.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 1rem .75rem;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--college-dark), var(--college-darker));
  box-shadow: 4px 0 20px rgba(0, 0, 0, .15);
}

.admin-sidebar::-webkit-scrollbar {
  width: 6px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .25);
  border-radius: 10px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .5rem 1rem;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.sidebar-brand .brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: #ffffff;
  color: var(--college-dark);
  font-size: 18px;
}

.sidebar-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .25rem;
  padding: .65rem .85rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, .82);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus {
  color: #ffffff;
  background-color: rgba(255, 255, 255, .12);
}

.sidebar-nav .nav-link.active {
  color: var(--college-dark);
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding: .45rem .8rem;
  border-radius: 50rem;
  background-color: rgba(255, 255, 255, .10);
  color: #ffffff;
  font-size: .88rem;
  font-weight: 600;
}

/* Sidebar groups */
.sidebar-group {
  padding: .75rem .85rem .25rem;
  color: rgba(255, 255, 255, .55);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-group:not(:first-child) {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(255, 255, 255, .10);
}

.sidebar-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .75rem .85rem .25rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .55);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
}

.sidebar-group-btn:hover,
.sidebar-group-btn:focus {
  color: #ffffff;
}

.sidebar-group-btn .chevron {
  transition: transform .3s ease;
}

.sidebar-group-btn[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.sidebar-group-btn.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, .12);
}

.sidebar-submenu {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.sidebar-submenu .nav-link {
  padding-left: 1.4rem;
}

/* =========================================================
   Admin layout
   ========================================================= */

.admin-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.admin-content {
  flex: 1;
  padding: 1.5rem;
}

.sidebar-toggle {
  display: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  display: none;
  background-color: rgba(0, 0, 0, .45);
}

.sidebar-backdrop.show {
  display: block;
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    left: calc(var(--sidebar-width) * -1);
    transition: left .3s ease;
  }

  .admin-sidebar.show {
    left: 0;
  }

  .admin-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: inline-flex;
  }
}

/* =========================================================
   Admin footer
   ========================================================= */

.admin-footer {
  background: linear-gradient(90deg, var(--college-darker), var(--college-dark));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .10);
}

.footer-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-color: #ffffff;
  color: var(--college-dark);
  font-size: 17px;
}

.footer-link {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  transition: color .2s ease;
}

.footer-link:hover,
.footer-link:focus {
  color: #ffffff;
}

.footer-bottom {
  margin-top: 30px;
  padding: 18px 0;
  background-color: rgba(0, 0, 0, .20);
  border-top: 1px solid rgba(255, 255, 255, .12);
}

/* =========================================================
   Public footer
   ========================================================= */

.footer {
  padding: 45px 0 0;
  color: #ffffff;
  background: linear-gradient(90deg, var(--college-dark), var(--college-darker));
}

.footer h5,
.footer h6 {
  color: #ffffff;
  font-weight: 750;
}

.footer p {
  color: rgba(255, 255, 255, .78);
}

/* =========================================================
   Contact icons
   ========================================================= */

.text-primary {
  color: var(--college-accent);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: var(--surface-soft);
  color: var(--college-dark);
  font-size: 18px;
}

/* =========================================================
   Utilities
   ========================================================= */

.bg-college {
  background-color: var(--college-dark);
}

.bg-college-soft {
  background-color: var(--surface-soft);
}

.text-college {
  color: var(--college-dark);
}

.border-college {
  border-color: rgba(37, 99, 235, .25);
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}