/* =======================================================
   Apex Core Services - Mobile Fix
   Load this AFTER /css/style.css
   ======================================================= */


/* -------------------------------------------------------
   Global mobile safety
   ------------------------------------------------------- */

html,
body{
  max-width: 100%;
  overflow-x: hidden;
}

img,
iframe,
video{
  max-width: 100%;
}

@media (max-width: 900px){
  .container,
  .srv-core__inner,
  .srvp-services__inner,
  .srvp-detail__inner,
  .about-wrap,
  .contact-wrap,
  .cl-wrap,
  .privacy-wrap{
    width: 100%;
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-main{
    padding-top: 0;
  }
}


/* =======================================================
   Mobile Hamburger Menu
   ======================================================= */

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

@media (max-width: 900px){
  .site-header{
    position: relative;
    z-index: 100;
  }

  .header-inner{
    position: relative;
    height: auto;
    min-height: 64px;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .brand{
    max-width: calc(100% - 56px);
  }

  .brand-link{
    gap: 0.55rem;
  }

  .brand-mark{
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
  }

  .brand-text{
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    white-space: normal;
    line-height: 1.2;
  }

  .mobile-menu-toggle{
    display: inline-flex;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 8px;
    background: transparent;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
  }

  .mobile-menu-toggle span{
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .site-header.is-menu-open .mobile-menu-toggle span:nth-child(1){
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.is-menu-open .mobile-menu-toggle span:nth-child(2){
    opacity: 0;
  }

  .site-header.is-menu-open .mobile-menu-toggle span:nth-child(3){
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav{
    display: none;
    width: 100%;
    flex-basis: 100%;
    padding-top: 0.75rem;
  }

  .site-header.is-menu-open .site-nav{
    display: block;
  }

  .nav-list{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-item{
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.16);
  }

  .nav-link{
    width: 100%;
    justify-content: space-between;
    padding: 0.9rem 0;
    font-size: 1rem;
    opacity: 1;
  }

  .nav-link.is-active,
  .nav-link[aria-current="page"]{
    text-decoration: none;
  }

  .nav-link.has-caret::after{
    margin-left: auto;
  }

  .nav-nexus > .nav-link{
    margin-top: 0.75rem;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  .nav-item.has-dropdown::after{
    display: none;
  }

  .nav-item.has-dropdown .dropdown{
    display: none !important;
    position: static;
    transform: none;
    left: auto;
    top: auto;
    min-width: 0;
    width: 100%;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    border: 0;
    box-shadow: none;
    border-radius: 8px;
    padding: 0.35rem;
    margin: 0 0 0.6rem;
  }

  .nav-item.has-dropdown.is-open .dropdown{
    display: block !important;
  }

  .nav-item.has-dropdown:hover .dropdown{
    display: none !important;
  }

  .nav-item.has-dropdown.is-open:hover .dropdown{
    display: block !important;
  }

  .dropdown::before{
    display: none;
  }

  .dropdown-link{
    color: #ffffff;
    padding: 0.75rem 0.85rem;
    font-size: 0.95rem;
  }

  .dropdown-link:hover{
    background: rgba(255,255,255,0.12);
    color: #ffffff;
  }
}


/* =======================================================
   Home Hero
   ======================================================= */

@media (max-width: 900px){
  .hero{
    min-height: 420px;
    background-position: center;
  }

  .hero-content{
    margin-top: 0;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .hero-title{
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .hero-kicker{
    font-size: 1rem;
  }

  .value-grid,
  .welcome-grid,
  .band-grid{
    grid-template-columns: 1fr;
  }

  .value-grid,
  .band-grid{
    gap: 2rem;
  }

  .welcome-grid{
    gap: 1.75rem;
  }

  .section.welcome{
    padding: 2.5rem 0;
  }

  .video-frame iframe{
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 600px){
  .hero{
    min-height: 380px;
  }

  .hero-content{
    min-height: 380px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .hero-title{
    font-size: 2rem;
  }
}


/* =======================================================
   Services Main Page Hero
   ======================================================= */

@media (max-width: 900px){
  .srv-hero__stage{
    height: auto;
    min-height: 440px;
  }

  .srv-hero__image{
    width: 100%;
    opacity: 0.28;
    background-position: center;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .srv-hero__content{
    max-width: 100%;
    min-height: 440px;
    padding: 56px 22px;
    justify-content: center;
  }

  .srv-hero__title{
    font-size: clamp(2rem, 9vw, 2.75rem);
    line-height: 1.08;
  }

  .srv-hero__copy{
    font-size: 0.95rem;
    color: #344054;
  }

  .srv-hero__btn{
    width: 100%;
    max-width: 260px;
    text-align: center;
  }

  .srv-core{
    padding: 44px 0;
  }

  .srv-core__inner{
    padding-left: 20px;
    padding-right: 20px;
  }

  .srv-core__header{
    margin-bottom: 28px;
  }

  .srv-core__grid{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .srv-core__card{
    padding: 22px;
  }
}


/* =======================================================
   Service Detail Pages
   ======================================================= */

@media (max-width: 900px){
  .srvp-hero{
    height: auto;
    min-height: 420px;
    background-position: center;
  }

  .srvp-hero__overlay{
    background: linear-gradient(
      90deg,
      rgba(24,52,87,0.94) 0%,
      rgba(24,52,87,0.84) 55%,
      rgba(24,52,87,0.64) 100%
    );
  }

  .srvp-hero__inner{
    min-height: 420px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .srvp-hero__content{
    max-width: 100%;
    padding: 56px 0;
  }

  .srvp-hero__title{
    font-size: clamp(2rem, 9vw, 2.65rem);
    line-height: 1.1;
  }

  .srvp-hero__kicker{
    font-size: 1rem;
  }

  .srvp-hero__copy{
    font-size: 0.95rem;
  }

  .srvp-services{
    padding: 44px 0;
  }

  .srvp-grid{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .srvp-card{
    padding: 22px;
  }

  .srvp-detail{
    padding-bottom: 48px;
  }

  .srvp-detail__title{
    font-size: 1.45rem;
  }
}


/* =======================================================
   Clients Page
   ======================================================= */

@media (max-width: 900px){
  .cl-page{
    padding: 36px 0 52px;
  }

  .cl-top{
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .cl-hero-media{
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .cl-title{
    font-size: 2rem;
  }

  .cl-hero-copy p{
    max-width: 100%;
    font-size: 0.95rem;
  }

  .cl-review{
    margin-top: 48px;
  }

  .cl-review-title{
    font-size: 1.7rem;
  }

  .cl-review-graphic{
    width: 100%;
    max-width: 420px;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
  }
}


/* =======================================================
   Contact Page
   ======================================================= */

@media (max-width: 860px){
  .contact-page{
    padding: 32px 0 48px;
  }

  .contact-bar--two,
  .contact-main,
  .contact-form__row{
    grid-template-columns: 1fr;
  }

  .contact-main{
    gap: 18px;
  }

  .contact-form,
  .contact-connect{
    padding: 18px;
  }

  .contact-title{
    font-size: 1.8rem;
  }
}


/* =======================================================
   About Page
   ======================================================= */

@media (max-width: 980px){
  .about-page{
    padding: 36px 0 52px;
  }

  .about-intro h1{
    font-size: 2rem;
  }

  .about-panel{
    padding: 22px;
  }

  .about-cards,
  .about-leader{
    grid-template-columns: 1fr;
  }

  .about-leader__photo{
    width: 120px;
    height: 120px;
  }
}


/* =======================================================
   Privacy Page
   ======================================================= */

@media (max-width: 900px){
  .privacy-wrap{
    width: 100%;
    min-width: 0;
    max-width: 720px;
  }

  .privacy-wrap h1{
    font-size: 2rem;
  }
}


/* =======================================================
   Footer
   ======================================================= */

@media (max-width: 700px){
  .site-footer{
    padding: 2.25rem 0;
  }

  .footer-brand{
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-nav{
    flex-direction: column;
    gap: 0.85rem;
  }

  .footer-meta{
    font-size: 0.9rem;
  }
}
