/* Hero Section */
.hero-section {
  padding: 2rem 1rem;   /* pienempi korkeus (esim. 3 rem ylös/alas) */
  text-align: center;
  background: #d4e7fa;  /* kevyt taustaväri */
}

.hero-section h1 {
  font-size: 2rem;      /* pienempi otsikko */
  margin-bottom: 1rem;
}

.hero-section p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.btn-primary-reverse {
    background-color: #fff;
    color: #0d6efd;
    border: 2px solid #0d6efd;
}

.btn-primary-reverse:hover {
    background-color: #0d6efd;
    color: #fff;
}
.btn-secondary {
    background-color: white;
    color: #667eea;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.front-page-card {
    border: 2px solid #0d6efd;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
    overflow: hidden;
    background-color: #f8f9fa; /* harmaa tausta */
}

.front-page-card:hover {
    transform: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.front-page-header {
    background: #0d6efd; /* vaaleampi mutta kontrastiltaan hyvä sininen */
    color: #fff;         
    padding: 16px 20px;
    text-align: center;
    border-bottom: none;
}

.front-page-header h5 {
    margin: 0;
    font-weight: 500;      /* hieman kevyempi mutta ei liian ohut */
    font-size: 1rem;       /* pienempi kuin aiemmin (1.2rem) */
    color: #fff;           /* pysyy valkoisena */
    line-height: 1.3;      /* parempi luettavuus pienellä fontilla */
}
.front-page-card-text {
    min-height: 90px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
}

.img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

.btn-front-page {
    background-color: #667eea;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-front-page:hover {
    background-color: #764ba2;
    color: white;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar .nav-link {
    color: #fff !important; /* kaikki nav-linkit valkoisiksi */
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #e2e6ea !important; /* vaaleampi hover-väri, säilyttää kontrastin */
}

.navbar .nav-link.active {
    font-weight: 600;         /* korostetaan aktiivinen linkki */
    border-bottom: 2px solid #fff; /* pieni visuaalinen korostus */
}
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

footer {
    background-color: #0d6efd;
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

footer a:hover {
    color: #e2e6ea; /* vaaleampi hover */
}

/* Hover ja aktiivinen samaksi vaaleanharmaaksi */
.list-group-item-action:hover,
.list-group-item-action.active {
  background-color: #ff8800 !important;  /* sama mitä hover käyttää */
  color: #000 !important;
  border-color: #ff8800!important;
}

/* Add this to your existing <style> section */
#courseSidebar {
    max-height: calc(100vh - 200px); /* adjust the 200px based on your header height */
    overflow-y: auto;
    overflow-x: hidden;
}

/* Optional: Custom scrollbar styling */
#courseSidebar::-webkit-scrollbar {
    width: 6px;
}

#courseSidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#courseSidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#courseSidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Module headerit valkoisella taustalla */
#courseSidebar .list-group-item.bg-light {
  background-color: #fff !important;
  font-weight: 600;
  color: #000;
}

#lessonContent h3 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

#lessonContent h4 {
    color: #34495e;
    margin-top: 1.2rem;
    margin-bottom: 0.8rem;
}

#lessonContent ul, #lessonContent ol {
    margin-bottom: 1rem;
}

#lessonContent li {
    margin-bottom: 0.5rem;
}

#lessonContent strong {
    color: #2c3e50;
}

.list-group-item.active {
    background-color: #e7e7e7;  /* vaalea harmaa */
    border-color: #e7e7e7;
    color: #000 !important;     /* pakotetaan musta teksti */
}

.list-group-item small {
    font-size: 0.85rem;
}

/* ✅ Completed course checkmark */
.course-complete-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #198754; /* Bootstrap success green */
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  z-index: 5;
  transition: transform 0.2s ease-in-out, opacity 0.3s ease;
}
.course-complete-badge:hover {
  transform: scale(1.15);
  opacity: 0.9;
}


.star-rating {
    display: inline-block;
    font-size: 1.5em;
    line-height: 1;
    letter-spacing: -3.5px;
}
.star-rating .star {
    display: inline-block;
    position: relative;
    color: #ffc107;
    -webkit-text-stroke: 0.5px #999;
}
.star-rating .star.empty {
    color: #e0e0e0;
    -webkit-text-stroke: 0.5px #999;
}
.star-rating .star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #ffc107;
    -webkit-text-stroke: 0.5px #999;
}
.star-rating .star.half::after {
    content: '★';
    color: #e0e0e0;
    -webkit-text-stroke: 0.5px #999;
}