/* Applies only when the TE Flexible Page template is selected. */
body.page-template-te-flexible .lnbTitleBar1,
body.page-template-te-flexible .hypercore-page-title-bar,
body.page-template-te-flexible .badgeRotator_footer {
    display: none !important;
}

/* The page is full width; individual sections determine their content width. */
main#te-flexible-main {
    display: block !important;
    position: relative;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    font-family: var(--theme-font-lato, sans-serif);
    font-size: 18px;
    line-height: 1.6;
    color: var(--font-color, #202124);
}

/* Fixed hero structure, populated from this page's title and images. */
#te-flexible-main .te-flexible-hero {
    position: relative;
    width: 100%;
    background: #006aa2;
    color: #fff;
    isolation: isolate;
}
#te-flexible-main .te-flexible-hero__background {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -1;
}
#te-flexible-main .te-flexible-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    min-height: 400px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}
#te-flexible-main .te-flexible-hero--with-image { margin-bottom: 60px; }
#te-flexible-main .te-flexible-hero--with-image .te-flexible-hero__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
#te-flexible-main .te-flexible-hero__content {
    width: 100%;
    max-width: 700px;
    min-width: 0;
    margin: 0 auto;
    padding: clamp(24px, 3vw, 48px);
    box-sizing: border-box;
    background: rgba(0, 22, 36, .72);
    backdrop-filter: blur(1px);
    color: #fff;
    text-align: left;
}
#te-flexible-main .te-flexible-hero__content h1 {
    color: #fff !important;
    font-family: var(--theme-font-montserrat, sans-serif);
    font-size: clamp(32px, 3.8vw, 50px);
    font-weight: 800;
    line-height: 1.2;
    margin: 18px 0 24px;
    padding: 0;
    overflow-wrap: anywhere;
}
#te-flexible-main .te-flexible-hero__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#te-flexible-main .te-flexible-hero__buttons .hypercore-button { border: 0; color: #fff !important; font-family: inherit; cursor: pointer; gap: 8px; text-decoration: none; }
#te-flexible-main .te-flexible-hero__buttons .te-flexible-hero__call {
    --theme-primary: #b91a1a;
    --theme-secondary: #ef5350;
    background: transparent radial-gradient(closest-side at 50% 50%, var(--theme-secondary) 0%, var(--theme-primary) 100%) !important;
}
#te-flexible-main .te-flexible-hero__reviews .gbp-button { background: transparent !important; padding: 0 !important; }
#te-flexible-main .te-flexible-hero__reviews .gbp-review-count { color: #fff !important; font-size: clamp(13px, 1vw, 16px) !important; }
#te-flexible-main .te-flexible-hero__reviews .gbp-expand-icon svg { fill: #fff !important; }
#te-flexible-main .te-flexible-hero__media { align-self: end; min-width: 0; padding: 0 24px; }
#te-flexible-main .te-flexible-hero__image {
    display: block;
    width: 100%;
    max-width: 470px;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    margin: 0 auto;
    transform: translateY(80px);
}

/* Classic/Block Editor content has its own readable, centered container. */
#te-flexible-main .te-flexible-page__content--text {
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
    padding: 48px 32px 32px;
    text-align: center;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

#te-flexible-main .te-flexible-page__content--text :where(h2, h3, h4) {
    font-family: var(--theme-font-montserrat, sans-serif);
    line-height: 1.3;
}

#te-flexible-main .te-flexible-page__content--text :where(p, ul, ol) {
    margin-bottom: 1.25em;
}

#te-flexible-main .te-flexible-page__content--text ul { list-style: disc; padding-left: 1.5em; }
#te-flexible-main .te-flexible-page__content--text ol { list-style: decimal; padding-left: 1.5em; }
#te-flexible-main .te-flexible-page__content--text img { max-width: 100%; height: auto; }

/* Keep the builder's outer containers open for full-width sections. */
#te-flexible-main .te-flexible-page__content--builder,
#te-flexible-main .te-flexible-page__content--builder > .panel-layout {
    width: 100%;
    max-width: none !important;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: visible !important;
}

/* Constrain rows even when SiteOrigin adds row-style/stretch wrappers.
   Only a row containing TE Banner is allowed to span the page. */
#te-flexible-main .te-flexible-page__content--builder .panel-grid {
    width: 100% !important;
    max-width: 940px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
    overflow: visible !important;
}
#te-flexible-main .te-flexible-page__content--builder .panel-grid > .panel-row-style,
#te-flexible-main .te-flexible-page__content--builder .panel-grid .siteorigin-panels-stretch {
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

/* Put each banner in a dedicated one-column row without other widgets. */
#te-flexible-main .te-flexible-page__content--builder .panel-grid:has(.te-banner) {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#te-flexible-main .panel-grid:has(.te-banner) > .panel-row-style {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#te-flexible-main .panel-grid:has(.te-banner) .panel-grid-cell:has(.te-banner),
#te-flexible-main .widget_te-banner,
#te-flexible-main .so-widget-te-banner {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
}
#te-flexible-main .te-banner {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    right: auto !important;
}

/* Template-local link colors; banner links remain readable on dark backgrounds. */
#te-flexible-main .te-flexible-page__content--text a:not(.hypercore-button) {
    color: #176cb6;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#te-flexible-main .te-banner .te-banner__content a:not(.hypercore-button),
#te-flexible-main .te-banner .te-banner__content a:not(.hypercore-button):visited,
#te-flexible-main .te-banner .te-banner__content a:not(.hypercore-button):hover,
#te-flexible-main .te-banner .te-banner__content a:not(.hypercore-button):focus {
    color: var(--te-banner-color, #fff) !important;
    background-image: none !important;
    border-bottom: none !important;
    text-decoration: underline !important;
    text-decoration-color: currentColor !important;
    text-underline-offset: 2px;
}

#te-flexible-main .te-banner .te-banner__content a.hypercore-button { color: #fff !important; }

@media (max-width: 600px) {
    #te-flexible-main .te-flexible-page__content--text { padding-left: 16px; padding-right: 16px; }
    #te-flexible-main .te-flexible-page__content--builder .panel-grid:not(:has(.te-banner)) { padding-left: 16px !important; padding-right: 16px !important; }
}

@media (max-width: 940px) {
    #te-flexible-main .te-flexible-hero--with-image .te-flexible-hero__inner { grid-template-columns: minmax(0, 1fr); }
    #te-flexible-main .te-flexible-hero__inner { min-height: 280px; padding: 28px 16px; gap: 16px; }
    #te-flexible-main .te-flexible-hero__content { padding: 24px; }
    #te-flexible-main .te-flexible-hero__media { padding: 0 16px; }
    #te-flexible-main .te-flexible-hero__image { max-height: 320px; transform: translateY(48px); }
    #te-flexible-main .te-flexible-hero--with-image { margin-bottom: 40px; }
}
#te-flexible-main .te-flexible-hero__buttons .hypercore-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  width: 140px;
  height: 48px;
  min-height: 48px;
  padding: 0 20px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 100px !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

/* Custom page background */
main#te-flexible-main,
#te-flexible-main .te-flexible-page__content {
  background-color: #eaecf0;
}

/* Center other widgets in a row containing a banner */
#te-flexible-main .panel-grid:has(.te-banner)
.so-panel:not(.widget_te-banner) {
  width: 100% !important;
  max-width: 940px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Keep the banner widget full width */
#te-flexible-main .panel-grid:has(.te-banner)
.so-panel.widget_te-banner {
  width: 100% !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.te-banner-checklist ul:not(.glide__slides) {
    list-style: none;
    padding-left: 33px;
}

.te-banner-checklist ul:not(.glide__slides) li {
    position: relative;
    list-style: none;
    margin-bottom: 12px;
    min-height: 25px;
}

.te-banner-checklist ul:not(.glide__slides) li::before {
    position: absolute;
    content: "";
    top: 0;
    left: -33px;
    width: 25px;
    height: 25px;
    background-image: url("https://www.tecertifiedelectricians.com/wp-content/themes/hypercore-theme-child/dist/images/check-in-circle.svg");
    background-repeat: no-repeat;
    background-size: contain;
    transition: left 0.3s ease-in-out;
}