/* Shared styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #555;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
}

.page-shell {
  min-height: 100vh;
  min-height: 100svh;
  padding: 18px 24px 24px;
}

.nav-bar {
  background: #c5cfd6;
  min-height: 76px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
  position: sticky;
  top: 18px;
  z-index: 1000;
  margin-bottom: 24px;
  gap: 16px;
  transform: translateY(0);
  transition: transform .25s ease;
  will-change: transform;
}

/* Applied by navigation.js while the visitor scrolls down. */
.nav-bar.nav-hidden {
  transform: translateY(calc(-100% - 24px));
}

.logo-circle {
  width: 84px;
  height: 84px;
  background: #eaecee;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  margin-left: -2px;
}

/* Shared logo image sizing for every page header and the generated PDF. */
.company_logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 18px;
  flex: 1;
}

.theme-btn {
  min-width: 136px;
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 25px;
  background: linear-gradient(90deg, #8b5cf6 0%, #5eead4 100%);
  color: #000;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 5px 10px rgba(0, 0, 0, .3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .1s ease;
}

.theme-btn:active {
  transform: scale(.98);
}

.theme-btn.active-nav {
  background: linear-gradient(90deg, #0d9488 0%, #84cc16 100%);
}

.index-content-box {
  background: #c5cfd6;
  border-radius: 30px;
  width: 100%;
  color: #000;
  overflow: hidden;
}

/* All three sections remain in the document and stack vertically. */
.section-panel {
  width: 100%;
  min-height: calc(100vh - 144px);
  min-height: calc(100svh - 144px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  scroll-margin-top: 112px;
}

.section-panel h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.section-panel p {
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .nav-left-group {
    gap: 12px;
    margin-left: 12px;
  }

  .theme-btn {
    min-width: 105px;
    padding: 0 14px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 10px 10px 18px;
  }

  /* Intentional two-row layout: logo + Products, then three section links. */
  #main-navbar {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "logo products"
      "links links";
    align-items: center;
    gap: 8px;
    padding: 8px;
    top: 8px;
    border-radius: 22px;
    margin-bottom: 16px;
  }

  #main-navbar > .logo-circle {
    grid-area: logo;
    width: 56px;
    height: 56px;
    margin: 0;
    font-size: 13px;
  }

  #main-navbar > .nav-left-group {
    grid-area: links;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    margin: 0;
  }

  #main-navbar > .nav-left-group .theme-btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 5px;
    font-size: 11px;
    letter-spacing: 0;
  }

  #main-navbar > .theme-btn {
    grid-area: products;
    justify-self: end;
    min-width: 108px;
    min-height: 42px;
    padding: 0 16px;
    font-size: 12px;
  }

  .index-content-box {
    border-radius: 22px;
  }

  .section-panel {
    min-height: 72vh;
    min-height: 72svh;
    padding: 28px 18px;
    scroll-margin-top: 142px;
  }

  .section-panel h1 {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .section-panel p {
    max-width: 34ch;
    font-size: 15px;
    line-height: 1.55;
  }
}

@media (max-width: 340px) {
  #main-navbar > .nav-left-group .theme-btn {
    font-size: 10px;
    padding-inline: 2px;
  }

  #main-navbar > .theme-btn {
    min-width: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-bar, .theme-btn { transition: none; }
}
