/* Oceanside round 1: the header, footer and page frame, as the old site (pug/components/_header.pug, _footer.pug,
   sass/components/header.sass, footer.sass), measured at 1366, 768 and 390. Loaded after os-theme.css, which owns the
   roles used here (.os-menu-link, .os-toggler, .os-footer, .os-footer-call, .os-footer-copy, .os-link-blue, .os-social).
   Fixes signed off (part 1 Q6): all 11 menu items fit at 768; the footer stacks on a phone with the logo inside the
   screen and the phone number visible. */

/* The frame: .os-page (theme) is max 1600 px, clipped like the old .page-wrap. */
.os-page { position: relative; min-height: 100vh; overflow: hidden; }
.os-page main.main { position: relative; z-index: 0; }

/* Header: black bar, not sticky, 11 centred items. The curved divider image hangs below it, as old. */
/* header.os-header out-ranks the template's .header (padding, white background, shadow) in main.css. */
header.os-header { position: relative; z-index: 1; background-color: #020202; margin: 0 0 100px; padding: 0; box-shadow: none; transition: none; }
header.os-header::after { content: ""; position: absolute; top: 100%; margin-top: -1px; left: 0; right: 0; height: 100px; pointer-events: none;
  background: url("../img/os/header/divider-header.png") no-repeat center top / 1600px auto; }
.os-nav { display: block; padding: 0; }
.os-menu { display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start; list-style: none; margin: 0; padding: 0; }
.os-menu li { flex: 0 1 auto; min-width: min-content; }
.os-toggler { display: none; }
@media (max-width: 991.98px) { .os-header .container { padding-left: 8px; padding-right: 8px; } }

/* The old link: `.nav-link` (padding 18 8 3, Bootstrap's .5rem sides from 768 up, none below) around a span with 6 px under the text and a
   2 px white rule (::after, 0 wide, full width on hover; below 768 it is the separator, 30 px short of the span). */
.os-menu-link span { display: block; position: relative; padding-bottom: 6px; }
.os-menu-link span::after { content: ""; display: block; position: absolute; z-index: 10; height: 2px; bottom: 0; width: 0; background-color: #ffffff; transition: all .3s ease-out; }
.os-menu-link:hover span::after { width: 100%; }

/* Phone menu (below 768): the hamburger on the left; the items stack, white on black, each with the 2 px rule under it. */
@media (max-width: 767.98px) {
  .os-header .container { padding-left: 40px; padding-right: 40px; }
  .os-toggler { display: block; }
  header.os-header { display: flow-root; }
  .os-menu { display: none; flex-direction: column; justify-content: flex-start; align-items: stretch; width: 100%; padding: 0; }
  .os-menu.os-open { display: flex; }
  .os-menu .os-menu-link { padding: 18px 0 3px; }
  .os-menu-link span::after { width: calc(100% - 30px); }
  .os-toggler[aria-expanded="true"] .os-bar1 { margin-top: 4px; transform: rotate(135deg); }
  .os-toggler[aria-expanded="true"] .os-bar2 { opacity: 0; }
  .os-toggler[aria-expanded="true"] .os-bar3 { margin-top: -13px; transform: rotate(-135deg); }
}

/* Footer: black, 75 px top padding, logo left and the call line right; copyright and icons underneath. */
.os-footer { position: relative; z-index: 1; margin: 150px 0 0; }
.os-footer::after { content: ""; position: absolute; bottom: 100%; margin-bottom: -1px; left: 0; right: 0; height: 100px; pointer-events: none;
  background: url("../img/os/header/divider-footer.png") no-repeat center bottom / 1600px auto; }
.os-footer-top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.os-footer-logo { display: inline-block; margin-bottom: 3px; }
.os-footer-logo img { display: block; width: 475px; max-width: none; height: auto; }
.os-footer .os-footer-container { padding-left: 0; padding-right: 0; } /* the old `.container.footer-container` */
.os-footer a.os-footer-call, .os-footer a.os-footer-call:hover { display: block; color: #3399cc; text-decoration: none; line-height: 1; font-weight: 400; }
.os-footer-bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.os-footer-copy { margin: 0; }
.os-footer-copy a.os-link-blue:hover { text-decoration: underline; }
.os-social-list { display: flex; list-style: none; margin: 0; padding: 0; flex: 0 0 auto; }
.os-social-list a.os-social { display: block; margin-left: 5px; font-size: 46px; line-height: 1; color: #ffffff; }
.os-social-list a.os-social:hover { color: #3399cc; text-decoration: none; }
.os-social-list a.os-social { font-weight: 700; }
.os-social-list a.os-social .fab { font-size: 46px; font-weight: 700; line-height: 1; margin-right: 7px; } /* the old `.fab` margin */
.os-youtube { display: block; position: relative; height: 42px; width: 42px; margin-top: 2px; border-radius: 7px; background-color: #ffffff; }
.os-youtube::before { content: ""; position: absolute; top: 50%; left: 50%; width: 0; height: 0; margin: -9px 0 0 -5px;
  border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 13px solid #020202; }
a.os-social:hover .os-youtube { background-color: #3399cc; }

/* Phone and tablet (below 992 px, where logo 475 + the 48 px call line no longer fit one row): stacked, so the logo fits the screen and the number is on it (the old footer pushed both off). */
@media (max-width: 991.98px) {
  .os-footer-top { flex-direction: column; align-items: flex-start; }
  .os-footer .os-footer-container { padding-left: 40px; padding-right: 40px; }
  .os-footer-logo img { max-width: 100%; }
  .os-footer-logo { margin-bottom: 20px; }
  .os-footer a.os-footer-call { font-size: clamp(24px, 7vw, 48px); }
  .os-footer-bottom { flex-direction: column; align-items: flex-start; }
  .os-social-list { margin-top: 20px; }
  .os-social-list a.os-social { margin-left: 0; margin-right: 5px; }
}

/* The template's back-to-top link is not on the old site; main.js needs the element to exist, so it stays, hidden. */
#scroll-top { display: none !important; }

/* The mailto notice (os-header.js): fixed at the bottom centre, never blocks a click. */
.os-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; max-width: 90%; padding: 10px 18px; background: #000000; color: #ffffff; font-size: 14px; border-radius: 4px; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.os-toast-on { opacity: 1; }
