/* MBI - Makerere Business Institute CSS Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* CSS Custom Variables */
:root {
  --primary: #0d386b;
  --primary-light: #1a5699;
  --secondary: #d92c3a;
  --secondary-hover: #b31d2a;
  --accent: #d92c3a;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #f1f5f9;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-premium: 0 20px 25px -5px rgba(11, 44, 86, 0.1), 0 10px 10px -5px rgba(11, 44, 86, 0.04);
  
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-blur: blur(12px);

  --font-body: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
}

/* Base resets & Defaults */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: #334155;
  font-weight: 400;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #e2e8f0;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Layout Elements */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
  position: relative;
}

/* Header & Sticky Navigation */
.top-bar {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 500;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-info span {
  margin-right: 1.5rem;
}

.top-bar-info i {
  color: var(--secondary);
  margin-right: 0.5rem;
}

.top-bar-cta a {
  background-color: var(--secondary);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
}

.top-bar-cta a:hover {
  background-color: var(--bg-white);
  color: var(--primary);
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

header.scrolled {
  box-shadow: var(--shadow-md);
  background-color: rgba(11, 44, 86, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.scrolled .nav-link {
  color: var(--text-light);
}

header.scrolled .logo-text {
  color: var(--bg-white);
}

header.scrolled .nav-cta {
  background-color: var(--secondary);
  color: var(--primary) !important;
}

header.scrolled .hamburger span {
  background-color: var(--bg-white);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 50px;
  width: 50px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--primary-light);
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  color: var(--primary);
}

.logo-text span {
  color: var(--secondary);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  background-color: var(--primary);
  color: var(--bg-white) !important;
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.nav-cta:hover {
  background-color: var(--secondary);
  color: var(--primary) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  flex-direction: column;
  gap: 6px;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 3px;
  transition: var(--transition);
}

/* Hero Section with Video Background */
.hero-video-container {
  position: relative;
  height: 85vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: white;
}

.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(11, 44, 86, 0.9) 30%, rgba(15, 62, 112, 0.7) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 750px;
  animation: fadeInUp 1s ease-out;
}

.badge {
  background-color: var(--secondary);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 3.5rem;
  color: white;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.btn-group {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--secondary);
  color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  border-color: var(--bg-white);
  color: var(--bg-white);
}

.btn-outline:hover {
  background-color: var(--bg-white);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Glassmorphism Card Overlay Option */
.hero-glass-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  max-width: 650px;
  box-shadow: var(--shadow-lg);
}

/* Section Titles */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

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

.section-title {
  font-size: 2.5rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--secondary);
  border-radius: 2px;
}

/* Stats Section */
.stats-section {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 4rem 0;
  margin-top: -3rem;
  position: relative;
  z-index: 10;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 3rem;
  color: var(--secondary);
  margin-bottom: 0.25rem;
  font-weight: 800;
}

.stat-item p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
}

/* Cards (Feature/Course) */
.card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-premium);
  border-color: rgba(11, 44, 86, 0.15);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary);
  transform: scaleY(0);
  transition: var(--transition);
  origin-y: top;
}

.card:hover::before {
  transform: scaleY(1);
}

.card-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(11, 44, 86, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.card:hover .card-icon {
  background-color: var(--secondary);
  color: var(--primary);
  transform: rotate(360deg);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Course Listing styles */
.course-filter-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.6rem 1.5rem;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background-color: var(--bg-white);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary);
  color: var(--bg-white);
  border-color: var(--primary);
}

.course-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-premium);
}

.course-img-placeholder {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  font-size: 3rem;
  position: relative;
}

.course-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--secondary);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.course-details {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.course-details h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.course-meta span i {
  color: var(--secondary);
  margin-right: 0.25rem;
}

/* Notice Board */
.notice-board {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.notice-header {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 1.5rem;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notice-header i {
  color: var(--secondary);
  font-size: 1.25rem;
}

.notice-list {
  list-style: none;
}

.notice-item {
  padding: 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  transition: var(--transition);
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-item:hover {
  background-color: rgba(11, 44, 86, 0.02);
}

.notice-date {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}

.notice-item h4 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.notice-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Dynamic Forms - Application Steps */
.form-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.form-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 2px;
  background-color: #cbd5e1;
  z-index: 1;
}

.step-indicator {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #cbd5e1;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  z-index: 2;
  transition: var(--transition);
  position: relative;
}

.step-indicator span {
  position: absolute;
  top: 45px;
  font-size: 0.75rem;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text-muted);
}

.step-indicator.active {
  background-color: var(--primary);
  color: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(11, 44, 86, 0.2);
}

.step-indicator.active span {
  color: var(--primary);
}

.step-indicator.completed {
  background-color: var(--secondary);
  color: var(--primary);
}

.step-indicator.completed span {
  color: var(--primary-light);
}

.form-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.form-panel.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: span 2;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

input, select, textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 44, 86, 0.1);
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

/* Gallery Lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 250px;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 44, 86, 0.6);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-caption {
  color: white;
  margin-top: 1rem;
  font-family: var(--font-heading);
  font-weight: 500;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 3rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Footer styling */
footer {
  background-color: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 5rem 0 2rem 0;
  border-top: 4px solid var(--secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-logo {
  color: white;
  margin-bottom: 1.5rem;
}

.footer-logo span {
  color: var(--secondary);
}

.footer-col h4 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--secondary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

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

.footer-contact li {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.footer-contact i {
  color: var(--secondary);
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 36px;
  height: 36px;
  background-color: rgba(255,255,255,0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.social-link:hover {
  background-color: var(--secondary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Media Queries */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  section {
    padding: 3.5rem 0;
  }
  
  .top-bar-info {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--primary);
    flex-direction: column;
    padding: 3rem 1.5rem;
    transition: var(--transition);
    align-items: flex-start;
    gap: 1.5rem;
    z-index: 999;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-link {
    color: var(--bg-white);
    font-size: 1.1rem;
    width: 100%;
  }
  
  .nav-cta {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
  }

  .hero-title {
    font-size: 2.3rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group.full-width {
    grid-column: span 1;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
