/* ═══════════════════════════════════════════════════════════════
   GLOBAL EQUIPMENT TESTING AND CALIBRATION LIMITED – UNIFIED CSS
   Sections: Reveal / Animations | Mobile Menu | Desktop Mega Menu
             | Search Overlay | Utilities
   ═══════════════════════════════════════════════════════════════ */



/* ─── 1. REVEAL & ANIMATIONS ─────────────────────────────────── */
.reveal,
.bounce-element {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.active,
.bounce-element.animate-once {
  opacity: 1;
  transform: translateY(0);
}

.from-up    { animation-name: slideBounceUp; }
.from-down  { animation-name: slideBounceDown; }
.from-left  { animation-name: slideBounceLeft; }
.from-right { animation-name: slideBounceRight; }

@keyframes slideBounceLeft {
  0%   { opacity: 0; transform: translateX(-100px); }
  50%  { opacity: 1; transform: translateX(10px); }
  70%  { transform: translateX(-5px); }
  90%  { transform: translateX(2px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideBounceRight {
  0%   { opacity: 0; transform: translateX(100px); }
  50%  { opacity: 1; transform: translateX(-10px); }
  70%  { transform: translateX(5px); }
  90%  { transform: translateX(-2px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideBounceUp {
  0%   { opacity: 0; transform: translateY(-100px); }
  45%  { opacity: 1; transform: translateY(25px); }
  70%  { transform: translateY(-12px); }
  85%  { transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes slideBounceDown {
  0%   { opacity: 0; transform: translateY(100px); }
  45%  { opacity: 1; transform: translateY(-25px); }
  70%  { transform: translateY(12px); }
  85%  { transform: translateY(-5px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes burgerPop {
  0%   { opacity: 0; transform: scale(0.8); }
  70%  { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}




/* ─── 2. MOBILE MENU ─────────────────────────────────────────── */
@media (max-width: 767.98px) {

  /* Mobile back button */
  .mobileNav .nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--navy, #0a1628);
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
  }
  .mobileNav .nav-back .chevron {
    /* transform: rotate(90deg); or leave as-is if you used the left arrow */
    opacity: 0.7;
  }
  .mobileNav .nav-back:hover {
    background: #f8fafc;
    color: var(--gold);
  }

  body.menu-open {
    overflow: hidden;
    touch-action: none;
  }

  .desktop { display: none !important; }
  .mainNav { display: none; }

  /* Burger */
  .navbar_burger {
    display: flex;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    /*width: 26px;*/
    height: 30px;
    cursor: pointer;
    animation: burgerPop 0.4s ease forwards;
  }
  .navbar_burger svg { width: 100%; height: 100%; }

  #opener { width: 100%; height: 100%; }

  #closer { width: 100%;}

  /* Drawer */
  .mobileNav {
    position: fixed;
    top: 60px; 
    right: 0; 
    width: 100%;
    background: #fff;
    z-index: 9999;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.35s;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mobileNav.active {
    transform: translateX(0);
    visibility: visible;
    box-shadow: -8px 0 30px rgba(10, 35, 66, 0.12);
  }

  .mobileNav .nav-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 70vh;
    overflow: scroll;
    padding: 0;
  }

  .mobileNav .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 10px 0;
    margin: 0 20px;
    font-size: 16px;
    font-weight: 300;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
  }

  .mobileNav .nav-link:hover{    
    color:#DF1700;
  }

  .mobileNav .nav-link.active { background: #f8fafc; color: var(--navy, #0a1628); }
  .mobileNav .nav-link .chevron {
    width: 20px; height: 20px;
    opacity: 0.5;
    transition: transform 0.3s ease;
  }
  .mobileNav .nav-link.active .chevron { transform: rotate(180deg); opacity: 1; }

  /* Mega panels */
  .mobileNav .mega-dropdown {
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 10;
    transform: translate3d(100%, 0, 0);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.35s;
    overflow: scroll;
    pointer-events: none;
  }
  .mobileNav .mega-dropdown.active {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .mobileNav .serviceheader,
  .mobileNav .industries-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    min-height: 48px;
    cursor: pointer;
  }
  .mobileNav .serviceheader h2,
  .mobileNav .industries-header h2 {
    font-size: 16px;
    color: var(--gold);
    font-weight: 300;
  }

  .mobileNav .serviceheader h2.active.hidden,
  .mobileNav .industries-header h2.active.hidden {    
    font-weight: 600;
  }


  .mobileNav .serviceheader.open,
  .mobileNav .industries-header.open {
    background: #eff6ff;
    border-left: 3px solid var(--gold);
  }

  .service-lists.open img,
  .industries-list.open img{
    display: flex;
    flex-direction: row;
    width: 100%;
    margin: 0 0 20px 0;
  }


  .mobileNav .serviceheader.open .chevron,
  .mobileNav .industries-header.open .chevron {
    transform: rotate(180deg);
    opacity: 1;
  }

  .mobileNav .service-lists,
  .mobileNav .industries-list {
    list-style: none;
    background: #f8fafc;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0 1.25rem;
  }

  .mobileNav .service-lists.open,
  .mobileNav .industries-list.open {
    max-height: 800px;
    opacity: 1;
    padding: 1rem 1.25rem;
  }

  .mobileNav .service-lists li,
  .mobileNav .industries-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 4px 0;
    font-size: 0.85rem;
    margin: 0 10px 0 0;
  }

  .mobileNav .service-lists li::before,
  .mobileNav .industries-list li::before {
    content: "";
    width: 5px; 
    height: 5px;
    background: var(--gold);
    flex-shrink: 0;
  }

  /* Backdrop */
  .nav-overlay2 {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
    height: 80vh;
  }

  .nav-overlay2.active {
    opacity: 1;
    visibility: visible;
  }

  #services-dropdown-desktop,
  #industries-dropdown-desktop { display: none; }
}

/* ─── 3. DESKTOP MEGA MENU ───────────────────────────────────── */
@media (min-width: 768px) {

  .mobile { display: none !important; }
  .mobileNav { display: none; }
  .navbar_burger { display: none; }

  .mainNav {
    display: flex;
    flex-direction: row;
    align-items: center;
    z-index: 1000;
    overflow: visible;
    width: 100%;
    height: 50%;
    background-color: #DF1700;
  }

  .nav-wrap {
    display: flex;
    align-items: center;
    overflow: visible;
    height: fit-content;
    height: 100%;
  }


  .nav-link {
    color: var(--white);
    font-size: 16px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    position: relative;
    transition: all 0.2s ease;
    text-decoration: none;
    border-right: #f0f0f04d solid 1px;    
    height: fit-content;
    height: 100%;
  }

  .margin-50-left{
    margin: 0 0 0 300px;
  }

  .nav-link:nth-child(1){
    border-right: #f0f0f04d solid 1px;
  }

  .nav-link:nth-child(6){
    border-right: none;
  }

  .nav-link:nth-child(1):hover{
    border-radius: 50px 0 0 50px;
  }

  .nav-link:nth-child(6):hover{
    border-right: none;
    border-radius: 0 50px 50px 0;
  }
  .nav-link:hover,
  .nav-link.active { 
    color: #FFFFFF; 
    background-color: var(--gold);
  }

  .nav-link .chevron {
    transition: transform 0.3s ease;
    opacity: 0.6;
    color: #FFFFFF;
  }

  .nav-link.active .chevron {
    transform: rotate(180deg);
    opacity: 1;
  }

  /* Mega dropdown */
  .mega-dropdown {
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 9999;
  }

  .mega-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    /*background: rgba(225, 225, 225, 0.98);
    backdrop-filter: blur(12px);*/
    background-color: #efefef;
    border-radius: 30px !important;
  }

  .mega-inner {
    margin: 0 auto;
    padding: 32px;
    display: flex;
  }

  .mega-inner.rounded {
    border-radius: 30px !important;
  }
  

  .mega-inner.single-column { display: block; width: 100%; }

  .all-service-cards,
  .all-industries-cards {
    width: 50%;
    border-right: 1px solid #efefef;
    flex-shrink: 0;
  }

  .serviceheader,
  .service-header,
  .industries-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 10px 0;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .serviceheader h2,
  .service-header  h2,
  .industries-header h2 {
    color: #DF1700;
    font-size: 24px ;
    font-weight: 400;
  }

  .serviceheader h2:hover,
  .service-header  h2:hover,
  .industries-header h2:hover {
    color: #121330 !important;
    font-size: 24px ;
    font-weight: 400;
  }

  .serviceheader:hover,
  .service-header:hover,
  .industries-header:hover {
    background: #CCC;
    padding-left: 20px !important;
    border-radius: 30px 0 0 30px;
    color: #121330 !important;
  }

  .serviceheader.open,
  .service-header.open,
  .industries-header.open {
    background: var(--navy);
    padding-left: 20px !important;
    border-radius: 30px 0 0 30px;
  }

  .serviceheader.open h2,
  .service-header.open h2,
  .industries-header.open h2 { color: #fff; }

  .serviceheader.open h2:hover,
  .service-header.open h2:hover,
  .industries-header.open h2:hover { color: #121330; }

  .serviceheader .chevron { transform: rotate(-90deg); }
  .serviceheader.open .chevron,
  .service-header.open .chevron {
    transform: rotate(90deg);
    color: #fff;
  }

  .output-service-lists,
  .output-industries-list {
    width: 50%;
    background: #f8fafc;
    position: relative;
    overflow: hidden;       
    border-radius:  0 30px 30px 30px;
  }

  .service-lists,
  .industries-list {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s ease,
                padding 0.35s ease;
    padding: 0 2rem;
    background: #f8fafc; 
  }

  .service-lists.open,
  .industries-list.open {
    max-height: 100%;
    opacity: 1;
    padding: 2rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 20px;
  }

  .service-lists.open img,
  .industries-list.open img{
    display: flex;
    flex-direction: row;
    width: 50%;
    margin: 0 0 20px 0;
  }

  .service-lists li,
  .industries-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0.65rem 0;
    font-size: 0.87rem;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
  }
  .service-lists li::before,
  .industries-list li::before {
    content: "";
    width: 5px; height: 5px;
    background: var(--gold, #C89B3C);
    flex-shrink: 0;
  }
  .service-lists li:hover,
  .industries-list li:hover {
    color: #2563eb;
    padding-left: 6px;
  }

  .nav-overlay2 {
    position: fixed;
    /*inset: 0;*/
    background: rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
  }
  .nav-overlay2.active {
    opacity: 1;
    visibility: visible;
  }
}

/* ─── 4. SEARCH OVERLAY ──────────────────────────────────────── */
.site-search {
  position: relative;
  display: flex;
  align-items: center;
  /*width: 100%;*/
  padding: 0 20px !important;
}
.site-search input {
  border: none;
  width: 100%;
  padding: 8px 36px 8px 14px;
  border-bottom: 1px solid var(--border);
  font-family: 'Titillium Web', sans-serif;
  color: var(--text-primary);
  outline: none;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-search input:focus {
  border: solid 1px var(--gold);
}
.site-search .search-icon svg {
  width: 20px;
  height: auto;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(10, 35, 66, 0.10);
  display: none;
  z-index: 1000;
  max-height: 480px;
  overflow-y: auto;
  border-radius: 4px;
}
.search-dropdown.active { display: block; }

.search-result-item {
  display: block;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.search-result-item:hover { background: var(--cream); }
.search-result-item:hover .result-title { color: var(--gold); }

.search-result-item .result-category {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 4px;
}
.search-result-item .result-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  margin: 0 0 4px 0;
}
.search-result-item .result-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 759px) {
  .site-search .search-icon {
    position: absolute;
    top: 17px;
    right: 30px;
    pointer-events: none;
  }
}

@media (min-width: 760px) {
  .site-search { margin: 0 0 0 auto; }
  .site-search input { width: 300px; }
  .site-search input:focus { width: 280px; }
  .site-search .search-icon {
    position: absolute;
    top: 10px;
    right: 30px;
    pointer-events: none;
  }
}


/* 

THE ADDITIONS

*/


@media screen and (min-width: 0px) and (max-width: 768px) {
  
    .homeburger {
      display: flex;
      align-items: center;
      cursor: pointer;
      position: relative;
      user-select: none;
      bottom: 100px;
      margin: 0 auto;
      border-radius: 999px;
      background-color: #e2e8f0;
      width: 70px;
      height: 70px;
      border: solid 5px #CCC;
      justify-content: center;
      align-content: center;
    }

    .homeburger .menu-opener {
      margin: 0;
      font-size: 16px;
      font-weight: 500;
      color: var(--navy);
      transition: color 0.2s ease;
    }

    .homeburger .menu-closer {
      display: none;               /* hidden by default */
    }

    .homeburger:hover .menu-opener {
      color: var(--gold);
    }

    /* When the menu is open the JS will switch the display,
      but you can also style based on body.menu-open if you prefer */
    body.menu-open .homeburger .menu-opener {
      display: none;
    }
    body.menu-open .homeburger .menu-closer {
      display: block;
    }
    .navbar {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap; 
        width: 100%;
    }

    .navbar-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        overflow: visible;
        width: 100%;        
    }

    .logo {  
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;   
    }

    .logo svg{
        display: flex;
        width: 60px;
        height: auto;
        padding: 10px;
    }
}   


@media screen and (min-width: 769px) and (max-width: 4000px) {

  
    .homeburger {
      display: flex;
      align-items: center;
      cursor: pointer;
      position: relative;
      user-select: none;
      top: 140px;
      margin: 0 auto;
      border-radius: 999px;
      background-color: #FFF;
      width: 70px;
      height: 70px;
      border: solid 5px #CCC;
      justify-content: center;
      align-content: center;
    }

    .homeburger svg#closer{
      display: flex;
      align-items: center;
      justify-items: center;
      justify-self: center;
      align-self: center;
      justify-content: center;
      align-content: center;
    }

    .homeburger .menu-opener {
      margin: 0;
      font-size: 16px;
      font-weight: 500;
      color: var(--navy);
      transition: color 0.2s ease;
    }

    .homeburger .menu-closer {
      display: none;               /* hidden by default */
    }

    .homeburger:hover .menu-opener {
      color: var(--gold);
    }

    /* When the menu is open the JS will switch the display,
      but you can also style based on body.menu-open if you prefer */
    body.menu-open .homeburger .menu-opener {
      display: none;
    }
    body.menu-open .homeburger .menu-closer {
      display: block;
    }

    section .wrapper{
      display: flex;
      flex-direction: row;
      flex-wrap:nowrap; 
      width: 100%;
    }

    .navbar-container{
      display: flex;
      flex-direction: row;
      flex-wrap: wrap; 
      /*width: 60%;*/
      align-self: flex-start;
      align-items: center;
      justify-items: left;
      align-content: flex-start;
      position: relative;
      top: 40px;
      left: 40px;
      
    }

     .white{
      /*background: #FFF;*/
      border-radius: 50px;
      padding: 10px;
    }

     .stretch{      
      border-radius: 50px;
      height: 80px;
      margin: 0 0 0 40px;
    }
    
    /*.rounded{
      border-radius: 30px !important;
      box-sizing: border-box;
      display: flex;
    }*/

 

    .navbar {
        display: flex;
        flex-direction: row;
        flex-wrap:wrap; 
        width: 100%;
    }

    .navbar-inner {
        display: flex;
        justify-content: left;
        overflow: visible;
        width: 100%;        
    }

    .logo {  
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;   
    }

    .logo svg{
        display: flex;
        width: 100px;
        height: auto;
    }
} 


@media (min-width: 768px) {
  .home-page .mobileNav {
    display: none;                   /* Override the normal desktop hide */
  }

  .home-page .navbar_burger {
    display: none;                   /* Hide the normal burger if not needed */
  }
}



