/* Loader style */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.8) url('/static/img/loader.gif') no-repeat center center;
    z-index: 9999;
    display: none;
}

/* Show loader when not hidden */
.loader:not(.hidden) {
    display: block;
}

/* Default hidden state */
.hidden {
    display: none !important;
}

/* Header container styling */
header {
    background-color: rgba(255, 255, 255, 0.85); /* semi-transparent white */
    backdrop-filter: blur(10px);                 /* blur effect behind header */
    border-radius: 12px;                         /* rounded corners */
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);     /* subtle shadow */
    text-align: center;                          /* center the image */
    margin-bottom: 1rem;                         /* spacing below header */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Make the header image responsive */
header img {
    max-width: 100%;
    height: auto;
    border-radius: 12px; /* same as header container for consistency */
}

/* Optional: darker header on scroll like navbar */
header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Navbar container with glass effect */
.navbar .container > .w-100 {
    background-color: rgba(255, 255, 255, 0.85); /* semi-transparent white */
    backdrop-filter: blur(10px); /* blur effect behind navbar */
    border-radius: 12px;         /* rounded corners */
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* subtle shadow */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Nav links */
.navbar-nav .nav-link {
    color: #333333;              /* darker gray text */
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Hover effect for links */
.navbar-nav .nav-link:hover {
    background-color: #000;      /* black background on hover */
    color: #fff;                 /* white text */
    text-decoration: none;
}

/* Active link styling */
.navbar-nav .nav-link.active {
    background-color: #000;
    color: #fff;
}

/* Navbar toggler (hamburger) */
.navbar-toggler {
    border: none;
}

/* Hamburger icon color */
.navbar-toggler-icon {
    filter: invert(0.5);
}

/* Optional: navbar background becomes slightly darker on scroll */
.navbar.scrolled .container > .w-100 {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Main list: numbers 1, 2, 3... */
.main-list {
  counter-reset: main-counter;
  list-style: none;
  padding-left: 1em;
  margin-bottom: 1rem;
}

.main-list > li {
  counter-increment: main-counter;
  margin-bottom: 1rem;
  padding-left: 2.5em;  /* space for number */
  position: relative;
}

.main-list > li::before {
  content: counter(main-counter) ". ";
  position: absolute;
  left: 0;
}

/* Sub-list: 1.1, 1.2, 1.3... */
.sub-list {
  counter-reset: sub-counter;
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

.sub-list > li {
  counter-increment: sub-counter;
  margin-bottom: 0.5rem;
  padding-left: 2.5em;  /* space for 1.1, 1.2 etc. */
  position: relative;
}

.sub-list > li::before {
  content: counter(main-counter) "." counter(sub-counter) " ";
  position: absolute;
  left: 0;
}

/* Sub-sub-list: letters a, b, c... */
.sub-sub-list {
  list-style-type: lower-alpha;
  padding-left: 2.5em;  /* indent from parent 1.1, 1.2 */
  margin-top: 0.25rem;
}

body {
    overflow-y: auto;
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: transparent;
    color: black;
    border: 2px solid black;
    font-size: 24px;
    cursor: pointer;
    display: none;              /* hidden by default */
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: background-color 0.3s, color 0.3s;
}

#back-to-top.show {           /* class added via JS when scrolling */
    display: flex;
}

#back-to-top:hover {
    background-color: black;
    color: white;
}