/*************************************************************
  1) FORMS (WPForms)
*************************************************************/
.wpforms-form button[type=submit]{
  background-color:#024488 !important;
  border-color:#024488 !important;
  color:#fff !important;
  transition:background .3s ease-in-out;
}
.wpforms-form button[type=submit]:hover{
  background-color:#0097c6 !important;
}


/*************************************************************
  2) GLOBAL SCROLL / ANCHOR OFFSETS (sticky header safe)
  Desktop header-offset: 96px
  Mobile header height: 90px -> 105px for buffer
*************************************************************/
:root{
  --header-offset: 96px; /* desktop */
}

/* Ensures anchor jumps land below sticky header */
html{
  scroll-padding-top: var(--header-offset);
}

/* Headings + Elementor anchors */
h1, h2, h3, h4, h5, h6,
.elementor-widget-heading,
.elementor-menu-anchor{
  scroll-margin-top: var(--header-offset);
}


/*************************************************************
  3) CONTENT LIST SPACING (scoped)
*************************************************************/
.elementor-widget-text-editor ul li,
.elementor-widget-theme-post-content ul li{
  margin-bottom: 11px;
}
.elementor-widget-text-editor ul li:last-child,
.elementor-widget-theme-post-content ul li:last-child{
  margin-bottom: 0;
}


/*************************************************************
  4) DESKTOP SIDEBAR STICKY + WIDTH (25/75 layout support)
  Classes used:
  - Sticky sidebar wrapper: .be-left-sidebar
  - Left container width:   .toc-sidebar
*************************************************************/
@media (min-width: 1025px){

  /* Sticky sidebar wrapper */
  .be-left-sidebar{
    position: sticky;
    top: var(--header-offset);
    z-index: 3;            /* keep low; header/nav should be higher */
    align-self: flex-start;
  }

  /* If your TOC appears to "vanish" or won't expand, an ancestor is clipping it.
     Apply this class to the LEFT column/container that holds the TOC (not the TOC itself). */
  .toc-sidebar{
    min-width: 280px;
    flex: 0 0 300px;

    /* Helps prevent clipping when TOC expands inside a sticky column */
    overflow: visible;
  }
}


/*************************************************************
  5) DESKTOP TOC (collapsible + sticky sidebar safe)
  Apply classes in Elementor:
  - Desktop TOC widget:     .toc-desktop
  - "Card" wrapper:         .toc-sticky-card
*************************************************************/
@media (min-width: 1025px){

  /* Avoid clipping the TOC body when it expands */
  .toc-sticky-card{
    overflow: visible;
  }

  /* Make only the TOC list scroll if it's long (robust selectors) */
  .toc-sticky-card .elementor-toc__body,
  .toc-sticky-card .elementor-toc__container{
    max-height: 70vh; /* tune 60–75vh */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Item spacing + click target (scoped) */
  .toc-desktop .elementor-toc__list-item{
    margin-bottom: 10px;
  }
  .toc-desktop .elementor-toc__list-item:last-child{
    margin-bottom: 0;
  }

  .toc-desktop .elementor-toc__list-item a{
    display: block;
    padding: 4px 0;       /* slightly larger tap/click target */
    line-height: 1.25;
  }

  /* Nested items slightly tighter */
  .toc-desktop .elementor-toc__list > .elementor-toc__list-item{
    margin-bottom: 12px;
  }
  .toc-desktop .elementor-toc__list-item .elementor-toc__list-item{
    margin-bottom: 8px;
  }
}


/*************************************************************
  6) MOBILE (header offset, logo size, mobile TOC)
  - Mobile TOC widget class: .toc-mobile
*************************************************************/
@media (max-width: 767px){

  :root{ --header-offset: 105px; }

  /* Mobile header logo size */
  .elementor-location-header .elementor-widget-site-logo img{
    max-height: 56px;
    width: auto;
    display: block;
  }

  /* Mobile TOC scroll behavior (only if you want internal scroll) */
  .toc-mobile .elementor-toc__body,
  .toc-mobile .elementor-toc__container{
    max-height: 55vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .toc-mobile .elementor-toc__list-item{
    margin-bottom: 10px;
  }
  .toc-mobile .elementor-toc__list-item:last-child{
    margin-bottom: 0;
  }
  .toc-mobile .elementor-toc__list-item a{
    line-height: 1.2;
    padding: 6px 0;
  }
}

.be-copyright,
.be-copyright * {
  color: #fff !important;
}

/* Center the copyright HTML on ALL devices */
.be-copyright{
  width: 100%;
}

.be-copyright .be-copyright-inner{
  width: 100%;
  text-align: center;
}

/* Optional: tighten/space the second line */
.be-copyright .be-copyright-inner > div + div{
  margin-top: 2px;
}

@media (max-width: 767px){
  .be-copyright .be-copyright-inner{
    font-size: 14px;
  }
}

/* Disable CSS sticky on left sidebar (use Elementor Motion Effects sticky only) */
@media (min-width: 1025px){
  .be-left-sidebar{
    position: relative !important;   /* or static */
    top: auto !important;
    z-index: auto !important;
    align-self: auto !important;
  }
}

/* Ensure sidebar never overlays header */
@media (min-width: 1025px){
  .be-left-sidebar{ z-index: 1 !important; }
  .elementor-location-header{ z-index: 9999 !important; }
}

/* Header must always sit above sticky sidebar */
.elementor-location-header{
  position: relative;
  z-index: 99999 !important;
}

/* Keep Elementor sticky elements from overlaying header */
.elementor-sticky--active{
  z-index: 10 !important;
}
