.wagtail_edit_button {
  position: fixed;
  bottom: 50px;
  left: 50px;
  height: 30px;
  width: 30px;
  display: block;
  background: url('/static/cms/images/wagtail.png') center/25px no-repeat;
  z-index: 100;
  cursor: pointer;
}

.wagtail_edit_button:hover {
  opacity: 0.6;
}

@media (max-width: 1200px) {
  .wagtail_edit_button {
    bottom: 20px;
    right: 20px;
  }
}



/* Main section */


/* Sky background with the page on a translucent white panel, as on the
   Directory and Help. The gap above is padding rather than a margin, so it
   doesn't collapse through <main> and push the sky down. */
.main {
  box-sizing: border-box;
  padding: 20px 20px 50px;
  background-color: var(--sky-bottom);
  background-image: url('/static/images/background_sky_v4.jpg');
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
}


.page_cont {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 60vh;
  padding: 0 0 40px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
}

@media (max-width: 1200px) {
  .main {
    padding: 20px 10px 30px;
  }
}


/* Page title */

.page_title_cont {
  margin: 0 50px;
}

@media (max-width: 1200px) {
  .page_title_cont {
    margin: 0 20px;
  }
}

.page_title_cont .page_title_block {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.page_title_cont .page_title {
  margin: 0;
  padding-top: 50px;
  flex: 1 1 0;
  min-width: 0;
  color: var(--mid-green);
  font-weight: 900;
}

.page_title_cont .page_racpg_logo {
  display: block;
  flex: 0 0 auto;
  width: 250px;
  height: auto;
  margin-top: 20px;
}

/* tablets and phones: the title gets the full width, the logo goes under it */
@media (max-width: 800px) {
  .page_title_cont .page_title_block {
    flex-wrap: wrap;
    align-items: flex-start;
    padding-top: 30px;
  }

  .page_title_cont .page_title {
    padding-top: 0;
    flex-basis: 100%;
  }

  .page_title_cont .page_racpg_logo {
    width: 200px;
    margin-top: 4px;
    margin-bottom: 10px;
  }
}

/* phones: smaller page title (CMS pages) - headings in the page content are in richtext.css */
@media (max-width: 600px) {
  .page_title_cont .page_title {
    font-size: 28px;
  }
}


/* Section menu - on sub-pages, under the title (main.js render_section_menu). Clickable = Nature Dose bright blue. */

.section_menu {
  margin: 12px 50px 0;
}

@media (max-width: 1200px) {
  .section_menu {
    margin: 12px 20px 0;
  }
}

/* the first block under the menu sits closer than blocks usually do (50px) */
.page_cont > .section_menu + * {
  margin-top: 25px;
}

/* Small pills so the whole menu fits on one line on desktop; tablets and phones wrap onto more lines (below). */
.section_menu ul {
  max-width: 1200px;
  margin: auto;
  padding: 3px 0;  /* room for the focus outline */
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;  /* swipe, no scrollbar */
  -webkit-overflow-scrolling: touch;
}

.section_menu ul::-webkit-scrollbar {
  display: none;
}

.section_menu li {
  flex: 0 0 auto;
  margin: 0;
}

.section_menu a {
  display: block;
  padding: 5px 12px;
  border: 2px solid var(--bright-blue);
  border-radius: 5px;
  color: var(--bright-blue);
  background: var(--white);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

.section_menu a.active {
  color: var(--white);
  background: var(--bright-blue);
}

/* tablets and phones: the pills wrap onto more lines (smaller still on phones) */
@media (max-width: 1000px) {
  .section_menu ul {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

@media (max-width: 600px) {
  .section_menu a {
    padding: 4px 10px;
    font-size: 13px;
  }
}
