/*
Theme Name: Twenty Seventeen APA
Template: twentyseventeen
Description: Asset Protection Advisers child theme for migrated custom CSS/JS.
Version: 1.0.0
*/

/* Migrated from Simple Custom CSS and JS: Copyright */
.copyright {
  color: #666;
  background-color: transparent;
  font-size: 0.875rem;
  line-height: 1.6;
  font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
}

/* Migrated from Simple Custom CSS and JS: Mobile Header */
@media screen and (max-width: 768px) {
  .has-header-image.twentyseventeen-front-page .site-branding,
  .has-header-video.twentyseventeen-front-page .site-branding,
  .has-header-image.home.blog .site-branding,
  .has-header-video.home.blog .site-branding,
  .has-header-image.twentyseventeen-front-page .custom-header,
  .has-header-video.twentyseventeen-front-page .custom-header,
  .has-header-image.home.blog .custom-header,
  .has-header-video.home.blog .custom-header {
    display: block;
    max-height: 100%;
    height: auto;
    left: 0;
    max-width: 100%;
    min-height: 0;
    -o-object-fit: unset;
    object-fit: unset;
    position: relative;
    -ms-transform: none;
    -moz-transform: none;
    -webkit-transform: none;
    transform: none;
  }

  .has-header-image.twentyseventeen-front-page .site-branding,
  .has-header-video.twentyseventeen-front-page .site-branding,
  .has-header-image.home.blog .site-branding,
  .has-header-video.home.blog .site-branding,
  .custom-header-media,
  .has-header-image .custom-header-media img,
  .has-header-video .custom-header-media video,
  .has-header-video .custom-header-media iframe {
    position: static;
  }

  .custom-header-media:before {
    background: none;
  }

  body.has-header-image .site-description,
  body.has-header-video .site-description {
    color: #222;
    opacity: 1;
  }

  .site-branding .wrap {
    padding: 0 1em;
  }
}

/* Migrated from Simple Custom CSS and JS: Title Size */
.page .panel-content .entry-title,
.page-title,
body.page:not(.twentyseventeen-front-page) .entry-title {
  color: #222;
  font-size: 50px;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: none;
}

/* Migrated from Simple Custom CSS and JS: Menu */
.navigation-top .wrap {
  max-width: 100%;
}

@media screen and (min-width: 48em) {
  .navigation-top .wrap {
    max-width: 100%;
  }
}

/* Modern scroll-to-top button */
#apa-scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(34, 34, 34, 0.92);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  z-index: 9999;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  padding: 0;
}

#apa-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#apa-scroll-top:hover,
#apa-scroll-top:focus {
  background: #111;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  outline: none;
}

#apa-scroll-top .apa-scroll-top-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

#apa-scroll-top svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

@media screen and (max-width: 768px) {
  #apa-scroll-top {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }

  #apa-scroll-top svg {
    width: 20px;
    height: 20px;
  }
}

/* APA mobile header fix: keep hero branding on-image, readable, and not clipped */
@media screen and (max-width: 48em) {

    .custom-header {
        position: relative;
    }

    .custom-header-media,
    .wp-custom-header,
    .custom-header-media img {
        min-height: 320px;
    }

    .has-header-image .custom-header-media img,
    .has-header-video .custom-header-media img {
        object-fit: cover;
    }

    .site-branding {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 20px;
        top: auto;
        margin: 0;
        padding: 0 24px;
        background: transparent;
        z-index: 20;
    }

    .site-branding .wrap {
        padding: 0;
    }

    .site-title,
    .site-title a {
        display: block;
        margin: 0;
        font-size: 54px;
        line-height: 0.92;
        letter-spacing: 0.01em;
        color: #ffffff;
        text-shadow: 0 2px 10px rgba(0,0,0,0.45);
        word-break: normal;
        overflow-wrap: normal;
    }

    .site-description {
        display: block;
        margin-top: 12px;
        font-size: 18px;
        line-height: 1.2;
        color: rgba(255,255,255,0.92);
        text-shadow: 0 2px 8px rgba(0,0,0,0.45);
    }

    .navigation-top {
        position: relative;
        z-index: 30;
    }
}

@media screen and (max-width: 30em) {
    .site-title,
    .site-title a {
        font-size: 46px;
    }

    .site-description {
        font-size: 16px;
    }

    .site-branding {
        bottom: 16px;
        padding: 0 20px;
    }

    .custom-header-media,
    .wp-custom-header,
    .custom-header-media img {
        min-height: 300px;
    }
}

/* APA mobile header fix v2: stronger override for portrait/homepage header behavior */
@media screen and (max-width: 48em) {
    body.has-header-image .custom-header,
    body.has-header-image.twentyseventeen-front-page .custom-header,
    body.has-header-image.home.blog .custom-header {
        position: relative !important;
        height: 320px !important;
        min-height: 320px !important;
        max-height: none !important;
        overflow: hidden !important;
    }

    body.has-header-image .custom-header-media,
    body.has-header-image.twentyseventeen-front-page .custom-header-media,
    body.has-header-image.home.blog .custom-header-media,
    body.has-header-image .wp-custom-header {
        position: absolute !important;
        inset: 0 !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    body.has-header-image .custom-header-media img,
    body.has-header-image.twentyseventeen-front-page .custom-header-media img,
    body.has-header-image.home.blog .custom-header-media img {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        object-fit: cover !important;
    }

    body.has-header-image .site-branding,
    body.has-header-image.twentyseventeen-front-page .site-branding,
    body.has-header-image.home.blog .site-branding,
    body.has-header-video .site-branding,
    body.has-header-video.twentyseventeen-front-page .site-branding,
    body.has-header-video.home.blog .site-branding {
        display: block !important;
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        bottom: 18px !important;
        margin: 0 !important;
        padding: 0 22px !important;
        background: transparent !important;
        z-index: 20 !important;
        transform: none !important;
    }

    body.has-header-image .site-branding .wrap,
    body.has-header-image.twentyseventeen-front-page .site-branding .wrap,
    body.has-header-image.home.blog .site-branding .wrap {
        padding: 0 !important;
    }

    body.has-header-image .site-title,
    body.has-header-image .site-title a,
    body.has-header-image.twentyseventeen-front-page .site-title,
    body.has-header-image.twentyseventeen-front-page .site-title a,
    body.has-header-image.home.blog .site-title,
    body.has-header-image.home.blog .site-title a {
        display: block !important;
        margin: 0 !important;
        max-width: 96% !important;
        color: #ffffff !important;
        font-size: clamp(40px, 11.5vw, 52px) !important;
        line-height: 0.96 !important;
        letter-spacing: 0.02em !important;
        text-shadow: 0 2px 10px rgba(0,0,0,0.48) !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    body.has-header-image .site-description,
    body.has-header-image.twentyseventeen-front-page .site-description,
    body.has-header-image.home.blog .site-description,
    body.has-header-video .site-description,
    body.has-header-video.twentyseventeen-front-page .site-description,
    body.has-header-video.home.blog .site-description {
        display: block !important;
        margin-top: 12px !important;
        color: rgba(255,255,255,0.88) !important;
        font-size: 17px !important;
        line-height: 1.2 !important;
        opacity: 1 !important;
        text-shadow: 0 2px 8px rgba(0,0,0,0.48) !important;
    }
}

@media screen and (max-width: 30em) {
    body.has-header-image .custom-header,
    body.has-header-image.twentyseventeen-front-page .custom-header,
    body.has-header-image.home.blog .custom-header {
        height: 300px !important;
        min-height: 300px !important;
    }

    body.has-header-image .site-branding,
    body.has-header-image.twentyseventeen-front-page .site-branding,
    body.has-header-image.home.blog .site-branding {
        bottom: 16px !important;
        padding: 0 20px !important;
    }

    body.has-header-image .site-title,
    body.has-header-image .site-title a,
    body.has-header-image.twentyseventeen-front-page .site-title,
    body.has-header-image.twentyseventeen-front-page .site-title a {
        font-size: clamp(38px, 11vw, 46px) !important;
    }

    body.has-header-image .site-description,
    body.has-header-image.twentyseventeen-front-page .site-description,
    body.has-header-image.home.blog .site-description {
        font-size: 16px !important;
    }
}

/* APA landscape homepage fix: reduce clipping on the front-page hero title */
@media screen and (orientation: landscape) and (max-height: 520px) {
    body.has-header-image.twentyseventeen-front-page .site-branding {
        bottom: 16px !important;
        top: auto !important;
        transform: none !important;
    }

    body.has-header-image.twentyseventeen-front-page .site-title,
    body.has-header-image.twentyseventeen-front-page .site-title a {
        font-size: clamp(54px, 7.2vw, 72px) !important;
        line-height: 0.98 !important;
    }

    body.has-header-image.twentyseventeen-front-page .site-description {
        margin-top: 10px !important;
    }
}
