/*
 * Drag-and-drop header and footer (Customizer > Header / Footer > "Arrange yourself").
 * Loaded only when one of them uses style=builder. Works with both the modern design kit
 * (--sk-* tokens) and the classic Porto look (fallback values).
 */

/* ---- Header rows and zones ---------------------------------------------------- */
#header.hf-header .header-body { border-top: 0; }
.hf-row { display: flex; align-items: center; gap: 16px; min-height: 0; }
.hf-header .hf-main { min-height: 84px; }
.hf-header .header-column.hf-zone { flex: 0 0 auto; min-width: 0; }
.hf-header .header-column.hf-zone--center { flex: 1 1 auto; }
.hf-zone, .hf-header .hf-zone > .header-row { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; }
.hf-header .hf-zone > .header-row { flex-wrap: nowrap; width: 100%; }
.hf-zone--left, .hf-zone--left > .header-row { justify-content: flex-start; }
.hf-zone--center, .hf-zone--center > .header-row { justify-content: center; }
.hf-zone--right, .hf-zone--right > .header-row { justify-content: flex-end; }
.hf-zone:empty { display: none; }
.hf-header .hf-zone:empty, .hf-header .hf-zone > .header-row:empty { display: flex; }
.hf-header .hf-menu { flex: 0 1 auto; }
.hf-header .hf-menu .header-nav-main nav > ul > li > a { padding-left: 14px; padding-right: 14px; }

/* ---- Top bar ------------------------------------------------------------------ */
.hf-top { font-size: 13px; line-height: 1.4; border-bottom: 1px solid var(--sk-border, #ececec); }
.hf-top .hf-row { min-height: 42px; }
.hf-top .hf-zone { flex: 1 1 0; min-width: 0; }
.hf-top--light { background: var(--sk-soft, #f6f6f4); color: var(--sk-text, #3d3d3d); }
.hf-top--dark { background: var(--sk-dark, #171717); color: #e9e9e9; border-bottom-color: transparent; }
.hf-top--brand { background: var(--sk-btn, var(--primary, #0b5cad)); color: var(--sk-btn-ink, var(--primary-inverse, #fff)); border-bottom-color: transparent; }
.hf-top a:not(.btn), .hf-top .hf-text { color: inherit; text-decoration: none; }
.hf-top a:not(.btn):hover { text-decoration: underline; text-underline-offset: 3px; }
.hf-top .social-icons li a { background: transparent !important; color: inherit !important; }
.hf-top .hf-button { padding: 4px 14px; font-size: 13px; }

/* ---- Elements ----------------------------------------------------------------- */
.hf-el { flex: 0 0 auto; }
.hf-contact { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; white-space: nowrap; }
.hf-header .hf-main .hf-contact { color: var(--sk-ink, #222); font-weight: 600; }
.hf-header .hf-main .hf-contact i { color: var(--sk-btn, var(--primary, #0b5cad)); }
.hf-inline-links { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.hf-inline-links a, .hf-link { color: inherit; text-decoration: none; }
.hf-header .hf-main .hf-link { color: var(--sk-ink, #222); font-weight: 500; }
.hf-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hf-social { margin: 0 !important; }
.hf-top .hf-language a, .hf-footer .hf-language a { color: inherit !important; }

.hf-button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 22px; border-radius: var(--sk-radius-btn, 6px); font-weight: 600; font-size: 14px; line-height: 1.3; white-space: nowrap; text-decoration: none; }
.hf-button.sk-btn-primary { background: var(--sk-btn, var(--primary, #0b5cad)); border: 1px solid var(--sk-btn, var(--primary, #0b5cad)); color: var(--sk-btn-ink, var(--primary-inverse, #fff)); }
.hf-button.sk-btn-primary:hover { background: var(--sk-btn-hover, var(--primary-100, #094c90)); color: var(--sk-btn-ink, var(--primary-inverse, #fff)); }
.hf-button.sk-btn-outline { background: transparent; border: 1px solid currentColor; color: var(--sk-ink, #222); }
.hf-top .hf-button.sk-btn-outline, .hf-footer .hf-button.sk-btn-outline { color: inherit; }
.hf-button.sk-btn-outline:hover { background: var(--sk-ink, #222); border-color: var(--sk-ink, #222); color: var(--sk-bg, #fff); }

/* search: a box, or an icon that opens one (no JavaScript, <details>) */
.hf-search form, .hf-search--box { display: flex; align-items: center; margin: 0; }
.hf-search input { width: 220px; max-width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--sk-border-strong, #cfcfcf); border-right: 0; border-radius: 999px 0 0 999px; background: var(--sk-surface, #fff); color: var(--sk-ink, #222); font-size: 14px; }
.hf-search input:focus { outline: 2px solid var(--sk-btn, var(--primary, #0b5cad)); outline-offset: 0; }
.hf-search button { height: 40px; width: 44px; border: 1px solid var(--sk-border-strong, #cfcfcf); border-left: 0; border-radius: 0 999px 999px 0; background: var(--sk-surface, #fff); color: var(--sk-ink, #222); }
.hf-top .hf-search input, .hf-top .hf-search button { height: 30px; font-size: 13px; }
.hf-search--icon { position: relative; }
.hf-search--icon summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; color: inherit; }
.hf-header .hf-main .hf-search--icon summary { color: var(--sk-ink, #222); }
.hf-search--icon summary::-webkit-details-marker { display: none; }
.hf-search--icon summary:hover, .hf-search--icon[open] summary { background: var(--sk-soft, #f2f2f2); }
.hf-top .hf-search--icon summary { width: 30px; height: 30px; }
.hf-top .hf-search--icon summary:hover, .hf-top .hf-search--icon[open] summary { background: rgba(127, 127, 127, .18); }
.hf-search--icon form { position: absolute; top: calc(100% + 8px); right: 0; z-index: 1050; padding: 10px; background: var(--sk-surface, #fff); border: 1px solid var(--sk-border, #e6e6e6); border-radius: 14px; box-shadow: 0 16px 40px rgba(17, 17, 17, .12); }
.hf-zone--left .hf-search--icon form { left: 0; right: auto; }
.hf-search--icon input { width: 260px; }

/* ---- Footer ------------------------------------------------------------------- */
#footer.hf-footer { margin-top: 0; padding: 72px 0 0; border-top: 0; font-size: 14px; background: var(--hf-footer-bg); color: var(--hf-footer-text); }
.hf-footer--dark { --hf-footer-bg: var(--sk-footer-bg, #151515); --hf-footer-ink: var(--sk-footer-ink, #fff); --hf-footer-text: var(--sk-footer-text, #bdbdbd); --hf-footer-border: var(--sk-footer-border, rgba(255, 255, 255, .14)); }
.hf-footer--light { --hf-footer-bg: var(--sk-soft, #f6f6f4); --hf-footer-ink: var(--sk-ink, #111); --hf-footer-text: var(--sk-muted, #5f5f5f); --hf-footer-border: var(--sk-border, #e2e2e2); border-top: 1px solid var(--hf-footer-border) !important; }
.hf-footer-cols { row-gap: 40px; padding-bottom: 56px; }
.hf-footer-cols > [data-hf-col] > .hf-el + .hf-el { margin-top: 24px; }
.hf-footer .hf-heading { font-family: inherit; font-size: 14px !important; line-height: 1.4 !important; font-weight: 700 !important; letter-spacing: .01em; margin: 0 0 16px; color: var(--hf-footer-ink) !important; text-transform: none; }
.hf-footer p, .hf-footer .hf-text { color: var(--hf-footer-text); }
.hf-footer .hf-text { white-space: normal; }
.hf-footer a:not(.btn) { color: var(--hf-footer-text) !important; text-decoration: none; }
.hf-footer a:not(.btn):hover { color: var(--hf-footer-ink) !important; text-decoration: underline; text-underline-offset: 3px; }
.hf-links { list-style: none; margin: 0; padding: 0; }
.hf-links li { margin-bottom: 10px; }
.hf-contact-list li { display: flex; gap: 10px; align-items: baseline; }
.hf-contact-list i { width: 16px; color: var(--hf-footer-ink); opacity: .8; }
.hf-posts li { display: flex; flex-direction: column; gap: 2px; }
.hf-posts time { font-size: 12.5px; color: var(--hf-footer-text); opacity: .85; }
.hf-about-logo { display: inline-block; margin-bottom: 14px; text-decoration: none !important; }
.hf-about .cms-logo-text { color: var(--hf-footer-ink); font-size: 1.35rem; font-weight: 700; }
.hf-about p { max-width: 340px; margin: 0; }
.hf-footer .social-icons li a { background: transparent !important; color: var(--hf-footer-text) !important; }
.hf-footer .social-icons li a:hover { color: var(--hf-footer-ink) !important; }
.hf-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding: 22px 0 30px; border-top: 1px solid var(--hf-footer-border); }
.hf-footer-bottom .hf-zone { flex: 1 1 auto; min-width: 0; }
.hf-footer .hf-el { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.hf-copyright { margin: 0; }

/* ---- Phones and tablets ------------------------------------------------------- */
@media (max-width: 991.98px) {
	.hf-header .hf-main { min-height: 68px; gap: 10px; }
	.hf-header .hf-main .header-column.hf-zone { flex: 0 0 auto; }
	.hf-header .hf-main .header-column.hf-zone--left { flex: 1 1 auto; }
	.hf-header .hf-main .hf-logo img { max-width: 100%; height: auto; }
	.hf-header .hf-main .hf-zone--center:not(:has(.hf-menu)):not(:has(.hf-logo)) { display: none; }
	.hf-header .hf-main :is(.hf-social, .hf-email, .hf-text, .hf-link, .hf-inline-links) { display: none !important; }
	.hf-header .hf-main .hf-phone span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.hf-header .hf-main .hf-phone { width: 40px; height: 40px; justify-content: center; border-radius: 999px; background: var(--sk-soft, #f2f2f2); }
	#header.hf-header .hf-main .hf-button { padding: 8px 16px; font-size: 13px; }
	.hf-header .hf-main .hf-search--box input { width: 150px; }
	/* Top bar: left and right stay (the language switcher usually sits right), the centre goes. */
	.hf-top .hf-zone--center { display: none; }
	.hf-top .hf-zone--left { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
	.hf-top .hf-zone--right { flex: 0 0 auto; }
	.hf-top .hf-zone--left > .hf-el:not(:first-child) { display: none; }
	.hf-top .hf-zone--left > .hf-el { flex: 0 1 auto; min-width: 0; }
	.hf-top .hf-zone--left .hf-contact span { overflow: hidden; text-overflow: ellipsis; }
	.hf-top { overflow-x: clip; } /* never widen the page; dropdowns still open downwards */
	.hf-top .hf-zone--right > :is(.hf-text, .hf-link, .hf-email) { display: none; }
	#footer.hf-footer { padding-top: 56px; }
}
@media (max-width: 575.98px) {
	#header.hf-header .hf-main .hf-button { padding: 7px 12px; font-size: 12.5px; min-height: 0; line-height: 1.3; }
	/* A search box in the right zone gets a row of its own under the logo; the rest stays beside the logo. */
	#header.hf-header .hf-main { flex-wrap: wrap; row-gap: 0; }
	#header.hf-header .hf-main .header-column.hf-zone--right, #header.hf-header .hf-main .hf-zone--right > .header-row { display: contents; }
	#header.hf-header .hf-main .hf-zone--right .hf-search--box { order: 10; flex: 1 0 100%; margin: 0 0 12px; }
	#header.hf-header .hf-main .hf-zone--right .hf-search--box input { flex: 1 1 auto; width: auto; min-width: 0; }
	.hf-header .hf-main .hf-search--box input { width: 150px; }
	.hf-search--icon input { width: min(260px, 72vw); }
	.hf-footer-bottom { flex-direction: column; align-items: flex-start; }
}
