/* ============================================================
   NEW HERO VIDEO FIXES (Desktop & Mobile)
   ============================================================ */
#content #hero-video-section {
    position: relative !important;
    width: 100vw !important;
    height: 100vh !important;
    margin-top: -120px !important;  
    padding-top: 120px !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-bottom: 50px !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

@media screen and (max-width: 991px) {
    #content #hero-video-section {
        margin-left: -20px !important; 
        margin-right: -20px !important;
        width: 100vw !important;
        height: 70vh !important;
        margin-top: -80px !important;
        padding-top: 80px !important;
    }
}

/* ============================================================
   GLOBAL MARGINS & TEXT CUT-OFF FIXES
   ============================================================ */
@media screen and (max-width: 991px) {
    .aux-wrapper, 
    .aux-container, 
    .entry-main,
    .entry-content {
        padding-left: 20px !important;
        padding-right: 20px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

h1.page-title, 
h2.title, 
.section-divisions__title {
    white-space: normal !important;
    display: block !important;
}

/* ============================================================
   NATURAL EXTRACTS & EXPERTISE BOXES
   ============================================================ */
.section-divisions__division {
    padding: 20px !important;
    box-sizing: border-box !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    min-height: 280px !important; 
    height: auto !important; 
}
@media screen and (max-width: 768px) {
    .section-divisions__division {
        width: 100% !important;
        margin-bottom: 2px !important; 
        min-height: 240px !important;
    }
}
.section-divisions__title {
    font-size: 1.4rem !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important; 
    max-width: 100% !important;
}

/* ============================================================
   ACCESSIBILITY & CONTRAST (Lighthouse Fixes)
   ============================================================ */
.site-footer { background: #111 !important; }
.site-footer .f-text, 
.site-footer a, 
.site-footer__main-nav-title { color: #ffffff !important; }

/* ============================================================
   MOBILE MENU OVERRIDES
   ============================================================ */
@media screen and (max-width: 991px) {
  .header .wrapper { padding: 8px 15px; position: relative; }
  .header-item-left img { max-width: 180px; height: auto; }
  .menu-mobile-trigger { z-index: 1002; position: relative; }
  .menu-subs.menu-mega { flex-direction: column; }
  .section-divisions.block-divisions__wrapper { flex-wrap: wrap; }
  .div-block .col-md-6 { padding: 0 15px; }
  .wp-block-spacer { height: 50px !important; }
  .our-padding .col-sm-4 { flex: 0 0 100%; max-width: 100%; margin-bottom: 30px; }
}

@media screen and (max-width: 768px) {
  .header { position: relative; top: 0; z-index: 1000; background: #fff; }
  .header-item-left img { max-width: 150px; padding: 6px !important; }
  .menu-mobile-trigger { width: 30px; height: 30px; display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer; z-index: 1002; }
  .menu-mobile-trigger span { width: 22px; height: 2px; margin: 2px 0; }
  .menu.active { width: 85vw !important; max-width: 320px; }
  .section-divisions.block-divisions__wrapper { flex-direction: column !important; display: flex !important; }
  .div-block { flex-direction: column !important; gap: 0; }
  .div-block .col-md-6 { width: 100% !important; flex: 0 0 100%; max-width: 100%; padding: 0; }
  .reverse-div { flex-direction: column-reverse !important; }
  .our-ser { padding: 30px 15px; }
  .wp-block-spacer { height: 35px !important; }
  table { width: 100% !important; font-size: 0.85rem; overflow-x: auto; display: block; }
}
/* --- 7. QUALITY ASSURANCE PAGE SPECIFIC FIXES --- */
/* Fixes for proper text spacing, heading wrapping, and content layout on mobile */

@media screen and (max-width: 991px) {
  
  /* Ensure all headings and text have proper word spacing and wrapping */
  .entry-content h1,
  .entry-content h2,
  .entry-content h3,
  .entry-content h4 {
    word-spacing: 0.1em !important;
    letter-spacing: 0.02em !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    margin-bottom: 20px !important;
    padding: 0 15px !important;
  }
  
  /* Fix h3 subheadings specifically */
  .entry-content h3 {
    font-size: 1.3rem !important;
    margin-top: 30px !important;
    margin-bottom: 15px !important;
  }
  
  /* Ensure paragraph text has proper spacing */
  .entry-content p {
    word-spacing: normal !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
    padding: 0 15px !important;
    text-align: justify !important;
    hyphens: auto !important;
    -webkit-hyphens: auto !important;
  }
  
  /* Fix image containers and ensure they don't overflow */
  .entry-content figure,
  .entry-content .wp-block-image {
    margin: 20px 0 !important;
    padding: 0 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .entry-content figure img,
  .entry-content .wp-block-image img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
  }
  
  /* Fix for column layouts on mobile - stack them */
  .wp-block-columns {
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 15px !important;
  }
  
  /* Statistics/numbers section */
  .entry-content .wp-block-group {
    padding: 20px 15px !important;
    margin: 20px 0 !important;
  }
  
  /* Fix any grid layouts */
  .wp-block-group .wp-block-columns {
    display: flex !important;
    flex-wrap: wrap !important;
  }
  
  /* Ensure buttons and links are properly sized */
  .entry-content .wp-block-button {
    margin: 10px 15px !important;
  }
  
  .entry-content .wp-block-button__link {
    padding: 12px 24px !important;
    font-size: 1rem !important;
    word-wrap: break-word !important;
  }
  
  /* Fix spacing between sections */
  .entry-content > * {
    margin-top: 0 !important;
  }
  
  .entry-content > * + * {
    margin-top: 25px !important;
  }
  
  /* Special fix for any hero/banner sections */
  .wp-block-cover.alignfull,
  .wp-block-group.alignfull {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }
  
}

@media screen and (max-width: 768px) {
  
  /* Even more compact spacing for smaller phones */
  .entry-content h1 {
    font-size: 1.8rem !important;
  }
  
  .entry-content h2 {
    font-size: 1.5rem !important;
  }
  
  .entry-content h3 {
    font-size: 1.2rem !important;
  }
  
  .entry-content p {
    font-size: 0.95rem !important;
  }
  
}

@media screen and (max-width: 480px) {
  
  /* Adjustments for very small screens */
  .entry-content h1 {
    font-size: 1.5rem !important;
    padding: 0 10px !important;
  }
  
  .entry-content h2 {
    font-size: 1.3rem !important;
    padding: 0 10px !important;
  }
  
  .entry-content h3 {
    font-size: 1.1rem !important;
    padding: 0 10px !important;
  }
  
  .entry-content p {
    font-size: 0.9rem !important;
    padding: 0 10px !important;
  }
  
  .entry-content figure,
  .entry-content .wp-block-image {
    padding: 0 10px !important;
  }
  
}
body #wpadminbar {
    z-index: 999999;
}