/* IVC Distance Learning Program — self-contained design */

:root {
  --nu-green: #0b5d3b;
  --nu-green-dark: #073d28;
  --nu-green-mid: #127a4e;
  --nu-gold: #c9a227;
  --nu-gold-soft: #f4e7b8;
  --nu-ink: #14201a;
  --nu-muted: #5b6b62;
  --nu-bg: #eef3f0;
  --nu-card: #ffffff;
  --nu-border: #cfdad3;
  --nu-danger: #b42318;
  --nu-success: #067647;
  --nu-warning: #b54708;
  --sidebar-width: 268px;
  --font-display: "Libre Baskerville", "Palatino Linotype", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", Tahoma, sans-serif;
  --radius: 0;
  --shadow: 0 14px 34px rgba(8, 68, 43, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--nu-ink);
  background: var(--nu-bg);
  line-height: 1.55;
  font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: var(--nu-green); text-decoration: none; }
a:hover { color: var(--nu-green-dark); text-decoration: underline; }
h1,h2,h3,h4,h5,.display-font {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 0;
}

/* Minimal layout utilities (Bootstrap fallback) */
.container { width: min(1140px, calc(100% - 2rem)); margin-inline: auto; }
.container-fluid { width: calc(100% - 2rem); margin-inline: auto; }
.row { display: flex; flex-wrap: wrap; margin: 0 -0.6rem; }
.row > [class*="col"] { padding: 0 0.6rem; }
.g-2 { --g: .5rem; } .g-3 { --g: .85rem; } .g-4 { --g: 1.25rem; }
.row.g-2, .row.g-3, .row.g-4 { margin: 0 calc(var(--g, .85rem) * -1); }
.row.g-2 > [class*="col"], .row.g-3 > [class*="col"], .row.g-4 > [class*="col"] { padding: 0 var(--g, .85rem); margin-bottom: calc(var(--g, .85rem) * 2); }
.col-6 { width: 50%; } .col-12 { width: 100%; }
.col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-xl-3 { width: 100%; }
@media (min-width: 768px) {
  .col-md-3 { width: 25%; } .col-md-4 { width: 33.333%; } .col-md-5 { width: 41.666%; }
  .col-md-6 { width: 50%; } .col-md-7 { width: 58.333%; } .col-md-8 { width: 66.666%; }
  .col-6.col-md-3 { width: 25%; }
}
@media (min-width: 992px) {
  .col-lg-5 { width: 41.666%; } .col-lg-6 { width: 50%; } .col-lg-7 { width: 58.333%; } .col-lg-8 { width: 66.666%; }
  .col-xl-3 { width: 25%; }
}
.d-flex { display: flex; } .d-inline { display: inline; } .d-inline-flex { display: inline-flex; }
.d-none { display: none !important; } .d-grid { display: grid; }
.flex-wrap { flex-wrap: wrap; } .flex-column { flex-direction: column; }
.align-items-center { align-items: center; } .align-items-end { align-items: flex-end; }
.justify-content-between { justify-content: space-between; } .justify-content-center { justify-content: center; }
.gap-1 { gap: .35rem; } .gap-2 { gap: .65rem; } .gap-3 { gap: 1rem; }
.w-100 { width: 100%; } .h-100 { height: 100%; }
.text-center { text-align: center; } .text-end { text-align: right; } .text-muted { color: var(--nu-muted) !important; }
.text-success { color: var(--nu-success) !important; } .text-danger { color: var(--nu-danger) !important; }
.text-nowrap { white-space: nowrap; } .small { font-size: .875rem; }
.fw-bold { font-weight: 700; } .fw-semibold { font-weight: 600; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .35rem !important; }
.mb-2 { margin-bottom: .65rem !important; } .mb-3 { margin-bottom: 1rem !important; }
.mt-1 { margin-top: .35rem !important; } .mt-2 { margin-top: .65rem !important; }
.mt-3 { margin-top: 1rem !important; } .mt-4 { margin-top: 1.5rem !important; }
.ms-1 { margin-left: .35rem; } .ms-2 { margin-left: .65rem; } .me-1 { margin-right: .35rem; }
.px-0 { padding-left: 0; padding-right: 0; } .px-3 { padding-left: 1rem; padding-right: 1rem; }
.px-4 { padding-left: 1.4rem; padding-right: 1.4rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; } .py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.opacity-50 { opacity: .5; } .opacity-75 { opacity: .75; }
.border-bottom { border-bottom: 1px solid var(--nu-border); } .border-top { border-top: 1px solid var(--nu-border); }
.shadow { box-shadow: var(--shadow); }
.list-unstyled { list-style: none; padding-left: 0; margin: 0; }
.position-fixed { position: fixed; } .top-0 { top: 0; } .start-0 { left: 0; }
.bg-dark { background: #111; } .bg-opacity-50 { opacity: .5; }
.bg-white { background: #fff; }
@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-inline { display: inline !important; }
  .ms-lg-2 { margin-left: .65rem; }
}

/* Forms / buttons / tables / alerts */
.form-label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .92rem; }
.form-control, .form-select {
  width: 100%;
  border: 1px solid var(--nu-border);
  background: #fff;
  padding: .62rem .8rem;
  font: inherit;
  color: var(--nu-ink);
  border-radius: var(--radius);
}
.form-control:focus, .form-select:focus {
  outline: 2px solid rgba(11,93,59,.25);
  border-color: var(--nu-green);
}
.form-control-sm, .form-select-sm { padding: .35rem .55rem; font-size: .875rem; }
.form-check { display: flex; align-items: center; gap: .5rem; }
.form-check-input { width: 1rem; height: 1rem; }
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid transparent; padding: .55rem 1rem; font: inherit; font-weight: 600;
  cursor: pointer; border-radius: var(--radius); text-decoration: none !important;
  line-height: 1.2;
}
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-lg { padding: .85rem 1.35rem; font-size: 1.05rem; }
.btn-nu, .btn-success { background: var(--nu-green); border-color: var(--nu-green); color: #fff !important; }
.btn-nu:hover, .btn-success:hover { background: var(--nu-green-dark); border-color: var(--nu-green-dark); color: #fff !important; }
.btn-gold { background: var(--nu-gold); border-color: var(--nu-gold); color: #1a1400 !important; }
.btn-gold:hover { filter: brightness(.96); color: #1a1400 !important; }
.btn-outline-success { background: transparent; border-color: var(--nu-green); color: var(--nu-green) !important; }
.btn-outline-success:hover { background: var(--nu-green); color: #fff !important; }
.btn-outline-danger { background: transparent; border-color: var(--nu-danger); color: var(--nu-danger) !important; }
.btn-outline-danger:hover { background: var(--nu-danger); color: #fff !important; }
.btn-outline-dark { background: transparent; border-color: #222; color: #222 !important; }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.55); color: #fff !important; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-link { background: transparent; border: 0; color: var(--nu-green) !important; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: .75rem .85rem; border-bottom: 1px solid var(--nu-border); text-align: left; vertical-align: top; }
.table thead th {
  background: #e7f0ea; color: var(--nu-green-dark); font-size: .84rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.table-hover tbody tr:hover { background: #f5faf7; }
.table-sm th, .table-sm td { padding: .5rem .65rem; }
.table-responsive { overflow-x: auto; }
.alert {
  padding: .85rem 1rem; border: 1px solid transparent; margin-bottom: 1rem;
  border-left-width: 4px;
}
.alert-success { background: #e8f7ef; border-color: #abefc6; color: #067647; }
.alert-danger { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.alert-warning { background: #fffaeb; border-color: #fedf89; color: #b54708; }
.alert-info { background: #eff8ff; border-color: #b2ddff; color: #175cd3; }
.badge {
  display: inline-block; padding: .25rem .55rem; font-size: .75rem; font-weight: 700;
  border-radius: 999px; background: #e7e7e7; color: #333;
}
.badge.text-bg-success, .badge-status { background: #dcfae6; color: #067647; }
.badge.text-bg-secondary { background: #eaecf0; color: #344054; }
.badge.text-bg-light { background: #f8faf9; color: #344054; border: 1px solid var(--nu-border); }
.list-group { list-style: none; padding: 0; margin: 0; }
.list-group-item { padding: .75rem 0; border-bottom: 1px solid var(--nu-border); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0; color: var(--nu-muted); }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; margin-right: .35rem; color: #98a29c; }
.pagination { display: flex; gap: .25rem; list-style: none; padding: 0; }
.page-link { display: block; padding: .4rem .7rem; border: 1px solid var(--nu-border); background: #fff; color: var(--nu-green); }
.page-item.active .page-link { background: var(--nu-green); color: #fff; border-color: var(--nu-green); }
.navbar { display: block; }
.navbar-brand { text-decoration: none !important; }
.navbar-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem; }
.nav-link { display: block; padding: .55rem .75rem; color: var(--nu-ink); text-decoration: none !important; }
.nav-link:hover, .nav-link.active { color: var(--nu-green); }
.navbar-toggler {
  border: 1px solid var(--nu-border); background: #fff; padding: .4rem .65rem; cursor: pointer;
}
.navbar-toggler-icon {
  display: block; width: 1.35rem; height: 2px; background: var(--nu-ink);
  box-shadow: 0 .35rem 0 var(--nu-ink), 0 -.35rem 0 var(--nu-ink);
}
.collapse { display: none; }
.collapse.show, .navbar-collapse.show { display: block; }
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-collapse { display: flex !important; align-items: center; }
  .navbar-expand-lg .navbar-toggler { display: none; }
  .navbar-expand-lg .navbar-nav { margin-left: auto; align-items: center; }
}
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px; z-index: 1100;
  background: #fff; border: 1px solid var(--nu-border); box-shadow: var(--shadow); padding: .4rem 0;
}
.dropdown:hover > .dropdown-menu, .dropdown.show > .dropdown-menu { display: block; }
.dropdown-item { display: block; padding: .55rem 1rem; color: var(--nu-ink); text-decoration: none !important; }
.dropdown-item:hover { background: #eef5f1; color: var(--nu-green-dark); }
.dropdown-divider { border-top: 1px solid var(--nu-border); margin: .35rem 0; }
.dropdown-menu-end { right: 0; left: auto; }
.accordion-item { border: 1px solid var(--nu-border); background: #fff; margin-bottom: .5rem; }
.accordion-button {
  width: 100%; text-align: left; background: #f7faf8; border: 0; padding: .9rem 1rem;
  font: inherit; font-weight: 600; cursor: pointer;
}
.accordion-body { padding: 1rem; }
.accordion-collapse.collapse:not(.show) { display: none; }

/* ===== Public site ===== */
.public-topbar {
  background: linear-gradient(90deg, #052417, var(--nu-green-dark));
  color: #dce8e1;
  font-size: .875rem;
  padding: .45rem 0;
}
.public-nav {
  background: rgba(255,255,255,.97);
  border-bottom: 3px solid var(--nu-gold);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 4px 18px rgba(0,0,0,.04);
}
.brand-mark {
  display: flex; align-items: center; gap: .75rem; color: var(--nu-ink); font-weight: 700;
  text-decoration: none !important;
}
.brand-mark .logo {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(145deg, var(--nu-green), #1f8a58);
  color: var(--nu-gold); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.1rem;
  border: 2px solid var(--nu-gold); flex-shrink: 0;
}
.brand-mark .uni-name { font-family: var(--font-display); font-size: 1.08rem; line-height: 1.15; display: block; }
.brand-mark .uni-sub {
  display: block; font-family: var(--font-body); font-size: .7rem; font-weight: 600;
  color: var(--nu-muted); text-transform: uppercase; letter-spacing: .08em;
}

.hero {
  position: relative; min-height: 86vh; display: flex; align-items: center; color: #fff; overflow: hidden;
  background:
    linear-gradient(115deg, rgba(5,36,23,.94) 0%, rgba(11,93,59,.78) 48%, rgba(11,93,59,.45) 100%),
    radial-gradient(circle at 80% 20%, rgba(201,162,39,.35), transparent 40%),
    linear-gradient(145deg, #0b5d3b 0%, #1a4734 55%, #8a7020 140%);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(255,255,255,.03) 29px),
                    repeating-linear-gradient(90deg, transparent, transparent 28px, rgba(255,255,255,.03) 29px);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; right: -8%; bottom: -25%; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,39,.4), transparent 68%);
  animation: pulseGlow 7s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.12); opacity: 1; }
}
.hero-content { position: relative; z-index: 2; max-width: 720px; }
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.7rem); margin: .45rem 0 1rem;
  animation: riseIn .85s ease both;
}
.hero p {
  font-size: 1.15rem; max-width: 36rem; opacity: .95; margin: 0;
  animation: riseIn 1s ease .12s both;
}
.hero .cta-row { animation: riseIn 1.05s ease .22s both; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

.section { padding: 4.5rem 0; }
.section-title { margin-bottom: .35rem; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.section-lead { color: var(--nu-muted); max-width: 40rem; margin-bottom: 2rem; }

.stat-strip {
  background: linear-gradient(90deg, var(--nu-green-dark), var(--nu-green-mid));
  color: #fff; padding: 2.6rem 0; border-top: 4px solid var(--nu-gold); border-bottom: 4px solid var(--nu-gold);
}
.stat-item h3 { font-size: 2.1rem; color: var(--nu-gold); margin: 0 0 .2rem; }
.stat-item span { opacity: .92; font-size: .95rem; letter-spacing: .02em; }

.news-card, .prog-card, .faculty-card {
  background: var(--nu-card); border: 1px solid var(--nu-border); height: 100%;
  border-top: 3px solid var(--nu-green); transition: transform .25s ease, box-shadow .25s ease;
}
.news-card:hover, .prog-card:hover, .faculty-card:hover {
  transform: translateY(-5px); box-shadow: var(--shadow);
}
.news-card .body, .prog-card .body, .faculty-card .body { padding: 1.3rem; }
.meta { color: var(--nu-muted); font-size: .85rem; }

.page-hero {
  background:
    linear-gradient(120deg, rgba(5,36,23,.95), rgba(11,93,59,.88)),
    linear-gradient(135deg, #0b5d3b, #1f4d38);
  color: #fff; padding: 3.6rem 0 2.6rem; border-bottom: 4px solid var(--nu-gold);
}
.page-hero h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }

.public-footer {
  background: #052417; color: #c9d8d0; padding: 3.5rem 0 1.5rem;
}
.public-footer h5 { color: #fff; font-family: var(--font-display); margin-bottom: .8rem; }
.public-footer a { color: #c9d8d0; text-decoration: none; }
.public-footer a:hover { color: var(--nu-gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1rem; font-size: .9rem;
}

/* ===== Portal ===== */
.portal-shell { min-height: 100vh; display: flex; background: var(--nu-bg); }
.portal-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #052417 0%, #0b5d3b 70%, #127a4e 100%);
  color: #e7f0ea; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 1040;
  transition: transform .25s ease; border-right: 3px solid var(--nu-gold);
}
.portal-sidebar .side-brand {
  padding: 1.25rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex; gap: .75rem; align-items: center;
}
.portal-sidebar .nav-link {
  color: #cfe0d7; border-radius: .35rem; margin: .12rem .7rem; padding: .58rem .8rem;
  display: flex; gap: .65rem; align-items: center; text-decoration: none !important;
}
.portal-sidebar .nav-link:hover, .portal-sidebar .nav-link.active {
  background: rgba(201,162,39,.2); color: #fff;
}
.portal-main { margin-left: var(--sidebar-width); flex: 1; min-width: 0; }
.portal-top {
  background: #fff; border-bottom: 1px solid var(--nu-border); padding: .9rem 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 100;
}
.portal-content { padding: 1.5rem; }
.stat-card {
  background: #fff; border: 1px solid var(--nu-border); padding: 1.15rem 1.25rem; height: 100%;
  border-left: 4px solid var(--nu-green); box-shadow: 0 6px 18px rgba(8,68,43,.04);
}
.stat-card .label { color: var(--nu-muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .value {
  font-family: var(--font-display); font-size: 1.7rem; margin-top: .3rem; color: var(--nu-green-dark);
}
.panel {
  background: #fff; border: 1px solid var(--nu-border); padding: 1.25rem; margin-bottom: 1.25rem;
  box-shadow: 0 8px 22px rgba(8,68,43,.04);
}
.panel-title {
  font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 1rem;
  padding-bottom: .55rem; border-bottom: 2px solid var(--nu-gold-soft);
}
.sidebar-toggle { display: none; border: 0; background: transparent; font-size: 1.35rem; cursor: pointer; color: var(--nu-ink); }

.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(201,162,39,.22), transparent 35%),
    linear-gradient(135deg, #052417 0%, #0b5d3b 55%, #1a4734 100%);
}
.auth-card {
  width: 100%; max-width: 440px; background: #fff; padding: 2rem;
  border-top: 5px solid var(--nu-gold); box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--nu-muted); }

@media (max-width: 991.98px) {
  .portal-sidebar { transform: translateX(-100%); }
  .portal-sidebar.open { transform: translateX(0); }
  .portal-main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .hero { min-height: 74vh; padding: 4rem 0; }
  .public-nav .navbar-nav { flex-direction: column; align-items: stretch; padding: .75rem 0 1rem; }
}
