/* Force portrait orientation styles for small devices */
@media only screen and (max-width: 600px) and (orientation: landscape) {
  html, body {
    height: 100%;
    overflow: hidden;
  }
  body::before {
    content: "Please rotate your device to portrait mode.";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    color: #fff;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    z-index: 9999;
    text-align: center;
    padding: 2em;
    box-sizing: border-box;
    pointer-events: auto;
  }
  #main-content, .main-content, main {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
  }
}
@media (max-width: 900px) {
  html, body, .page-wrap {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .content-container {
    width: 100vw;
    max-width: 100vw;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
    margin-inline: 0;
  }
  .service a {
    width: 100%;
    box-sizing: border-box;
  }
}
:root {
  --clr-secondary: #00334F;
  --clr-accent: hsl(175, 54%, 48%);
  --clr-primary: #1478A3;
  --clr-bg-1: #ffffff;
  --clr-bg-2: #000000;
  --clr-bg-3: #00334F;
  --clr-bg-4: #39BDB3;
  --clr-bg-5: #f3efef;
  --clr-bg-6: #668595;
  --clr-bg-7: #287CA6;

  --clr-text-light: #fefefe;
  --clr-text-1: #333333;
  --clr-text-2: #ffffff;
  --clr-text-3: #00334F;
  --clr-text-4: #000000;
  --clr-text-5: #414549;
  --clr-text-6: #1478A3;
  --clr-text-7: #89BBD1;

  --ff-body: 'Noto Sans JP', Arial, Helvetica, sans-serif;
  --ff-heading: 'Poppins', Arial, Helvetica, sans-serif;

  --fw-bold: 700;
  --fw-med: 500;
  --fw-light: 300;

  --fs-h1: 2.4rem;
  --fs-h2: 2.0rem;
  --fs-h3: 1.8rem;
  --fs-h4: 1.5rem;
  --fs-h5: 1.125rem;
  --fs-h6: .9rem;
}


html, body {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
  background: var(--clr-bg-1);
  color: var(--clr-text-1);
  font-family: var(--ff-body);
  min-height: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  color: var(--clr-text-3);
  margin-bottom: 12px;
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}
h4 {
  font-size: var(--fs-h4);
}
h5 {
  font-size: var(--fs-h5);
}
h6 {
  font-size: var(--fs-h6);
}

.overlay {
  border-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)) fill 1;
}

.hidden-text {
  display: none !important;
}

.negative-margin-top {
  margin-top: -5rem;
}
.negative-margin-top-2 {
  margin-top: -7rem;
}

.flex-content {
  display: flex;
  justify-content: space-between;
  @media (max-width: 900px) {
    flex-direction: column;
    gap: 1rem;
  }
}

.grid-content {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4rem;
  @media (max-width: 900px) {
    grid-template-columns: 1fr;
  }
}

.content-container {
  max-width: 1200px;
  margin-inline: auto;
}

.text-light {
  color: var(--clr-text-light);
}

.text-center {
  text-align: center;
}

.page-wrap {
  min-height: 100vh;
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* COMPONENTS */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  position: relative;
  span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 4px 0;
    background: var(--clr-accent);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    left: 6px;
    right: 6px;
    &:nth-child(1) { top: 10px; }
    &:nth-child(2) { top: 18px; }
    &:nth-child(3) { top: 26px; }
  }
  &.open {
    span:nth-child(1) {
      transform: rotate(45deg);
      top: 18px;
    }
    span:nth-child(2) {
      opacity: 0;
      transform: scaleX(0.5);
    }
    span:nth-child(3) {
      transform: rotate(-45deg);
      top: 18px;
    }
  }
  @media (max-width: 900px) {
    display: flex;
    position: fixed;
    top: 1rem;
    left: 1rem;
  }
}

.megamenu-nav {
  flex: 1;

  @media (max-width: 900px) {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--clr-bg-3);
    box-shadow: none;
    transform: translateX(100%);
    transition: transform 0.3s, visibility 0.3s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 4rem;
    z-index: 1000;
      @media (max-width: 900px) {
        width: 90vw;
        margin-left: auto;
        margin-right: auto;
      }
    visibility: hidden;
    pointer-events: none;
    &.open {
      transform: translateX(0);
      visibility: visible;
      pointer-events: auto;
      width: 100vw;
    }
    .megamenu {
      display: flex;
      flex-direction: column;
      width: 100vw;
      min-height: calc(100vh - 4rem);
      height: 100%;
      align-items: center;
      justify-content: center;
      text-align: center;
    }
  }
}

.megamenu {
  list-style: none;
  display: flex;
  color: var(--clr-text-2);
  text-transform: uppercase;
  gap: 2rem;
  margin: 0;
  padding: 0;
  align-items: center;
  @media (max-width: 900px) {
    gap: 0.5rem;
    width: 100%;
    > li { width: 100%; }
    a {
      width: 100%;
      display: block;
      padding: 1rem 2rem;
      color: var(--clr-text-2);
      background: var(--clr-bg-3);
    }
    .megamenu-dropdown {
      position: static;
      box-shadow: none;
      background: none;
      padding: 0;
      min-width: unset;
      border-radius: 0;
    }
    .megamenu-content a {
      padding-left: 2.5rem;
    }
  }
  > li { position: relative; }
  a {
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    color: var(--clr-bg-1);
    &:hover,
    &.active {
      background: var(--clr-accent);
      color: var(--clr-text-2);
    }
  }
}

.has-megamenu {
  &:hover .megamenu-dropdown,
  &:focus-within .megamenu-dropdown {
    display: block;
  }
}

.megamenu-dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  background: var(--clr-bg-1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  z-index: 100;
  padding: 1rem 0.5rem;
}

.megamenu-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  a {
    color: var(--clr-text-6);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    &:hover {
      background: var(--clr-bg-4);
      color: var(--clr-text-2);
    }
  }
}

.btn-group {
  display: flex;
  gap: 3rem;
}

.btn {
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
}
.btn--primary {
  background: var(--clr-bg-4);
  color: var(--clr-text-light);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn--border-bottom {
  text-decoration: none;
  border-bottom: 6px solid var(--clr-bg-4);
  padding: 0.5rem 0;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.card {
  background: var(--clr-bg-3);
  color: var(--clr-text-1);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  display: grid;
  grid-template-rows: auto auto 1fr auto;

  .no-image & {
    grid-template-rows: auto 1fr auto;
  }
  
  .card__image {
    img {
      width: 100%;
      height: auto;
      object-fit: cover;
      border-radius: 8px 8px 0 0;
    }
  }
  .card__text {
    color: var(--clr-text-2);
  }
  .card__cta {
    text-transform: uppercase;
    border-bottom: 4px solid var(--clr-bg-4);
  }
  a,
  a:link,
  a:visited {
    color: var(--clr-text-7);
    text-decoration: none;
    font-weight: var(--fw-bold);
  }
}

/* SPLIDE SLIDER */
.splide__slide img {
  width: 100%;
  height: 650px;
  object-fit: cover;
  aspect-ratio: 21/9;

}

/* TOP HEADER */
.top-header-section {
  background: var(--clr-bg-3);
  padding-block: 1rem;
}

/* HERO SECTION */
.hero-section {
  background:url('../assets/hero-background.jpg') no-repeat center center/cover;
  aspect-ratio: 21/9;

  .content-container {
    padding-top: 24px;

    @media (max-width: 900px) {
      padding-top: 8px;
    }
  }
  .content-secondary {
      display: block;
    }
     .content-secondary-mobile {
      display: none;
    }

  @media (max-width: 900px) {
    .content-secondary {
      display: none;
    }
    .content-secondary-mobile {
      display: flex;
       justify-content: center;
       gap: 2rem;
    }
  }
  @media (max-width: 900px) {
    .flex-content {
      flex-direction: column;
      align-items: center;
    }
  }
  a, a:link, a:visited {
    color: var(--clr-text-2);
    text-decoration: none;
  }
}

.hero-text {
  margin-top: 120px;
  width: 600px;
  @media (max-width: 900px) {
    margin-top: 20px;
    padding-bottom: 80px;
    width: 90%;
  }
  h2 {
    font-size: 1.6rem;

      @media (max-width: 900px) {
        font-size: 1.2rem;
        line-height: 1.2;
      }
  }
  a {
    @media (max-width: 900px) {
      padding: 0.5rem 1.25rem;
      font-size: 1rem;
    }
  }
}

/* TEAM SECTION */
.team-section {
  padding-block: 4rem;
  background: var(--clr-bg-3);
}

.team-members {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: -120px;
  @media (max-width: 900px) {
    flex-direction: column;
    align-items: center;
    margin-top: 0px;  
  }
}

.team-member {
   @media (max-width: 900px) {
    margin-inline: auto;
   }
   img {
    border-radius: 50%;
    border: 16px solid var(--clr-bg-4);

      @media (max-width: 900px) {
        width: 200px;
        height: 200px;
      }
   }
}

/* FEATURES SECTION */
.featured-section {
  position: relative;
  background: url('../assets/article-1.jpg') no-repeat left center;
  background-size: 40.6%;
  display: flex;
  flex-direction: row;
  padding-block: 8rem;

  @media (max-width: 900px) {
    background: url('../assets/article-1.jpg') no-repeat top center;
    background-size: 100% auto;
    background-position-y: -9em;
    display: flex;
    justify-content: center;
    position: relative;
  }

  .content-primary {
    width: 100%;
    height: 240px;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    .featured-butterfly {
      position: absolute;
      top: 24px;
      width: 120px;
      height: auto;
      right: 2em;
      z-index: 2;
  }
    @media (max-width: 900px) {
      position: static;
      width: 100%;
      height: auto;
      min-height: 180px;
      .featured-butterfly {
        position: relative;
        top: 105%;
        right: 0;
        margin: 0 auto;
        display: block;
      }
    }
  }
  .content-secondary {
    flex: 0 0 55%;
    max-width: 55%;

    h2 {
      font-size: 2rem;
      line-height: 1;
    }
    @media (max-width: 900px) {
      /* width: 100%; */
      flex: 0 0 100%;
      max-width: 100%;
      padding-inline: 1rem;
      text-align: center;
      margin-top: 1.5rem;
      align-items: center;
      justify-content: center;
      display: flex;
      flex-direction: column;
    }
  }

  .btn-group {
    font-weight: bold;

    a,
    a:link,
    a:visited {
      color: var(--clr-text-6);
      text-decoration: none;
    }
  }
}

/* SERVICE SECTION */
.our-services-section {
  padding-block: 4em;
  background: var(--clr-bg-7);
  position: relative;
  z-index: 10;


  .content-container {
    margin-top: -7rem;

    @media (max-width: 900px) {
      margin-top: initial;
    }
  }
  .content-primary {
    flex: 0 0 10%;
    max-width: 10%;

    @media (max-width: 900px) {
      flex: 0 0 100%;
      max-width: 100%;
      margin-bottom: 2rem;
    }
  }
  .card {
   padding-inline: 2rem;
   padding-bottom: 4rem;
   border-radius: 8px;
    .card__title {
      color: var(--clr-text-2);
    }
  }
  .content-secondary {
    display: flex;
    flex: 0 0 70.0%;
    justify-items: center;
    align-items: center;
    max-width: 70.0%;
    background: #ffffff;
    /* padding: 2rem; */
    border-radius: 8px;

     @media (max-width: 900px) {
      flex: 0 0 100%;
      max-width: 100%;
      margin-bottom: 2rem;
    }
  }
}
.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  justify-content: center;

  @media (max-width: 900px) {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}

.service {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: .9em;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.025em;

    @media (max-width: 900px) {
      height: 275px;
    }
   a {
      display: inline-block;
      width: 60%;
      height: 70%;
      background-color: #e4eae9;
      border-radius: 8px;
      color: #00334f;
      text-align: center;
      text-decoration: none;
      padding: 20px 15px;
      transition:
          background-color 0.3s,
          color 0.3s;

    figure {
      margin: 0;
    }
  }
}

.service:hover a {
    background-color: #00334f;
    color: #fff;
}
.service .service__image {
    display: inline-block;
    height: 64px;
    line-height: 64px;
    font-size: 0;
    text-align: center;
    margin-bottom: 25px;
    color: #39bdb3;
    transition: color 0.3s;
}
.service:hover .service__image {
    color: #fff;
}
.service .service__image svg {
    display: inline-block;
    vertical-align: middle;
}
.service .icon {
    width: 64px;
    height: 60px;
}

/* OFFICE TOUR SECTION */
.office-tour-section {
  position: relative;
  .slide-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--clr-text-2);
    font-size: 1.5rem;
    font-weight: var(--fw-bold);
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    text-align: center;
    padding: 0 1rem;
    z-index: 100;
    padding-block: 4rem;

    h2 {
      font-size: 3rem;
      color: var(--clr-text-2);
      margin-bottom: 0;
    }
      
  }
}

/* TESTIMONIALS SECTION */
.testimonials-section {
  padding-block: 4rem;

  @media (max-width: 900px) {
    width: 90vw !important;
    max-width: 90vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
    display: block;
  }

  .content-primary {
    text-align: center;
    padding-inline: 6rem;

    @media (max-width: 900px) {
      width: 100% !important;
      max-width: 100% !important;
      padding-inline: 0.5rem !important;
      box-sizing: border-box;
      padding-block: inherit;
    }
  }
}

/* LOCATION SECTION */
.location-section {
  background: var(--clr-bg-3);
  color: var(--clr-text-2);
  font-weight: var(--fw-light);
  padding-block: 8rem;

  @media (max-width: 900px) {
    gap: 2rem;
    padding-block: 4rem;
  }

  ul {
    list-style: none;
    padding-left: 0;
  }
  h2 {
    color: var(--clr-text-2);
  }
  a, a:link, a:visited {
    color: var(--clr-text-7);
    text-decoration: none;
  }
}

/*BOARD CERTS SECTION */
.board-certs-section {
  background: var(--clr-bg-1);
  padding-block: 4rem;
  ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }
  li {
    img {
      width: 200px;
      height: 72px;
      aspect-ratio: 200/72;
      object-fit: contain;

      @media (max-width: 900px) {
        width: 150px;
        height: 54px;
      }
    }
  }
}

/* FOOTER SECTION */
.footer-section {
  color: var(--clr-text-2);

  a, a:link, a:visited {
    color: var(--clr-text-2);
    text-decoration: none;
  }
}
.page-footer {
  background: var(--clr-bg-7);
  padding-block: 2rem;
  ul {
    list-style: none;
    padding-left: 0;
     li {
      margin-bottom: 0.5rem;
     }
  }
  h4 {
    text-transform: uppercase;
    color: var(--clr-text-2);
    font-size: 1.25rem;
    font-weight: var(--fw-light);
  }

  .grid-content {
    @media (max-width: 900px) {
      grid-template-columns: 1fr;

    .location, .hours {
      width: 100%;
      }
    }
  }
  .flex-content {
    justify-content: space-between;
    gap: 2rem;

    .content-primary,
    .content-secondary {
      .ada-views {
        opacity: .65;
      }
    }

.content-primary { 
  .location {
    max-width: 39%;
   
     @media (max-width: 900px) {
      max-width: 100%;
      margin-bottom: 2rem;
     }
   }
}


    @media (max-width: 900px) {
      flex-direction: column;
      align-items: center;
    }
  }
  .content-secondary {
    @media (max-width: 900px) {
     width: 100%;
     max-width: 900px;
     margin-inline: auto;
     box-sizing: border-box;
    }
  }

  .social-links {
    font-size: 1.5rem;
    list-style: none;
    padding: 0;
    display: flex;
    gap: 2rem;
  }
}

.site-footer {
  background: var(--clr-bg-3);
  padding-block: 2rem;

 .content-primary {
  opacity: .65;
   display: flex;
   gap: 2rem;
   
  
      img {
        width: 120px;
        height: auto;
      }
      @media (max-width: 900px) {
        flex-direction: column;
      }
    ul{
      list-style: none;
      padding-left: 0;
    }
 }
  @media (max-width: 900px) {
    display: none;
  }
}