/* The homepage hero artwork is pinned to the top of the hero row by
   .position-absolute-top-right-0 and sized by height by .title-block, which
   left it sitting low against the headline and far wider than its column.
   Span the row instead and centre the image on the headline block, sizing it
   from its own aspect ratio so none of it is cropped. The !important is to
   beat .d-lg-block, which is display:block !important. */
@media (min-width: 992px) {
    .home-hero-block {
        top: 0;
        bottom: 0;
        padding-top: inherit;
        padding-bottom: inherit;
        display: flex !important;
        align-items: center;
    }

    .home-hero-image.title-block {
        width: 100%;
        height: auto;
        min-height: 0;
        object-fit: contain;
    }
}

/* Every page heading carries .font-size-24--md-down, but the class went missing
   when the CSS libraries were upgraded, so the long sub-page headings render at
   the full 40px on phones - the CRA heading runs to four lines there. Restored
   at 2rem rather than the 1.5rem the name implies: 1.5rem leaves the page title
   smaller than the section headings below it, which are 2rem. */
@media (max-width: 991px) {
    .font-size-24--md-down {
        font-size: 2rem;
    }
}

/* Flex items default to min-width:auto, so a wide table inside a .media stops
   the body column shrinking - on a phone that pushes the whole column past the
   screen edge and clips it. Letting it shrink lets .table-responsive scroll. */
.media-body {
    min-width: 0;
}

/* The three "How we can help" tile images come from artwork with different
   aspect ratios. Give them one identical box so the captions below them line
   up, and letterbox each image inside it rather than cropping or stretching. */
.service-tile-icon {
    width: 100%;
    aspect-ratio: 1280 / 1024;
    object-fit: contain;
}

main {
    padding-top: 0.5rem;
}

.google-maps-embed {
    display: none;
}

.google-maps-link {
    display: block;

}

.google-maps-link a {
    color: #3E9DC7;
}

.vertical-align {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
}

.top-buffer {
    margin-top: 2%;
}

/* footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 5.8rem;
} */

@media (min-width: 576px) {

    .google-maps-link {
        display: none;
    }

    .google-maps-embed {
        display: block;
    }

    .google-maps-embed iframe {
        width: 510px;
        height: 510px;
    }
}

@media (min-width: 768px) {
    .google-maps-embed iframe {
        width: 690px;
        height: 690px;
    }
}

@media (min-width: 992px) {

    /* The CRA hero heading is longer than the other pages' headings. Step it
       down where the hero text sits in the narrow column so it wraps to two
       lines rather than three. */
    .cra-hero-title {
        font-size: 1.8rem;
    }

    .title-block {
        min-height: 30rem;
        height: 75vmin;
    }

    .header-image-block {
        z-index: -1;
    }

    .google-maps-embed iframe {
        width: 450px;
        height: 450px;
    }
}

@media (min-width: 1200px) {
    .cra-hero-title {
        font-size: 2.125rem;
    }

    .google-maps-embed iframe {
        width: 540px;
        height: 540px;
    }
}

/* === Site notice banner (moved from index.html inline <style> so a CSP can use style-src 'self') === */
    :root {
      --accent: #3e9dc7;
      --accent-rgb: 62, 157, 199;
      /* same colour as r,g,b for translucency */
      --accent-alpha: 0.9;
      /* banner opacity: 0 = clear, 1 = solid */
      --ink: #1f2933;
      --muted: #6b7280;
      --line: #e5e7eb;
    }

    #site-notice {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      padding: 12px 20px;
      background: rgba(var(--accent-rgb), var(--accent-alpha));
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      color: #fff;
      font-size: 15px;
      text-align: center;
      box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
      transform: translateY(-100%);
      transition: transform .4s ease;

    }

    #site-notice.show {
      transform: translateY(0);
    }

    #site-notice a,
    #site-notice a:link,
    #site-notice a:visited,
    #site-notice a:hover,
    #site-notice a:active {
      color: #fff;
      text-decoration: underline;
      text-underline-offset: 2px;
      font-weight: 500;
    }

    #site-notice a:hover {
      opacity: .85;
    }

    #site-notice-close {
      background: none;
      border: none;
      color: #fff;
      font-size: 20px;
      line-height: 1;
      cursor: pointer;
      padding: 0 4px;
    }

    #site-notice-bar {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 3px;
      background: rgba(255, 255, 255, .6);
      width: 100%;
    }

    #site-notice.show #site-notice-bar {
      width: 0;
      transition: width 10s linear;
    }

/* Google Maps embed border (replaces inline style="border:0" on contact.html for CSP) */
.google-maps-embed iframe { border: 0; }
