/**
 * HandlaOnline — section spacing (page builder + public site)
 *
 * Padding (pt-*, pb-*, default 70px) = space INSIDE the section (content vs section edge).
 * Margin (mt-*, mb-*, ho-overlap-*) = space BETWEEN sections (external gap / overlap).
 */

:root {
    --ho-page-header-gap: 35px;
    --ho-page-header-bleed: 0px;
}

/*
 * Page header then hero — often separated by <style> tags from SectionRenderer/hero.
 * Adjacent sibling (+) fails; use general sibling (~).
 */
section.page-header:has(~ section.ho-overlap-page-header),
section.page-header:has(~ section[data-ho-section].ho-overlap-page-header) {
    margin-bottom: 0 !important;
    position: relative;
    z-index: 5;
}

/* Porto theme-elements: section.section { margin: 30px 0 } — heroes use m-0; keep it effective */
section.section.section-hero.ho-overlap-page-header,
section.section.section-hero[class*="ho-overlap-top"] {
    border-top: none !important;
    padding-top: 0 !important;
}

.ho-section-overlap {
    position: relative;
    z-index: 2;
}

/*
 * Close Porto .page-header margin-bottom (35px) + optional bleed on transparent headers.
 * gap = always; bleed = extra pull only when layout sets --ho-page-header-bleed > 0.
 */
section.section-hero.ho-overlap-page-header,
section.section.section-hero.ho-overlap-page-header,
.ho-overlap-page-header {
    margin-top: calc(-1 * var(--ho-page-header-gap, 35px) - var(--ho-page-header-bleed, 0px)) !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    position: relative;
    z-index: 1;
}

/* Fixed pulls when element above is another section or custom block */
.ho-overlap-top-xs {
    margin-top: -40px !important;
}

.ho-overlap-top-sm {
    margin-top: -80px !important;
}

.ho-overlap-top-md {
    margin-top: -140px !important;
}

.ho-overlap-top-lg {
    margin-top: -200px !important;
}

.ho-overlap-top-xl {
    margin-top: -260px !important;
}

.ho-overlap-bottom-sm {
    margin-bottom: -40px !important;
}

.ho-overlap-bottom-md {
    margin-bottom: -80px !important;
}

.ho-overlap-bottom-lg {
    margin-bottom: -120px !important;
}

/* Remove gap between stacked full-width sections */
.ho-overlap-top-md.ho-section-overlap,
.ho-overlap-page-header.ho-section-overlap {
    margin-bottom: 0;
}

/* Page builder spacing tokens (Bootstrap-compatible, when BS utilities are not loaded) */
section.page-section.pt-0,
section.section.pt-0,
section[data-ho-section].pt-0 { padding-top: 0 !important; }
section.page-section.pb-0,
section.section.pb-0,
section[data-ho-section].pb-0 { padding-bottom: 0 !important; }
section.page-section.pt-2,
section.section.pt-2,
section[data-ho-section].pt-2 { padding-top: 0.5rem !important; }
section.page-section.pb-2,
section.section.pb-2,
section[data-ho-section].pb-2 { padding-bottom: 0.5rem !important; }
section.page-section.pt-3,
section.section.pt-3,
section[data-ho-section].pt-3 { padding-top: 1rem !important; }
section.page-section.pb-3,
section.section.pb-3,
section[data-ho-section].pb-3 { padding-bottom: 1rem !important; }
section.page-section.pt-4,
section.section.pt-4,
section[data-ho-section].pt-4 { padding-top: 1.5rem !important; }
section.page-section.pb-4,
section.section.pb-4,
section[data-ho-section].pb-4 { padding-bottom: 1.5rem !important; }
section.page-section.pt-5,
section.section.pt-5,
section[data-ho-section].pt-5 { padding-top: 3rem !important; }
section.page-section.pb-5,
section.section.pb-5,
section[data-ho-section].pb-5 { padding-bottom: 3rem !important; }

section.page-section.mt-2,
section.section.mt-2,
section[data-ho-section].mt-2 { margin-top: 0.5rem !important; }
section.page-section.mb-2,
section.section.mb-2,
section[data-ho-section].mb-2 { margin-bottom: 0.5rem !important; }
section.page-section.mt-3,
section.section.mt-3,
section[data-ho-section].mt-3 { margin-top: 1rem !important; }
section.page-section.mb-3,
section.section.mb-3,
section[data-ho-section].mb-3 { margin-bottom: 1rem !important; }
section.page-section.mt-4,
section.section.mt-4,
section[data-ho-section].mt-4 { margin-top: 1.5rem !important; }
section.page-section.mb-4,
section.section.mb-4,
section[data-ho-section].mb-4 { margin-bottom: 1.5rem !important; }
section.page-section.mt-5,
section.section.mt-5,
section[data-ho-section].mt-5 { margin-top: 3rem !important; }
section.page-section.mb-5,
section.section.mb-5,
section[data-ho-section].mb-5 { margin-bottom: 3rem !important; }

/* Stats counters — center icons above numbers (overrides FA inline-block) */
.counters .counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.counters .counter .counter-icon,
.counters .counter > i[class*="fa-"],
.counters .counter > i[class*="ni-"] {
    display: block !important;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.35rem;
    font-size: 2.1875rem;
    line-height: 1;
}

.counters .counter .counter-icon i {
    display: inline-block;
}

/* Let Porto theme-elements control sizing inside .counters */
.counters .counter > strong.text-10,
.counters .counter > strong.text-8 {
    font-size: inherit;
    line-height: inherit;
}
