/*
Theme Name: EL-FAG
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: abus
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--lg) var(--wp--preset--spacing--xl);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* Reference layout: white masthead, charcoal bands, crimson links. */
* { box-sizing: border-box; }
body { margin: 0; }
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1; }
/* Keep desktop dropdowns and the mobile menu above carousel images, panels and controls. */
.wp-site-blocks > header.wp-block-template-part { position: relative; z-index: 20; }
.is-flush > .entry-content > * + * { margin-block-start: 0; }
a { text-decoration: none; }
.contact-header { padding-block: 0; }
.header-row { gap: 30px; min-height: 128px; }
.header-row p, .header-row figure { margin-block: 0; }
.brand { align-self: stretch; gap: 4px; color: var(--wp--preset--color--black); min-width: 270px; }
.brand-image { flex: 0 0 270px; max-width: 100%; align-self: center; }
.brand-image a { display: block; }
.brand-image img { display: block; width: 100%; height: 128px; object-fit: contain; object-position: center; }
.brand-mark { font-size: 66px; font-weight: 900; line-height: .84; letter-spacing: -4px; border: 1px solid var(--wp--preset--color--muted); padding: 7px 6px 4px; }
.brand-mark a { color: inherit; }
.brand-name { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; line-height: 1; }
.brand-trades { text-align: center; padding-inline: 28px; font-size: var(--wp--preset--font-size--headline); line-height: 1.15; }
.header-address { color: var(--wp--preset--color--primary); font-size: var(--wp--preset--font-size--body); line-height: 1.4; }
.header-contact { flex-shrink: 0; }
.header-image { flex: 0 1 270px; align-self: stretch; }
.header-image img { width: 100%; height: 128px; object-fit: contain; object-position: center; display: block; }
.navigation-band { min-height: 54px; }
.main-navigation { background: linear-gradient(var(--wp--preset--color--dark), var(--wp--preset--color--black)); color: var(--wp--preset--color--light); min-height: 54px; }
.main-navigation .wp-block-navigation__container { gap: 0; }
.main-navigation .wp-block-navigation-item { border-inline-start: 1px solid var(--wp--preset--color--black); }
.main-navigation .wp-block-navigation-item__content { padding: 18px 21px; font-weight: 700; }
.hero-band { padding-inline: 24px; position: relative; isolation: isolate; }
/* Text panels are independent blocks, so replacing slideshow media cannot delete them. */
.is-style-slide-panel { background: color-mix(in srgb, var(--wp--preset--color--background) 78%, transparent); color: var(--wp--preset--color--ink); padding: 32px 22px; }
.is-style-slide-panel > * { margin-block: 0; }
.is-style-slide-panel > * + * { margin-block-start: 12px; }
.is-style-slide-panel .wp-block-buttons { margin-block-start: 0; }
/* Keep partially entered button fields editable without displaying an unfinished CTA. */
.hero-panels .wp-block-button:has(.wp-block-button__link:not([href])),
.hero-panels .wp-block-button:has(.wp-block-button__link[href=""]),
.hero-panels .wp-block-button:has(.wp-block-button__link:empty) { display: none; }
.is-style-slide-panel .slide-eyebrow { margin-block-end: 24px; }
.wp-site-blocks .hero-band > .hero-panels { position: absolute; top: 21%; left: max(calc(24px + 8%), calc((100% - 1010px) / 2)); width: 490px; max-width: calc(100% - 96px); z-index: 5; margin: 0; pointer-events: none; }
.wp-site-blocks .hero-panels > .is-style-slide-panel { pointer-events: auto; margin-block: 0; }
.wp-site-blocks .hero-panels:not(.is-synced) > .is-style-slide-panel ~ .is-style-slide-panel,
.wp-site-blocks .hero-panels > .is-style-slide-panel[hidden] { display: none; }
.wp-site-blocks .hero-band:has(> .hero-panels) .gallery-caption { display: none; }
.editor-styles-wrapper .hero-panels { padding-block: 20px; }
.hero-slideshow { margin: 0 !important; }
.hero-slideshow .wp-block-jetpack-slideshow_container { height: clamp(420px, 32.4vw, 640px); max-height: none; }
.hero-slideshow .swiper-wrapper { height: 100% !important; }
.hero-slideshow .swiper-slide { height: 100%; position: relative; }
.hero-slideshow .swiper-slide figure { margin: 0; height: 100%; }
.hero-slideshow .wp-block-jetpack-slideshow_image { height: 100%; width: 100%; object-fit: cover; }
.hero-slideshow.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_caption.gallery-caption { position: absolute; z-index: 2; top: 21%; bottom: auto; right: auto; left: max(8%, calc((100% - 1010px) / 2)); width: 490px; height: auto; max-width: 65%; padding: 38px 22px 32px; background: rgb(255 255 255 / .78); color: var(--wp--preset--color--ink); text-align: left; font-size: var(--wp--preset--font-size--body); line-height: 1.45; margin: 0; box-sizing: border-box; }
.hero-slideshow.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_caption.gallery-caption a { color: var(--wp--preset--color--background); }
.hero-slideshow .gallery-caption strong { display: inline-block; margin-bottom: 12px; font-size: var(--wp--preset--font-size--display); font-weight: 700; }
.hero-slideshow .gallery-caption a { display: inline-block; background: var(--wp--preset--color--primary); color: var(--wp--preset--color--background); border-radius: 4px; padding: 6px 14px; margin-top: 4px; }
.hero-slideshow .swiper-button-prev, .hero-slideshow .swiper-button-next { top: 50% !important; width: 30px; height: 40px; background: rgb(32 32 32 / .35); border-radius: 2px; }
.hero-slideshow .swiper-button-prev::after, .hero-slideshow .swiper-button-next::after { font-size: 18px; }
.hero-slideshow .wp-block-jetpack-slideshow_button-pause { display: none; }
.hero-slideshow.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_pagination.swiper-pagination { position: absolute; bottom: 14px; left: 0; padding: 0; justify-content: center; color: var(--wp--preset--color--background); z-index: 3; }
.hero-slideshow.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_button-next,
.hero-slideshow.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_button-prev { display: block; }
.hero-slideshow.abus-hide-arrows .wp-block-jetpack-slideshow_button-next,
.hero-slideshow.abus-hide-arrows .wp-block-jetpack-slideshow_button-prev,
.hero-slideshow.abus-hide-dots .wp-block-jetpack-slideshow_pagination.swiper-pagination { display: none; }
.hero-slideshow[data-autoplay="true"] .wp-block-jetpack-slideshow_button-pause { display: block; width: 40px; height: 40px; right: 12px; bottom: 12px; top: auto; opacity: 1; z-index: 6; cursor: pointer; }
.hero-slideshow [role="button"]:focus-visible,
.hero-slideshow .swiper-pagination button:focus-visible { outline: 3px solid var(--wp--preset--color--background); outline-offset: 3px; }
/* The unified editing surface is editor-only; native saved children stay unchanged. */
.editor-styles-wrapper .abus-carousel-editor { background: var(--wp--preset--color--background); color: var(--wp--preset--color--ink); padding: 24px; border: 1px solid var(--wp--preset--color--muted); }
.editor-styles-wrapper .abus-carousel-editor .components-panel__body { margin-block: 16px; border: 1px solid var(--wp--preset--color--light); }
.editor-styles-wrapper .abus-carousel-editor .abus-carousel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 16px; }
.editor-styles-wrapper .abus-carousel-editor .abus-carousel-image { display: block; max-width: 100%; width: 360px; height: 180px; object-fit: contain; object-position: left center; margin-block: 12px; }
.editor-styles-wrapper .abus-carousel-editor .components-base-control { margin-block: 16px; }
.editor-styles-wrapper .abus-carousel-editor .abus-carousel-field-label { margin-block: 20px 6px; font-size: 13px; font-weight: 700; }
.editor-styles-wrapper .abus-carousel-editor .block-editor-rich-text__editable { border: 1px solid var(--wp--preset--color--muted); padding: 10px; margin-block: 0 16px; min-height: 44px; }
.service-band { padding-block: 38px 84px; }
.service-band .wp-block-columns { gap: 32px; margin-block: 0; }
.service-band .wp-block-column { text-align: center; }
.service-band .wp-block-heading { margin-block: 14px 12px; }
.service-band p { margin-block: 0; }
.service-band p + p { margin-top: 3px; }
.is-style-image-slot { margin: 0; }
.service-band .is-style-image-slot { max-width: 72px; margin-inline: auto; }
.service-band .is-style-image-slot img { width: 72px; height: 34px; object-fit: cover; display: block; }
.site-footer { padding-block: 34px 24px; font-size: var(--wp--preset--font-size--label); line-height: 1.4; }
.site-footer .wp-block-columns { margin-block: 0; gap: 30px; }
.site-footer .wp-block-column:first-child { flex-basis: 20%; }
.site-footer .wp-block-column:nth-child(2) { flex-basis: 54%; }
.site-footer .wp-block-column:last-child { flex-basis: 26%; }
.site-footer a { color: inherit; }
.site-footer p { margin-block: 0 15px; }
.footer-images { gap: 12px; align-items: flex-start; }
.footer-images > .wp-block-image { flex: 1 1 0; min-width: 0; margin: 0; }
.footer-images img { width: 100%; height: 40px; object-fit: contain; object-position: center; display: block; }
.footer-third-image { margin: 0 0 8px; max-width: 120px; }
.footer-third-image img { width: 100%; height: 38px; object-fit: contain; object-position: center; display: block; }
.site-footer strong { color: var(--wp--preset--color--background); font-weight: 400; }
.wp-site-blocks main:not(.is-flush) .wp-block-post-title { font-size: 36px; margin-bottom: 28px; }
.wp-site-blocks main:not(.is-flush) .entry-content { padding-block: 12px 48px; }
/* Internkontroll pages share the reference heading and green inquiry button. */
.wp-site-blocks > main:has(.internkontroll-page) { background: var(--wp--preset--color--light); }
.internkontroll-page { padding: 34px 20px 72px; min-height: 650px; }
.is-style-internkontroll-section { margin-block-start: 32px; }
.is-style-internkontroll-section > * { margin-block: 0; }
.is-style-internkontroll-section > * + * { margin-block-start: 16px; }
.is-style-internkontroll-section .wp-block-heading { font-size: clamp(26px, 2.5vw, 40px); line-height: 1.25; }
.is-style-internkontroll-section p,
.is-style-internkontroll-section .control-intro { font-size: clamp(18px, 1.35vw, 22px); line-height: 1.45; }
.is-style-internkontroll-section .control-intro { font-weight: 400; }
.is-style-internkontroll-section .wp-block-image { max-width: 54%; margin-inline: 0; }
.is-style-internkontroll-section .wp-block-image img { width: 100%; height: auto; display: block; }
.wp-site-blocks .main-navigation.wp-block-navigation .wp-block-navigation__submenu-container { background: var(--wp--preset--color--dark); color: var(--wp--preset--color--light); border-color: var(--wp--preset--color--black); min-width: 190px; }
.main-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item { border-inline-start: 0; }
.main-navigation .wp-block-navigation-submenu__toggle { margin-inline-end: 16px; }
@media (max-width: 781px) {
 .internkontroll-page { padding: 30px 20px 54px; min-height: 0; }
 .is-style-internkontroll-section .wp-block-image { max-width: 100%; }
 .wp-site-blocks .main-navigation .is-menu-open .wp-block-navigation__submenu-container { background: transparent; color: inherit; border: 0; }
}
/* Om oss: reference contact layout, with editable Google Maps block. */
.about-location { padding: 34px 20px 110px; }
.about-heading-row { gap: 24px; }
.about-heading-row .about-heading { margin: 0; font-size: clamp(36px, 3.85vw, 74px); line-height: 1.15; }
.about-heading-row .wp-block-buttons { margin: 0; }
.about-request .wp-element-button { padding: 17px 28px; font-size: clamp(17px, 1.46vw, 28px); font-weight: 400; text-transform: uppercase; border-radius: 6px; box-shadow: 0 3px 5px rgb(0 0 0 / .2); }
.about-contact-details { margin-block-start: 60px; }
.about-contact-details .wp-block-heading { font-size: clamp(28px, 2.5vw, 48px); line-height: 1.2; margin: 0 0 20px; }
.about-contact-details p { font-size: clamp(18px, 1.46vw, 28px); line-height: 1.35; margin: 0; }
.about-contact-details a[href^="mailto:"] { color: inherit; }
.about-map-rule { margin: 36px 0; border: 0; border-top: 1px solid var(--wp--preset--color--black); opacity: 1; }
@media (max-width: 781px) {
 .about-location { padding: 30px 20px 54px; }
 .about-heading-row { align-items: flex-start; gap: 24px; }
 .about-request .wp-element-button { padding: 14px 18px; }
 .about-contact-details { margin-block-start: 40px; }
 .about-map-rule { margin-block: 28px; }
}
@media (max-width: 1100px) {
 .header-row { gap: 20px; }
 .brand { min-width: 230px; }
 .brand-image { flex-basis: 230px; }
 .brand-trades { padding-inline: 18px; }
 .header-image { flex-basis: 180px; }
 .header-address, .header-contact { font-size: 16px; }
 .main-navigation .wp-block-navigation-item__content { padding-inline: 16px; }
}
@media (max-width: 781px) {
 .header-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-block: 16px; }
 .brand { min-width: 0; }
 .header-row .brand-image { flex: 0 1 calc(50% - 9px); min-width: 0; width: 100%; }
 .brand-image img { height: 90px; }
 .brand-mark { font-size: 52px; }
 .brand-name { font-size: 10px; }
 .brand-trades { font-size: 16px; padding-inline: 10px; }
 .header-address { font-size: 14px; }
 .header-contact { font-size: 16px; }
 .header-image { width: 100%; }
 .header-image img { height: 70px; }
 .main-navigation { padding-block: 12px; }
 .main-navigation .wp-block-navigation__responsive-container.is-menu-open { padding: 28px; color: var(--wp--preset--color--black); }
 .main-navigation .wp-block-navigation-item { border: 0; }
 .hero-band { padding-inline: 0; }
 .wp-site-blocks .hero-band > .hero-panels { left: 8%; top: 18%; width: 84%; max-width: 84%; }
 .hero-panels .is-style-slide-panel { padding: 24px 20px; font-size: 16px; }
 .hero-panels .is-style-slide-panel .wp-block-heading { font-size: 26px; }
 .hero-slideshow .wp-block-jetpack-slideshow_container { height: 420px; }
 .hero-slideshow.wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_caption.gallery-caption { left: 8%; top: 20%; width: 84%; max-width: 84%; padding: 24px 20px; font-size: 16px; }
 .hero-slideshow .gallery-caption strong { font-size: 26px; }
 .service-band { padding-block: 32px 48px; }
 .service-band .wp-block-columns { gap: 32px; }
 .service-band .wp-block-column { max-width: 430px; margin-inline: auto; }
 .site-footer .wp-block-columns { gap: 20px; }
}
/* Ansatte: editable Kadence rows, matching the supplied staff reference. */
.wp-site-blocks > main:has(.employees-page) { background: var(--wp--preset--color--light); }
.employees-page { padding-block: 34px 72px; }
.employees-page > .employees-title { margin-block: 0 40px; line-height: 1.15; }
.employees-page > .wp-block-kadence-rowlayout { margin-block-start: 0; }
.employees-page > .wp-block-kadence-rowlayout + .wp-block-kadence-rowlayout { margin-block-start: 56px; }
.is-style-abus-employee { min-width: 0; }
.is-style-abus-employee > .kt-inside-inner-col > * { margin-block: 0; }
.is-style-abus-employee .wp-block-heading { line-height: 1.3; font-weight: 700; }
.is-style-abus-employee > .kt-inside-inner-col > .wp-block-heading + p { margin-block-start: 12px; }
.is-style-abus-employee > .kt-inside-inner-col > .wp-block-kadence-iconlist { margin-block-start: 16px; font-size: var(--wp--preset--font-size--employee-contact); line-height: 1.45; }
.is-style-abus-employee > .kt-inside-inner-col > .has-employee-detail-font-size { margin-block-start: 20px; line-height: 1.8; }
.is-style-abus-employee .kt-svg-icon-list-item-wrap,
.is-style-abus-employee .kt-svg-icon-link { align-items: flex-start; min-width: 0; max-width: 100%; }
.is-style-abus-employee .kt-svg-icon-list-text { min-width: 0; overflow-wrap: anywhere; }
.is-style-abus-employee .kt-svg-icon-list-single { color: var(--wp--preset--color--ink); flex-shrink: 0; margin-block-start: 2px; }
.is-style-abus-employee a[href^="tel:"] { color: var(--wp--preset--color--ink); white-space: nowrap; }
.is-style-abus-employee a[href^="mailto:"] { color: var(--wp--preset--color--primary); }
@media (max-width: 767px) {
 .employees-page { padding-block: 30px 54px; }
 .employees-page > .employees-title { margin-block-end: 32px; }
 .employees-page > .wp-block-kadence-rowlayout + .wp-block-kadence-rowlayout { margin-block-start: 36px; }
}
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

