@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Exo:wght@100;200;300;400&display=swap');

html {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

*,
*:before,
*:after {
  -webkit-box-sizing: inherit;
  -moz-box-sizing: inherit;
  box-sizing: inherit;
}

body {
  font-family: 'Exo', 'Montserrat', sans-serif;
  position: relative;
  font-size: 18px;
  background: linear-gradient(135deg, #fcecd4, #c7ecee);
  min-height: 100vh;
}

[data-turbo-preview] body {
  opacity: .5;
}

.bkg-success {
  background: linear-gradient(90deg, #eaffea, #f7fbfe);
}

.bkg-info {
  background: linear-gradient(90deg, #eafcff, #f7fbfe);
}

.bkg-warning {
  background: linear-gradient(90deg, #f8ffd0, #f7fbfe);
}

.warning-box {
  position: relative;
  background: #f8ffd0;
  border-radius: .5rem;
  box-shadow: 0 0 4px rgba(0, 0, 0, .5);

}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li {
  color: #6c757d;
}

form label.required::after,
form legend.required::after {
  content: " *";
  color: red;
}

/* fix all checkboxes/radios getting red astrix */
.form-check-label::after {
  content: '' !important;
}

.fibo {
  width: 100%;
  aspect-ratio: 1.618 / 1;
  object-fit: cover;
  display: block;
}

@media (max-width: 576px) {
  .fibo {
    max-width: 240px;
    /* or 250px — adjust as needed */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

.card.shadow-glow {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-bottom: 6px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card.shadow-glow-primary {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 25px rgba(13, 110, 253, 0.45);
  border-bottom-color: #0d6efd;
}

.card.shadow-glow-primary:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 40px rgba(13, 110, 253, 0.6);
}

.card.shadow-glow-secondary {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 25px rgba(108, 117, 125, 0.4);
  border-bottom-color: #6c757d;
}

.card.shadow-glow-secondary:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 40px rgba(108, 117, 125, 0.55);
}

.card.shadow-glow-success {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 25px rgba(25, 135, 84, 0.4);
  border-bottom-color: #198754;
}

.card.shadow-glow-success:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 40px rgba(25, 135, 84, 0.6);
}

.card.shadow-glow-danger {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 25px rgba(220, 53, 69, 0.45);
  border-bottom-color: #dc3545;
}

.card.shadow-glow-danger:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 40px rgba(220, 53, 69, 0.65);
}

.card.shadow-glow-warning {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 25px rgba(255, 193, 7, 0.4);
  border-bottom-color: #ffc107;
}

.card.shadow-glow-warning:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 40px rgba(255, 193, 7, 0.6);
}

.card.shadow-glow-info {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 25px rgba(13, 202, 240, 0.4);
  border-bottom-color: #0dcaf0;
}

.card.shadow-glow-info:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 40px rgba(13, 202, 240, 0.6);
}

.example-box {
  background: #f8f9fa;
  padding: 1em;
  border-left: 3px solid #3498db;
  margin: 1em 0;
}

.note {
  background: #fff9e6;
  padding: 1em;
  border-left: 3px solid #f39c12;
  margin: 1.5em 0;
}

.emph {
  font-weight: bold;
  font-size: 1.1em;
  line-height: 1;
  display: inline-block;
  color: #6c757d;
  /* vertical-align: middle; */
}

/* Core Timeline Styles */
.user-flow-timeline {
  display: flex;
  /* Makes the list items a flex container */
  justify-content: space-between;
  align-items: flex-start;
  list-style: none;
  /* Removes list bullet points */
  padding: 0;
  margin: 0;
  position: relative;
}

/* The horizontal line that connects the steps */
.user-flow-timeline::before {
  content: '';
  position: absolute;
  top: 1.25rem;
  /* Vertically centers the line with the counter circles */
  left: 0;
  right: 0;
  height: 2px;
  background-color: #dee2e6;
  /* BS5 color for borders */
  z-index: 0;
}

/* Styles for each individual step */
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  width: 25%;
  /* Ensures each step takes up equal space */
  z-index: 1;
  /* Puts steps above the line */
}

/* Style for the step counter circle */
.step-counter {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: #6c757d;
  /* BS5 secondary color */
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* Style for the title */
.step-title {
  font-size: 1rem;
  color: #212529;
  /* BS5 dark color */
  margin-top: 0.5rem;
}

/* --- Mobile Styles for ui onboarding timeline (Vertical Layout) --- */
@media (max-width: 767px) {
  .user-flow-timeline {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Removes the horizontal line on mobile */
  .user-flow-timeline::before {
    display: none;
  }

  /* Adds a vertical line on mobile */
  .user-flow-timeline::after {
    content: '';
    position: absolute;
    top: 0.5rem;
    bottom: 0;
    left: 1.25rem;
    /* Aligns with the center of the step counter */
    width: 2px;
    background-color: #dee2e6;
    z-index: 0;
  }

  .timeline-step {
    flex-direction: row;
    align-items: center;
    text-align: left;
    margin-bottom: 1.5rem;
    width: 100%;
  }

  .step-counter {
    margin-bottom: 0;
    margin-right: 1.5rem;
    /* Space between counter and title */
  }
}

/* JOURNEY MAP START */
.journey-map-timeline {
  --steps-per-row: 4;
  display: grid;
  grid-template-columns: repeat(var(--steps-per-row), 1fr);
  gap: 20px 40px;
  list-style: none;
  padding: 0;
  margin: 2rem auto;
  max-width: 1100px;
  position: relative;
}

/* each item gets explicit grid placement using inline --row / --col */
.journey-step {
  position: relative;
  z-index: 2;
  padding: 0.75rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent;
}

/* place by computed col/row */
.journey-step {
  grid-column: calc(var(--col) + 1);
  grid-row: calc(var(--row) + 1);
}

/* reversed rows map col -> mirrored column */
.journey-step.reverse-row {
  grid-column: calc(var(--steps-per-row) - var(--col));
}

/* counter bubble */
.journey-counter {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #6c757d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: .5rem;
}

.journey-counter.journey-gate {
  border-radius: 50%;
  background-image: url('/images/gate.png');
  transform: translateY(-20%);
  background-color: #97cbff !important;
  width: 50px;
  height: 50px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: 2px solid #97cbff;
}

.journey-ring::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  border-radius: 50%;
  border: 2px solid #6c757d;
  border-color: var(--ring-color);
}

.journey-step.active .journey-counter {
  background-color: #198754;
}

.journey-title {
  font-weight: 600;
  color: #212529;
  width: 100%;
  font-size: .95rem;
}

/* horizontal connector inside each item (connects to the next item in visual order) */
.journey-step::after {
  content: "";
  position: absolute;
  top: 30px;
  height: 2px;
  background-color: #97cbff;
  z-index: 1;
  left: calc(50% + 20px);
  right: calc(-50% - 20px);
}

/* For reversed rows draw line to the left instead */
.journey-step.reverse-row::after {
  left: calc(-50% - 20px);
  right: calc(50% + 20px);
}

/* hide horizontal connector for last visual item in each row */
.journey-step.row-end::after {
  display: none;
}

/* vertical connector line */
.journey-step.row-end::before {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 50%;
  width: 2px;
  height: 100px;
  background-color: #97cbff;
  transform: translateX(-50%);
  z-index: 0;
}


/* For reversed row ends, vertical connector should align with mirrored column */
.journey-step.reverse-row.row-end::before {
  left: 50%;
}

/* if next row start needs small horizontal offset connector, draw short elbow on next row-start */
.journey-step.row-start::before {
  /* hidden by default; only used visually if we want elbow. kept for future tweaks */
  content: "";
  display: none;
}

/* make connectors sit behind counters */
.journey-map-timeline .journey-step::after,
.journey-map-timeline .journey-step::before {
  z-index: 0;
}

.journey-title {
  z-index: 1;
}

.journey-title.warning-box::before {
  content: "\F034E";
  /* mdi-map */
  font-family: "Material Design Icons";
  position: absolute;
  top: -85px;
  left: calc(50% + 27px);
  transform: translateX(-50%);
  font-size: 48px;
  color: #604fff;
  z-index: 1000;
}

/* MOBILE TIMELINE: collapse to single column timeline */
@media (max-width: 767px) {

  /* Timeline container */
  .journey-map-timeline {
    display: block;
    /* one column */
    position: relative;
    padding-left: 0;
    /* remove extra space, circles go flush left */
  }

  /* Vertical connector line on left */
  .journey-map-timeline::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 26px;
    /* aligns with center of circle */
    width: 2px;
    background-color: #dee2e6;
    z-index: 1;
  }

  /* Each step becomes flex row */
  .journey-step {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    margin-bottom: 1.5rem;
    /* spacing between steps */
  }

  /* Remove grid positioning and pseudo-elements */
  .journey-step,
  .journey-step.reverse-row {
    grid-column: auto;
    grid-row: auto;
  }

  .journey-step::after,
  .journey-step::before {
    display: none;
  }

  /* Step circle aligned left */
  .journey-counter {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #6c757d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 1;
    margin-top: 10px;
    margin-left: 0;
    /* flush left */
    margin-right: 12px;
    /* space to title */
    border: 2px solid #dee2e6;
    /* optional visual */
  }

  .journey-counter.journey-gate {
    width: 50px;
    height: 50px;
    margin-left: -10px !important;
  }

  /* Active step color */
  .journey-step.active .journey-counter {
    background-color: #198754;
  }

  /* Title appears to the right */
  .journey-title {
    flex: 1;
    text-align: left;
  }

  .journey-title.warning-box::before {
    top: -30px;
    left: 0px;
    transform: translateX(-50%);
    z-index: 1000;
  }
}

/* JOURNEY MAP END */

/* Content Box Start */

/* if we want simple content bkg, use this. else use the ::before version */
/* .content-box {
  position: relative;
  border: 2px solid transparent;
  border-radius: 8px;
  background: 
    linear-gradient(#fff, #dae3e6) padding-box,
    linear-gradient(135deg, #a99eee, #07d400) border-box;
  padding: 1.5rem;
  margin: 2rem 0;
} */
.content-box {
  position: relative;
  border-radius: 8px;
  padding: 24px 8px 0 8px;
  margin-top: 2rem;
  background: transparent;
  z-index: 0;
}

.content-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 2px;
  background: linear-gradient(135deg, #a99eee, #07d400);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

.box-title {
  position: absolute;
  top: -0.8rem;
  left: 1rem;
  background: #fff;
  padding: 0 0.5rem;
  font-weight: 600;
  color: #444;
}

.box-inner {
  position: relative;
  z-index: 1;
}

/* Content Box END */

/* Journey Content Page */
/* 1. LAYOUT */
#course-container {
  display: flex;
  flex-direction: row;
  min-height: 30vh!important;
  background: #f8f9fa;
}

#sidebar-nav {
  background: #fff;
  border-right: 1px solid #dee2e6;
  transition: width 0.3s;
  z-index: 1050;
}

#main-content {
  flex: 1;
  min-width: 0;
}

/* 2. DESKTOP (Side-by-side) */
@media (min-width: 768px) {
  #sidebar-nav {
    width: 300px;
    position: sticky;
    top: 0;
    min-height: 30vh!important;
  }

  #sidebar-nav.collapsed {
    width: 80px;
  }

  #sidebar-nav.collapsed .nav-link {
    display: flex !important;
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #sidebar-nav.collapsed .chapter-circle {
    margin-right: 0 !important;
    flex-shrink: 0;
  }

  #sidebar-nav.collapsed .sidebar-header-text,
  #sidebar-nav.collapsed .sidebar-label {
    display: none !important;
  }

  #sidebar-nav.collapsed .d-none.d-md-flex {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #mobile-toggle-bar {
    display: none !important;
  }
}

/* 3. MOBILE (Stacked & Sticky) */
@media (max-width: 767px) {
  #course-container {
    flex-direction: column;
  }

  #sidebar-nav {
    width: 100% !important;
    position: sticky;
    top: 0;
    border-bottom: 2px solid #dee2e6;
  }

  /* Hide the actual list on mobile by default */
  #v-pills-tab {
    display: none;
    flex-direction: column;
    padding: 10px;
  }

  /* Show list when we add the 'show' class via JS */
  #v-pills-tab.show {
    display: flex !important;
  }

  /* This is the bar you see on mobile */
  #mobile-toggle-bar {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: bold;
  }

  #toggleSidebar {
    display: none !important;
  }

  .sidebar-header-text {
    display: none !important;
  }

  .nav-link {
    width: 100%;
    margin-bottom: 5px !important;
    justify-content: flex-start;
  }
}

/* SHARED STYLES */
.chapter-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-weight: bold;
}

.nav-link.active .chapter-circle {
  background: #0d6efd;
  color: #fff;
}

/* END OF JOURNEY CONTENT NAV */

/* Style for footer navigation buttons */
.d-flex.gap-2 .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.d-flex.gap-2 .btn i {
  margin-right: 8px;
  font-size: 1.1rem;
}

/* On mobile, make them take full width if they wrap */
@media (max-width: 576px) {
  .d-flex.gap-2 {
    flex-direction: column;
  }

  .d-flex.gap-2 .btn {
    width: 100%;
    justify-content: center;
  }
}