/* Mobile-first responsive baseline */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* fluid base size: 15px on small, scales with viewport up to 18px */
  font-size: clamp(15px, 1.6vw, 18px);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  color: #111;
  background: #fff;
  -webkit-font-smoothing:antialiased;
}

/* Page container */
.container {
  width: 100%;
  max-width: 1100px;
  padding: 1rem;
  margin: 0 auto;
}

/* Sections */
section.page {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

/* Responsive headings */
h1 { font-size: clamp(1.5rem, 5vw, 2.5rem); margin: .4em 0; }
h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); margin: .4em 0; }
h3 { font-size: clamp(1.1rem, 3.2vw, 1.25rem); margin: .35em 0; }

/* Paragraphs & lists */
p, li { font-size: 1rem; margin: .45rem 0; }
.training-details { padding-left: 1.25rem; }

/* Touch targets */
button,
.nav-toggle,
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: .5rem .75rem; /* only for actual buttons / toggles */
}

/* Keep site-nav links touch-friendly on small screens, but let assets/style.css control desktop nav */
@media (max-width: 768px) {
  .site-nav a {
    padding: .5rem .5rem;
    display: block;
  }
}

/* Responsive images */
img { max-width: 100%; height: auto; display: block; }

/* Responsive iframes / videos */
.responsive-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}
.responsive-embed iframe,
.responsive-embed object,
.responsive-embed embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* small tweaks for larger screens */
@media (min-width: 768px) {
  .container { padding: 1.5rem; }
  body { line-height: 1.6; }
}


@media (max-width: 768px) {
  /* Show hamburger toggle */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Full-width mobile navigation panel */
  .site-nav {
    display: none;
    position: absolute;
    top: var(--site-header-height, 64px);
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100vh - var(--site-header-height, 64px));
    background: var(--dark-green, #245348);
    overflow-x: hidden;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0;
    z-index: 9998;
  }

  header.mobile-menu-open .site-nav {
    display: flex;
  }

  /* Standardize mobile link targets and buttons */
  .site-nav a,
  .nav-dropdown-toggle,
  .submenu-toggle,
  .mobile-back-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.85rem 1rem;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: var(--white, #ffffff);
    background: transparent;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    font: inherit;
  }

  .nav-dropdown,
  .submenu {
    width: 100%;
    position: static;
  }

  /* Drill-down subpanels overlaying the primary menu tray */
  .dropdown-menu,
  .submenu-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-green, #245348);
    z-index: 9999;
    padding-top: 0.5rem;
    box-shadow: none;
    border: none;
    transform: none;
  }

  /* Active panel state triggered by JS */
  .dropdown-menu.is-active,
  .submenu-menu.is-active {
    display: flex;
  }

  /* Back Button styling inside subpanels */
  .mobile-back-btn {
    display: flex;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
    cursor: pointer;
  }
}