/*
 * WaterRock Communications — 2026 responsive layer
 * UIkit breakpoint thresholds, without loading UIkit.
 * Adjust the custom properties here for all below-1200px displays.
 */
:root {
  --wr-mobile-background-offset: 0;
  --wr-mobile-content-gap: 100px;
  --wr-mobile-header-height: 80px;
  --wr-mobile-side-padding: 24px;
  --wr-mobile-panel-width: 310px;
  --helper-color-1: #ffffff00;
  --helper-color-2: #ffffffd6;
}

.col-b:not(#ft .col-b) {
  color: #69717a;
}
.col-b h1,
.col-b h2 {
  color: #43627f;
  font-family: sans-serif;
  font-weight: 900;
}
.col-b h2 {
  font-size: 110.1%;
}
#nav {
  font-family: sans-serif;
}
:is(
    .b_home .n_home,
    .b_contact .n_contact,
    .b_who .n_who,
    .b_what .n_what,
    .b_name .n_name,
    .b_clients .n_clients,
    .b_portfolio .n_portfolio
  )
  a {
  font-weight: 600;
}
:is(
    .b_home .n_home,
    .b_contact .n_contact,
    .b_who .n_who,
    .b_what .n_what,
    .b_name .n_name,
    .b_clients .n_clients,
    .b_portfolio .n_portfolio
  )
  a::before {
  content: "➤";
  padding-right: 5px;
  font-weight: 600;
}

a.link-highlight {
  text-decoration: underline;
}

/* Content typography and spacing */

.whole {
  line-height: 1.55;
}

/* Paragraphs */
.whole p {
  margin: 0 0 1em;
}

/* Headings */
.whole h1,
.whole h2,
.whole h3,
.whole h4 {
  line-height: 1.25;
  margin: 1.5em 0 0.6em;
}

/* First heading */
.whole > :first-child {
  margin-top: 0;
}

/* Lists */
.whole ul,
.whole ol {
  margin: 0 0 1.5em;
  padding-left: 1.5em;
}

.whole ul {
  list-style-type: disc;
}

.whole ol {
  list-style-type: decimal;
}

/* List items */
.whole li {
  margin-bottom: 0.4em;
  line-height: 1.5;
}

/* Bold labels */
.whole strong {
  font-weight: bold;
}

/* Remove extra spacing between heading and list */
.whole h2 + ul,
.whole h3 + ul {
  margin-top: 0;
}

/* Last element */
.whole > :last-child {
  margin-bottom: 0;
}

.mobile-menu-label {
  display: none;
}

/* Start the mobile presentation below UIkit Large (1200px). */
@media (max-width: 1199.98px) {
  html {
    /* The chosen -mobile image is set in head-code.php, with file fallback. */
    background-size: contain;
    background-position: 0 var(--wr-mobile-background-offset);
    background-repeat: no-repeat;
  }
  body {
    min-width: 0;
    max-width: 98%;
  }
  img,
  video,
  iframe {
    max-width: 100%;
  }
  #container {
    margin-right: 0;
  }

  /* Keep the background and content visible below the new header. */
  #hd {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    z-index: 10;
  }
  #nav {
    display: none;
  }
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-sizing: border-box;
    min-height: var(--wr-mobile-header-height);
    padding: 12px var(--wr-mobile-side-padding);
  }
  .mobile-logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
  }
  .mobile-logo img {
    display: block;
    width: auto;
    max-width: min(58vw, 240px);
    max-height: 64px;
    object-fit: contain;
    filter: drop-shadow(0px 0px 15px rgba(255, 255, 254, 1))
      drop-shadow(0px 0px 15px rgba(255, 255, 254, 1))
      drop-shadow(0px 0px 15px rgba(255, 255, 254, 1));
  }
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.92);
    color: #15487c;
    border: 1px solid #aaaaaa40;
    border-radius: 4px;
    padding: 11px 13px;
    font:
      600 14px Arial,
      sans-serif;
    cursor: pointer;
  }
  .mobile-menu-toggle:hover {
    color: rgba(255, 255, 255, 0.92);
    background: #15487c;
  }
  .mobile-menu-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .mobile-menu-bars span {
    display: block;
    width: 19px;
    height: 2px;
    background: currentColor;
  }
  .mobile-menu-toggle:focus-visible,
  .mobile-menu-close:focus-visible,
  .mobile-offcanvas a:focus-visible {
    outline: 3px solid #15487c;
    outline-offset: 3px;
  }

  #bd {
    overflow: visible;
    margin-top: var(--wr-mobile-content-gap);
    position: relative;
  }
  #bd::before {
    content: " ";
    position: absolute;
    z-index: -1;
    --offset: -30px;
    top: var(--offset);
    right: var(--offset);
    bottom: var(--offset);
    left: var(--offset);
    background: linear-gradient(
      to bottom,
      var(--helper-color-1) 0px,
      var(--helper-color-2) 30px,
      var(--helper-color-2) calc(100% - 30px),
      var(--helper-color-1) 100%
    );
  }
  .col-a {
    float: none;
    width: auto;
    max-width: 450px;
    margin: 24px auto;
  }
  .col-b {
    margin: 24px var(--wr-mobile-side-padding);
  }
  .col-b .whole {
    float: none;
  }
  .fixed-wrap {
    width: auto;
    max-width: 100%;
  }
  #ft {
    margin: 48px 0 24px;
  }
  #ft .col-b {
    margin: 0 var(--wr-mobile-side-padding);
    width: fit-content;
    position: relative;
  }
  #ft .col-b::before {
    content: " ";
    position: absolute;
    z-index: -1;
    --offset: -10px;
    top: var(--offset);
    right: var(--offset);
    bottom: var(--offset);
    left: var(--offset);
    background: linear-gradient(
      to bottom,
      var(--helper-color-1) 0px,
      var(--helper-color-2) 30px,
      var(--helper-color-2) calc(100% - 30px),
      var(--helper-color-1) 100%
    );
  }
  .slide_container {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Off-canvas is hidden by HTML's hidden attribute until JS opens it. */
  .mobile-nav-overlay:not([hidden]) {
    position: fixed;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.48);
    z-index: 1000;
  }
  .mobile-offcanvas:not([hidden]) {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    width: min(var(--wr-mobile-panel-width), 90vw);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    box-sizing: border-box;
    background: #fff;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.22);
    z-index: 1001;
    padding: 22px;
  }
  .mobile-offcanvas-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font:
      600 18px Arial,
      sans-serif;
    color: #15487c;
  }
  .mobile-menu-close {
    font-size: 32px;
    line-height: 1;
    border: 0;
    color: #15487c;
    background: none;
    cursor: pointer;
    margin-left: auto;
  }
  .mobile-offcanvas ul {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
  }
  .mobile-offcanvas li {
    border-bottom: 1px solid #e4e4e4;
    list-style: none;
    text-transform: capitalize;
  }
  .mobile-offcanvas a {
    display: block;
    padding: 15px 2px;
    color: #333;
    font:
      16px Arial,
      sans-serif;
    text-decoration: none;
    font-weight: 600;
  }
  .mobile-offcanvas a:hover {
    color: #15487c;
  }
  body.mobile-nav-open {
    overflow: hidden;
  }
}

/* Below UIkit Medium (960px). */
@media (max-width: 959.98px) {
  /* All header + content stacking begins below 1200px. */
}

/* Below UIkit Small (640px): legacy portfolio and text should fit phones. */
@media (max-width: 639.98px) {
  :root {
    --wr-mobile-side-padding: 16px;
  }
  .col-a,
  .col-b {
    margin: 20px var(--wr-mobile-side-padding);
  }
  #ft .col-b {
    margin: 0 var(--wr-mobile-side-padding);
  }
  .col-b .whole {
    font-size: 115%;
    overflow-wrap: anywhere;
  }
  .fixed-wrap .half {
    width: 100%;
    float: none;
  }
  .slide_container {
    width: 100%;
  }
  .slide {
    left: 0;
    width: 100%;
  }
  .slide_list {
    max-width: calc(100% - 110px);
    width: 303px;
  }
  .slide_list img {
    height: auto;
  }
  .arrow {
    margin-top: 170px;
  }
  .slide_links .half {
    width: 100%;
    float: none;
  }
}

/* Desktop: mobile-only elements must never affect the original layout. */
@media (min-width: 1200px) {
  .mobile-header,
  .mobile-nav-overlay,
  .mobile-offcanvas {
    display: none !important;
  }
}

/* 2026 - Horizontal overflow corrections */

@media (max-width: 1199.98px) {
  /* Restore natural viewport width */
  body {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  #container {
    margin-right: 0;
  }

  /* Keep background gradients within content width */
  #bd::before {
    left: 0;
    right: 0;
  }

  /* Prevent footer width from exceeding available space */
  #ft .col-b {
    width: auto;
    max-width: calc(100% - var(--wr-mobile-side-padding) * 2);
  }

  #ft .col-b::before {
    left: 0;
    right: 0;
  }

  /* Constrain legacy portfolio components */
  .slide_container {
    width: 100%;
    max-width: 444px;
    box-sizing: border-box;
  }

  .slide {
    max-width: calc(100% - 10px);
  }

  .fixed-wrap {
    max-width: 100%;
  }
}
