*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) and (max-width: 1024px) {

  body,
  section,
  header,
  footer {
    margin-right: 0 !important;
    padding-right: 0 !important;
    overflow-x: hidden !important;
  }
}


/* Tablet / iPad Fix: Keep text slightly away from hero image */
@media (max-width: 1024px) and (min-width: 768px) {
  #heroText {
    padding-left: 1rem;
    text-align: center;
  }

  #heroImage img {
    max-width: 85%;
  }
}



/* Tablet (iPad) Fixes Only: 768px–1024px */

@media (min-width: 768px) and (max-width: 1024px) {

  /* General spacing fix */
  section,
  header,
  footer {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    overflow-x: hidden !important;
  }

  /* Header logo fix */
  #mainHeader {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Hero section alignment */
  #home {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    display: flex !important;
    flex-direction: column-reverse !important;
  }

  #home img {
    max-width: 80% !important;
    margin: 0 auto !important;
  }

  /* LIFE SECTION */
  #life {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }

  #life img {
    max-width: 80% !important;
    margin: 0 auto !important;
  }

  #life .text-left {
    text-align: center !important;
  }

  /* PRACTICE AREAS grid tighter */
  #practice .grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* MEET ATTORNEY */

  /* section[style*='BigG.png'],
section.bg-\[url\('images/BigG\.png'\)\] {
  background-size: 45% !important;
  background-position: right bottom !important;
  text-align: center !important;
} */

  section[style*="BigG.png"],
  .meet-section {
    background-size: 45% !important;
    background-position: right bottom !important;
    text-align: center !important;
  }



  section[style*='BigG.png'] .grid {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
  }

  section[style*='BigG.png'] img {
    max-width: 75% !important;
    margin: 0 auto !important;
  }



  /* CONTACT / MAP */
  section iframe {
    width: 100% !important;
    height: 320px !important;
  }


  @media (min-width: 1024px) {
    .map-frame {
      pointer-events: auto;
    }
  }


  /* FOOTER */
  footer {
    text-align: center !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  footer img {
    margin: 0 auto !important;
  }

  footer div {
    text-align: center !important;
  }
}



/* --- FIX for tablet overlap box (gray contact banner) --- */
@media (min-width: 768px) and (max-width: 1024px) {
  #practice {
    position: relative !important;
    overflow: visible !important;
    /* Allow overlap */
  }

  #practice>.absolute {
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translate(-50%, 50%) !important;
    /* Keep half overlap */
    width: 80% !important;
    z-index: 20 !important;

  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  #practice>.absolute {
    transform: translate(-50%, 60%) !important;
    /* was 50%, now 60% */
  }
}


/* MOBILE HEADER LOGO FIX (<768px)*/


@media (max-width: 767px) {
  #mainHeader {
    height: 80px;
    /* header height */
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    /* logo left, hamburger right */
  }

  /* Logo container */
  #headerLogo {
    display: flex;
    align-items: center;
    /* vertical centering */
    height: 100%;
    /* take full header height */
  }

  #headerLogo img {
    height: 45px;
    /* initial logo size */
    margin: 0;
    display: block;
    /* remove inline spacing issues */
  }

  /* Hamburger button */
  #menuBtn {
    display: flex;
    align-items: center;
    /* vertical center */
    justify-content: center;
    height: 100%;
    /* full header height */
    padding: 0;
    /* remove any extra spacing */
  }

  /* Scrolled state */
  #mainHeader.scrolled {
    height: 65px;
    /* shrink header */
  }

  #mainHeader.scrolled #headerLogo img {
    height: 30px;
    /* smaller logo on scroll */
  }
}


/*  Force Side Menu Full Height + Scroll on Tablets */
/* Tablet / iPad Fix: Full-height menu */
/* --------------------------- */
/* Hamburger Menu / Side Menu Fix for iPad & Tablet */
/* --------------------------- */

/* Ensure the hamburger button is clickable on tablet */
@media (min-width: 768px) and (max-width: 1024px) {
  #menuBtn {
    display: flex !important;
    z-index: 10001;
    /* Make sure button is above everything */
    cursor: pointer;
  }

  /* Ensure sideMenu is always on top and full height */
  #sideMenu {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    /* start hidden */
    width: 16rem !important;
    height: 100vh !important;
    min-height: 100vh !important;
    background: #ededf0 !important;
    z-index: 9999 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    transition: right 0.5s ease-in-out !important;
  }

  #sideMenu.open {
    right: 0 !important;
  }

  /* Close button inside menu */
  #closeMenu {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    z-index: 10000 !important;
    cursor: pointer;
  }

  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden !important;
    height: 100vh !important;
  }
}

@media (min-width: 475px) {
  .xs\:text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
}

/* Fine-tune responsive heading */
@media (max-width: 374px) {
  h2 {
    font-size: 1.5rem !important;
    line-height: 2rem !important;
  }
}

@media (min-width: 375px) and (max-width: 474px) {
  h2 {
    font-size: 1.75rem;
    line-height: 2.25rem;
  }
}

@media (min-width: 475px) and (max-width: 639px) {
  h2 {
    font-size: 1.875rem;
    line-height: 2.375rem;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  h2 {
    font-size: 2.25rem;
    line-height: 2.75rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  h2 {
    font-size: 3rem;
    line-height: 3.5rem;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  h2 {
    font-size: 3.5rem;
    line-height: 4rem;
  }
}

@media (min-width: 1280px) {
  h2 {
    font-size: 3.75rem;
    line-height: 4.25rem;
  }
}

/* Ensure proper text wrapping */
h2 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}