/* ===========================================================
   NP Teknikcenter — Child theme styles
   Loaded via functions.php for both frontend and block editor.
   =========================================================== */

/* ---------- Typography ---------- */

h1, h2, h3, h4, h5, h6, .wp-block-heading {
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Query loop (Nyheter cards) ---------- */

.wp-block-query .wp-block-post-title,
.wp-block-query .wp-block-post-title a {
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  color: var(--wp--preset--color--contrast);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.25;
}
.wp-block-query .wp-block-post-title a:hover {
  color: var(--wp--preset--color--primary);
}
.wp-block-query .wp-block-read-more {
  color: var(--wp--preset--color--contrast);
  font-weight: 300;
  text-decoration: none;
}
.wp-block-query .wp-block-read-more:hover {
  color: var(--wp--preset--color--primary);
}
.wp-block-query .wp-block-post-date {
  color: var(--wp--preset--color--neutral);
  font-weight: 300;
}

/* ---------- Mobile: header + navigation ---------- */

@media (max-width: 1083px) {
  /* Force WP navigation into mobile/hamburger mode earlier than the default 600px breakpoint.
     The desktop "inline menu" is actually .wp-block-navigation__responsive-container when not .is-menu-open. */
  nav.wp-block-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }
  nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
    display: block !important;
  }
  nav.wp-block-navigation .wp-block-navigation__responsive-container-open {
    display: flex !important;
  }

  /* Hide "Godkänn order" CTA in header on mobile (kontakt-sidan har egen knapp) */
  header.wp-block-group .wp-block-buttons {
    display: none !important;
  }

  /* Hamburger button — make it more visible */
  .wp-block-navigation__responsive-container-open {
    padding: 0.25rem !important;
  }
  .wp-block-navigation__responsive-container-open svg {
    width: 28px;
    height: 28px;
  }

  /* Hamburger color: vit på transparent header, mörk på solid */
  .is-transparent-header .wp-block-navigation__responsive-container-open { color: #fff !important; }
  .is-solid-header .wp-block-navigation__responsive-container-open { color: var(--wp--preset--color--contrast) !important; }

  /* Mobile menu overlay (when open) */
  .wp-block-navigation__responsive-container.is-menu-open {
    background-color: var(--wp--preset--color--contrast) !important;
    padding: calc(0.85rem + 60px) var(--wp--preset--spacing--40) 3rem !important;
  }
  body.admin-bar .wp-block-navigation__responsive-container.is-menu-open {
    padding-top: calc(0.85rem + 60px + 32px) !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    flex-direction: column !important;
    gap: 0 !important;
    width: 100%;
  }

  /* Logo in opened mobile menu (top-left, fixed to viewport) */
  .wp-block-navigation__responsive-container.is-menu-open::before {
    content: '';
    position: fixed;
    top: 1.25rem;
    left: var(--wp--preset--spacing--40);
    width: 180px;
    height: 36px;
    background-image: url('/wp-content/uploads/2026/05/logo-wide.jpg');
    background-size: contain;
    background-position: left center;
    background-repeat: no-repeat;
    z-index: 100001;
  }
  body.admin-bar .wp-block-navigation__responsive-container.is-menu-open::before {
    top: calc(1.25rem + 32px);
  }

  /* Close (X) button — fixed to viewport, matches hamburger exact spot */
  .wp-block-navigation__responsive-container-close {
    position: fixed !important;
    top: 1.2rem !important;
    right: var(--wp--preset--spacing--40) !important;
    color: #fff !important;
    padding: 0.25rem !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    z-index: 100002;
  }
  body.admin-bar .wp-block-navigation__responsive-container-close {
    top: calc(1.2rem + 32px) !important;
  }
  .wp-block-navigation__responsive-container-close svg {
    width: 28px;
    height: 28px;
  }

  /* Remove blue focus ring on menu items (keep keyboard-only via focus-visible discretely) */
  .wp-block-navigation__responsive-container.is-menu-open a:focus,
  .wp-block-navigation__responsive-container.is-menu-open button:focus,
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus,
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:focus {
    outline: none !important;
    box-shadow: none !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open a:focus-visible,
  .wp-block-navigation__responsive-container.is-menu-open button:focus-visible {
    outline: 1px solid rgba(255,255,255,0.4) !important;
    outline-offset: 2px;
  }

  /* Top-level menu items */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
    width: 100%;
    display: block !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child {
    border-bottom: 0;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__label {
    color: #fff !important;
    font-family: var(--wp--preset--font-family--apex-new) !important;
    font-size: 1.2rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    padding: 1rem 0 !important;
    width: 100%;
    text-decoration: none !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus {
    color: var(--wp--preset--color--primary) !important;
  }

  /* Submenu — flat list, no dropdown box, indented */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
    position: static !important;
    padding: 0 0 0.75rem 0 !important;
    margin: -0.5rem 0 0 0 !important;
    min-width: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
    border-bottom: 0 !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 0.95rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    padding: 0.4rem 0 0.4rem 1.5rem !important;
    font-weight: 300 !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
    color: #fff !important;
  }

  /* Submenu chevron — hide on mobile (children always visible) */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle {
    display: none !important;
  }

  /* "Godkänn order" CTA injected at bottom of mobile menu */
  nav.wp-block-navigation a.tc-mobile-order,
  .wp-block-navigation a.tc-mobile-order {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 2.5rem 0 0 0;
    padding: 0.9rem 1.5rem;
    min-height: 2.75rem;
    line-height: 1 !important;
    text-align: center;
    border: 2px solid #fff;
    color: #fff !important;
    background-color: transparent !important;
    text-decoration: none !important;
    font-family: var(--wp--preset--font-family--apex-new) !important;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, color 0.2s ease;
  }
  nav.wp-block-navigation a.tc-mobile-order:hover,
  nav.wp-block-navigation a.tc-mobile-order:focus,
  .wp-block-navigation a.tc-mobile-order:hover,
  .wp-block-navigation a.tc-mobile-order:focus {
    background-color: #fff !important;
    color: var(--wp--preset--color--contrast) !important;
  }
}

/* Outside mobile breakpoint: hide the injected mobile CTA */
@media (min-width: 1084px) {
  .tc-mobile-order { display: none !important; }
}

/* ---------- Page-specific overrides ---------- */

/* Startsida: hero fyller hela fönstret */
body.home main .wp-block-cover:first-of-type {
  min-height: 100vh !important;
  min-height: 100dvh !important;
}

/* ---------- Header: transparent vs solid variants ---------- */

.is-transparent-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent !important;
}
body.admin-bar .is-transparent-header { top: 32px; }
@media (max-width: 1083px) {
  body.admin-bar .is-transparent-header { top: 46px; }
}

.is-transparent-header + main,
main.has-overlapping-header {
  margin-top: 0 !important;
}
.has-overlapping-header > .wp-block-cover:first-child,
.has-overlapping-header > .wp-block-post-content > .wp-block-cover:first-child {
  padding-top: calc(var(--wp--preset--spacing--70) + 4.5rem);
}

.is-transparent-header .wp-block-navigation a,
.is-transparent-header .wp-block-navigation-item__label {
  color: #fff !important;
}
.is-solid-header .wp-block-navigation a,
.is-solid-header .wp-block-navigation-item__label {
  color: var(--wp--preset--color--contrast) !important;
}

/* ---------- Header: dropdown styling ---------- */

.wp-block-navigation .wp-block-navigation__submenu-container {
  padding: 0.5rem 0 !important;
  min-width: 240px !important;
  border: 0 !important;
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  padding: 0.75rem 1.25rem !important;
  display: block;
  width: 100%;
  text-decoration: none !important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* Dropdown: dark variant (when used under transparent header) */
.is-transparent-header .wp-block-navigation__submenu-container {
  background: var(--wp--preset--color--contrast) !important;
}
.is-transparent-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content,
.is-transparent-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content a,
.is-transparent-header .wp-block-navigation__submenu-container a {
  color: #fff !important;
}
.is-transparent-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.is-transparent-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus,
.is-transparent-header .wp-block-navigation__submenu-container a:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--wp--preset--color--primary) !important;
}

/* Dropdown: light variant (under solid white header) */
.is-solid-header .wp-block-navigation__submenu-container {
  background: #ffffff !important;
  border: 1px solid var(--wp--preset--color--neutral-light) !important;
}
.is-solid-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content,
.is-solid-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content a,
.is-solid-header .wp-block-navigation__submenu-container a {
  color: var(--wp--preset--color--contrast) !important;
}
.is-solid-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.is-solid-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus,
.is-solid-header .wp-block-navigation__submenu-container a:hover {
  background-color: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--primary) !important;
}

/* ---------- Header: chevron arrow alignment ---------- */

.wp-block-navigation__submenu-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle;
  margin: 0 0 0 0.35em !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  width: 1em !important;
  height: 1em !important;
  line-height: 1 !important;
  cursor: pointer;
}
.wp-block-navigation__submenu-icon svg {
  display: block !important;
  width: 0.7em !important;
  height: 0.7em !important;
  margin: 0 !important;
  transform: translateY(-0.12em);
}
.wp-block-navigation-item.has-child {
  display: inline-flex;
  align-items: center;
}
.wp-block-navigation-item__content,
.wp-block-navigation-submenu__toggle.wp-block-navigation-item__content {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
}
.wp-block-navigation-item.has-child > a.wp-block-navigation-item__content,
.wp-block-navigation-item.has-child > button {
  align-self: center !important;
}

/* ---------- Footer ---------- */

footer.wp-block-group,
footer.wp-block-group p,
footer.wp-block-group a:not(.wp-element-button) {
  color: var(--wp--preset--color--contrast);
  font-weight: 300;
  text-decoration: none;
}
footer.wp-block-group a:not(.wp-element-button):hover {
  color: var(--wp--preset--color--primary);
}
.footer-heading {
  font-family: var(--wp--preset--font-family--poppins) !important;
  font-weight: 600 !important;
  font-size: 1.375rem !important;
  color: #1c244b !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* ---------- Stats counter (om-oss) ---------- */

.tc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  padding: var(--wp--preset--spacing--70) 0;
}
@media (max-width: 780px) {
  .tc-stats { grid-template-columns: 1fr; gap: 2.5rem; }
}
.tc-stats__item { padding: 0 1rem; }
.tc-stats__number {
  font-family: var(--wp--preset--font-family--poppins);
  font-weight: 600;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  color: var(--wp--preset--color--contrast);
  line-height: 1;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.05em;
}
.tc-stats__prefix,
.tc-stats__suffix {
  font-size: 0.7em;
  color: var(--wp--preset--color--contrast);
}
.tc-stats__label {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--neutral);
  font-weight: 400;
}
@media (min-width: 781px) {
  .tc-stats__item:not(:last-child) {
    border-right: 1px solid var(--wp--preset--color--neutral-light);
  }
}

/* ---------- Accordion (wp-block-details) ---------- */

.wp-block-details {
  border-bottom: 1px solid var(--wp--preset--color--neutral-light);
  padding: 1.25rem 0;
}
.wp-block-details:first-of-type {
  border-top: 1px solid var(--wp--preset--color--neutral-light);
}
.wp-block-details > summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  font-size: 1.0625rem;
  color: var(--wp--preset--color--contrast);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 0.5rem;
}
.wp-block-details > summary::-webkit-details-marker,
.wp-block-details > summary::marker {
  display: none;
  content: '';
}
.wp-block-details > summary::after {
  content: '';
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-right: 2px solid var(--wp--preset--color--contrast);
  border-bottom: 2px solid var(--wp--preset--color--contrast);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-left: 1rem;
  flex-shrink: 0;
}
.wp-block-details[open] > summary::after {
  transform: rotate(-135deg);
}
.wp-block-details > summary:hover {
  color: var(--wp--preset--color--contrast);
}
.wp-block-details > summary:hover::after {
  border-color: var(--wp--preset--color--contrast);
}
.wp-block-details > summary:focus {
  outline: none;
}
.wp-block-details > summary:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary);
  outline-offset: 4px;
  border-radius: 2px;
}
.wp-block-details > *:not(summary) {
  padding-top: 0.75rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--wp--preset--color--contrast);
}

/* ---------- Lists ---------- */

.wp-block-list { padding-left: 1.25rem; }
.wp-block-list li { margin-bottom: 0.5rem; }
.wp-block-list li:last-child { margin-bottom: 0; }

/* ---------- Square images in columns (team grid etc) ---------- */

.wp-block-columns .wp-block-image figure,
.wp-block-columns figure.wp-block-image {
  width: 100%;
  margin: 0;
}
.wp-block-columns .wp-block-image figure img,
.wp-block-columns figure.wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
}
.wp-block-columns .wp-block-image figure img[style*="aspect-ratio:1"],
.wp-block-columns figure.wp-block-image img[style*="aspect-ratio:1"] {
  aspect-ratio: 1 !important;
  object-fit: cover !important;
  height: auto;
}

/* ---------- Bordered card columns (vart-erbjudande, takstolar, om-oss) ---------- */

.wp-block-column.has-border-color {
  position: relative;
  transition: background-color 0.2s ease;
}
.wp-block-column.has-border-color:hover {
  background-color: var(--wp--preset--color--neutral-light);
  cursor: pointer;
}
.wp-block-column.has-border-color a[href]:not(.wp-element-button)::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.wp-block-column.has-border-color a,
.wp-block-column.has-border-color a:hover,
.wp-block-column.has-border-color a:focus,
.wp-block-column.has-border-color a:active {
  color: var(--wp--preset--color--contrast) !important;
  text-decoration: none !important;
}

/* ---------- Policy cards (dark, clickable, links to PDF) ---------- */

.wp-block-column.is-policy-card {
  position: relative;
  transition: background-color 0.2s ease;
}
.wp-block-column.is-policy-card:hover {
  background-color: #000 !important;
  cursor: pointer;
}
.wp-block-column.is-policy-card a,
.wp-block-column.is-policy-card a:hover,
.wp-block-column.is-policy-card a:focus,
.wp-block-column.is-policy-card a:active {
  color: #fff !important;
  text-decoration: none !important;
}
.wp-block-column.is-policy-card a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ===========================================================
   Entrance animations
   =========================================================== */

@media (prefers-reduced-motion: no-preference) {
  html.tc-anim-ready :is(
    .wp-block-cover__inner-container,
    main .wp-block-media-text,
    main .wp-block-columns > .wp-block-column,
    main > .wp-block-group .wp-block-heading,
    main > .wp-block-group > figure.wp-block-image,
    main > .wp-block-group figure.wp-block-gallery,
    .wp-block-post-template > *,
    /* Halmstad sections */
    .hm-attefallshus > *,
    .hm-section-heading,
    .hm-slide,
    .hm-langeleve > *,
    .hm-langeleve-left .hm-expert,
    .hm-langeleve-left .hm-logo-grid > *,
    .hm-langeleve-right,
    .hm-skapande__overlay,
    .hm-proffs__title,
    .hm-proffs__worker,
    .hm-proffs__copy,
    .hm-proffs__logos .hm-logo-grid > *,
    .hm-dark-section h2,
    .hm-dark-section .hm-langeleve__intro p,
    .hm-videoposter,
    .hm-hitta-row > *,
    .hm-team-grid > *,
    .hm-omoss > *,
    .hm-formanskund,
    .hm-legal__hero-inner,
    .hm-legal__body > *
  ) {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s ease-out, transform 0.65s ease-out;
    will-change: opacity, transform;
  }

  html.tc-anim-ready .tc-in-view {
    opacity: 1 !important;
    transform: none !important;
  }

  /* ---------- Stagger delays ---------- */

  /* Standard 2-col groups */
  html.tc-anim-ready .wp-block-columns > .wp-block-column:nth-child(2) { transition-delay: 80ms; }
  html.tc-anim-ready .wp-block-columns > .wp-block-column:nth-child(3) { transition-delay: 160ms; }
  html.tc-anim-ready .wp-block-columns > .wp-block-column:nth-child(4) { transition-delay: 240ms; }
  html.tc-anim-ready .wp-block-post-template > *:nth-child(2) { transition-delay: 100ms; }
  html.tc-anim-ready .wp-block-post-template > *:nth-child(3) { transition-delay: 200ms; }

  /* Attefallshus 2-col */
  html.tc-anim-ready .hm-attefallshus > *:nth-child(2) { transition-delay: 120ms; }

  /* Länge leve top-row */
  html.tc-anim-ready .hm-langeleve > *:nth-child(2) { transition-delay: 120ms; }

  /* Tile slider — fade slides L→R */
  html.tc-anim-ready .hm-slide:nth-child(1) { transition-delay: 0ms; }
  html.tc-anim-ready .hm-slide:nth-child(2) { transition-delay: 80ms; }
  html.tc-anim-ready .hm-slide:nth-child(3) { transition-delay: 160ms; }
  html.tc-anim-ready .hm-slide:nth-child(4) { transition-delay: 240ms; }
  html.tc-anim-ready .hm-slide:nth-child(5) { transition-delay: 320ms; }

  /* Experts */
  html.tc-anim-ready .hm-langeleve-left .hm-expert:nth-child(2) { transition-delay: 100ms; }

  /* Design + bygg logo grids — stagger per item */
  html.tc-anim-ready .hm-langeleve-left .hm-logo-grid > *:nth-child(n+2)  { transition-delay: 40ms; }
  html.tc-anim-ready .hm-langeleve-left .hm-logo-grid > *:nth-child(n+5)  { transition-delay: 80ms; }
  html.tc-anim-ready .hm-langeleve-left .hm-logo-grid > *:nth-child(n+9)  { transition-delay: 120ms; }
  html.tc-anim-ready .hm-proffs__logos .hm-logo-grid > *:nth-child(n+2)   { transition-delay: 40ms; }
  html.tc-anim-ready .hm-proffs__logos .hm-logo-grid > *:nth-child(n+5)   { transition-delay: 80ms; }
  html.tc-anim-ready .hm-proffs__logos .hm-logo-grid > *:nth-child(n+10)  { transition-delay: 120ms; }
  html.tc-anim-ready .hm-proffs__logos .hm-logo-grid > *:nth-child(n+14)  { transition-delay: 160ms; }

  /* Proffs: title → copy → worker overlap stagger */
  html.tc-anim-ready .hm-proffs__title  { transition-delay: 0ms; }
  html.tc-anim-ready .hm-proffs__copy   { transition-delay: 120ms; }
  html.tc-anim-ready .hm-proffs__worker { transition-delay: 60ms; }

  /* Hitta-till-oss 4-col stagger */
  html.tc-anim-ready .hm-hitta-row > *:nth-child(2) { transition-delay: 70ms; }
  html.tc-anim-ready .hm-hitta-row > *:nth-child(3) { transition-delay: 140ms; }
  html.tc-anim-ready .hm-hitta-row > *:nth-child(4) { transition-delay: 210ms; }

  /* Team grid — 3-col, fade in per row */
  html.tc-anim-ready .hm-team-grid > *:nth-child(3n+2) { transition-delay: 70ms; }
  html.tc-anim-ready .hm-team-grid > *:nth-child(3n)   { transition-delay: 140ms; }
  html.tc-anim-ready .hm-team-grid > *:nth-child(n+4)  { transition-delay: 200ms; }
  html.tc-anim-ready .hm-team-grid > *:nth-child(n+7)  { transition-delay: 360ms; }

  /* Om oss 2-col */
  html.tc-anim-ready .hm-omoss > *:nth-child(2) { transition-delay: 120ms; }

  /* Legal body — fade content one block at a time */
  html.tc-anim-ready .hm-legal__body > *:nth-child(2) { transition-delay: 60ms; }
  html.tc-anim-ready .hm-legal__body > *:nth-child(3) { transition-delay: 120ms; }
  html.tc-anim-ready .hm-legal__body > *:nth-child(n+4) { transition-delay: 180ms; }
}

/* ===========================================================
   Halmstad-specific
   =========================================================== */

/* Header: 3-col layout (left nav | logo | right nav) */
.hm-header { border-bottom: none; }
.hm-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}
.hm-nav-left, .hm-nav-right {
  flex: 1 0 0;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.hm-nav-left { justify-content: flex-start; }
.hm-nav-right { justify-content: flex-end; }

.hm-header .wp-block-site-logo { flex: 0 0 auto; }
.hm-header .wp-block-site-logo img {
  width: 76px; height: auto; display: block;
}

.hm-header .hm-nav-left p,
.hm-header .hm-nav-right p { margin: 0; }
.hm-header .hm-nav-left a,
.hm-header .hm-nav-right a {
  text-decoration: none;
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.18s ease;
}
/* Transparent header (over hero): white nav */
.hm-header.is-transparent-header .hm-nav-left a,
.hm-header.is-transparent-header .hm-nav-right a { color: #fff !important; }
.hm-header.is-transparent-header .hm-nav-left a:hover,
.hm-header.is-transparent-header .hm-nav-right a:hover { opacity: 0.65; color: #fff !important; }
/* Solid header (no hero): dark nav */
.hm-header.is-solid-header .hm-nav-left a,
.hm-header.is-solid-header .hm-nav-right a { color: var(--wp--preset--color--contrast) !important; }
.hm-header.is-solid-header .hm-nav-left a:hover,
.hm-header.is-solid-header .hm-nav-right a:hover { color: var(--wp--preset--color--primary) !important; opacity: 1; }

/* ---------- Mobile menu (hamburger + overlay) ---------- */

.hm-menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: opacity 0.18s ease;
  margin-left: auto;
}
.hm-menu-toggle:hover { opacity: 0.7; }
.hm-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.hm-header.is-transparent-header .hm-menu-toggle { color: #fff; }
.hm-header.is-solid-header  .hm-menu-toggle { color: var(--wp--preset--color--contrast); }

/* Full-screen overlay */
.hm-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  background: #fff;
  color: var(--wp--preset--color--contrast);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0.28s;
  padding: 0;
}

.hm-mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0s;
}
body.has-mobile-menu-open { overflow: hidden; }

.hm-mobile-menu__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1rem, 5vw, 1.75rem);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.hm-mobile-menu__logo { display: flex; align-items: center; }
.hm-mobile-menu__logo img {
  width: 60px;
  height: auto;
  display: block;
}
.hm-mobile-menu__close {
  background: transparent;
  border: 0;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--wp--preset--color--contrast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s ease;
}
.hm-mobile-menu__close:hover { opacity: 0.7; }

.hm-mobile-menu__search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem clamp(1.5rem, 6vw, 2.5rem) 0;
  padding: 0.85rem 1rem;
  background: #f4f4f4;
  border: 1px solid rgba(0,0,0,0.12);
}
.hm-mobile-menu__search-icon { display: inline-flex; color: #555; flex: none; }
.hm-mobile-menu__search input {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--wp--preset--font-family--apex-new);
  font-size: 1.05rem;
  color: var(--wp--preset--color--contrast);
}
.hm-mobile-menu__search input::placeholder { color: #777; }

.hm-mobile-menu__nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.25rem clamp(1.5rem, 6vw, 2.5rem) 2rem;
  gap: 0;
}
.hm-mobile-menu__nav a {
  display: block;
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 500;
  font-size: clamp(1.2rem, 4.5vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none;
  color: var(--wp--preset--color--contrast);
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: color 0.18s ease, padding-left 0.2s ease;
}
.hm-mobile-menu__nav a:last-child { border-bottom: 0; }
.hm-mobile-menu__nav a:hover,
.hm-mobile-menu__nav a:focus-visible {
  color: var(--wp--preset--color--primary);
  outline: none;
  padding-left: 0.4rem;
}

.hm-mobile-menu__footer {
  padding: 1.5rem clamp(1.5rem, 6vw, 2.5rem) 2.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hm-mobile-menu__footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.35);
  padding-bottom: 0.4rem;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.hm-mobile-menu__footer a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

/* Animate each nav item in when overlay opens */
.hm-mobile-menu__nav a {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease 0s, transform 0.35s ease 0s, color 0.18s ease, padding-left 0.2s ease;
}
.hm-mobile-menu.is-open .hm-mobile-menu__nav a { opacity: 1; transform: none; }
.hm-mobile-menu.is-open .hm-mobile-menu__nav a:nth-child(1) { transition-delay: 0.05s; }
.hm-mobile-menu.is-open .hm-mobile-menu__nav a:nth-child(2) { transition-delay: 0.10s; }
.hm-mobile-menu.is-open .hm-mobile-menu__nav a:nth-child(3) { transition-delay: 0.15s; }
.hm-mobile-menu.is-open .hm-mobile-menu__nav a:nth-child(4) { transition-delay: 0.20s; }
.hm-mobile-menu.is-open .hm-mobile-menu__nav a:nth-child(5) { transition-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  .hm-mobile-menu,
  .hm-mobile-menu__nav a { transition: opacity 0.15s linear, visibility 0s linear; transform: none; }
}

@media (max-width: 860px) {
  .hm-header-row { gap: 0.75rem; }
  .hm-header .hm-nav-left,
  .hm-header .hm-nav-right { display: none !important; }
  .hm-header .wp-block-site-logo { flex: 0 0 auto; }
  .hm-header .hm-menu-toggle { display: inline-flex !important; }
  /* Sök-ikonen + hamburgaren grupperas till höger (annars sprider space-between ut sök i mitten) */
  .hm-header--attefall .at-search-toggle { margin-left: auto; }
}
/* Subtle drop-shadow so the hamburger remains visible against any hero pixel */
.hm-header.is-transparent-header .hm-menu-toggle span {
  box-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

/* Hide overlay completely on desktop so it never blocks layout/clicks */
@media (min-width: 861px) {
  .hm-mobile-menu { display: none; }
}

/* Footer dark band */
.hm-footer { color: #fff; }
.hm-footer a {
  color: #fff !important;
  text-decoration: none;
  transition: opacity 0.18s ease;
}
.hm-footer a:hover { opacity: 0.7; color: #fff !important; }
.hm-footer-row { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.hm-footer-links { gap: 1.5rem; }
@media (max-width: 600px) {
  .hm-footer-row { justify-content: center; text-align: center; }
  .hm-footer-links { justify-content: center !important; }
  .hm-copy { width: 100%; text-align: center; }
}

/* Body links default: inherit color, no underline */
main a { text-decoration: none; }

/* ---------- Hero down-arrow indicator ---------- */
.hm-hero-arrow {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  z-index: 2;
  opacity: 0.85;
  animation: hm-bounce 2.2s ease-in-out infinite;
}
.hm-hero-arrow svg { width: 100%; height: 100%; display: block; }
@keyframes hm-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Dark section base ---------- */
.hm-dark-bg { background-color: var(--wp--preset--color--contrast); color: #fff; }
.hm-dark-bg h2,
.hm-dark-bg h3,
.hm-dark-bg h4,
.hm-dark-bg h5,
.hm-dark-bg p,
.hm-dark-bg a { color: #fff; }

/* ---- Tile slideshow (bxSlider-style horizontal scroller) ---- */
.hm-slideshow-wrap { overflow: hidden; }
.hm-slideshow {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 1.5rem 0 4rem;
}
.hm-slideshow::-webkit-scrollbar { display: none; }
.hm-slides {
  display: flex;
  align-items: stretch;
  gap: 30px;
  padding: 0 clamp(1rem, 4vw, 3rem);
}
.hm-slide {
  position: relative;
  flex: 0 0 auto;
  width: 480px;
  height: 600px;
  scroll-snap-align: start;
  overflow: hidden;
  background: #1a1a1a;
  cursor: default;
}

.hm-slide img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: bottom;
  display: block;
  transition: filter 0.35s ease, transform 0.35s ease;
}
.hm-slide__cover {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.45) 100%);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition: background 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}
.hm-slide__text {
  position: absolute;
  bottom: 40px; left: 40px; right: 40px;
  color: #fff;
}
.hm-slide__text h4 {
  display: inline-block;
  color: #fff;
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-top: 2px solid #fff;
  padding-top: 18px;
  margin: 0 0 0.5rem;
  line-height: 1;
}
.hm-slide__text p {
  display: none;
  color: #fff;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 380px;
}
.hm-slide:hover .hm-slide__cover {
  background: rgba(0,0,0,0.25);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.hm-slide:hover .hm-slide__text p { display: block; }

@media (max-width: 1024px) {
  .hm-slides { gap: 20px; padding: 0 1rem; }
  .hm-slide { width: 270px; height: 300px; }
  .hm-slide__text { bottom: 20px; left: 20px; right: 20px; }
  .hm-slide__text h4 { font-size: 0.9rem; padding-top: 10px; }
  .hm-slide__text p { display: block; font-size: 0.8rem; }
}

/* Backwards-compat: old grid class kept as no-op (in case any pages still reference it) */
.hm-tile-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }

/* Centered H3 over the tile grid */
.hm-dark-bg .hm-section-heading {
  text-align: center;
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.05;
  max-width: 900px;
  margin: 0 auto 2.5rem auto;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* ---------- Brand logo grid (light + dark variants) ---------- */
.hm-logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem 2.5rem;
  align-items: center;
  justify-items: center;
}
@media (max-width: 980px) { .hm-logo-grid { grid-template-columns: repeat(4, 1fr); gap: 1.75rem; } }
@media (max-width: 560px) { .hm-logo-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
.hm-logo-grid img {
  max-width: 110px; max-height: 38px;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.hm-logo-grid img:hover { opacity: 1; }
.hm-dark-bg .hm-logo-grid img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

/* ---------- Expert person cards ---------- */
.hm-expert-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; max-width: 460px; margin: 0; }
@media (max-width: 720px) { .hm-expert-row { grid-template-columns: 1fr; max-width: 320px; } }
.hm-expert img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.hm-expert h5 { font-family: var(--wp--preset--font-family--apex-new); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.95rem; margin: 0.75rem 0 0.25rem; line-height: 1.3; color: var(--wp--preset--color--contrast); }
.hm-expert p { font-size: 0.85rem; margin: 0 0 0.15rem; color: var(--wp--preset--color--neutral); }
.hm-expert a { font-size: 0.85rem; color: var(--wp--preset--color--neutral); text-decoration: none; }
.hm-expert a:hover { color: var(--wp--preset--color--primary); }

/* ---------- "En miljö för skapande" overlay labels ---------- */
.hm-skapande {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #111;
}
.hm-skapande img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-skapande__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; color: #fff;
  padding: 2rem;
}
.hm-skapande__overlay h3 {
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 3rem);
  margin: 0 0 1.5rem;
  text-transform: uppercase;
  color: #fff;
}
.hm-skapande__labels { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: center; }
.hm-skapande__labels span {
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
}

/* ---------- Dark "zone" wrapping proffs → snabbt → hitta ---------- */
.hm-dark-zone {
  background-color: var(--wp--preset--color--contrast);
  color: #fff;
}
.hm-dark-section { background: transparent; color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0; }
.hm-dark-section__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}
.hm-dark-section h2, .hm-dark-section h3, .hm-dark-section h4, .hm-dark-section h5, .hm-dark-section p, .hm-dark-section a { color: #fff; }
.hm-dark-section h2 {
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin: 0;
  letter-spacing: 0;
}

/* ---------- "För proffs och entusiaster" (mirror-style with overlapping photo) ---------- */
.hm-proffs {
  position: relative;
  color: #fff;
}
.hm-proffs__cover {
  position: relative;
  width: 100%;
  height: clamp(360px, 38vw, 540px);
  overflow: hidden;
}
.hm-proffs__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hm-proffs__cover-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 5vw, 4rem) 0;
}
.hm-proffs__title {
  margin: 0;
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
  max-width: 60%;
}

/* Body holds copy + the overlapping worker photo */
.hm-proffs__body {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Secondary worker photo sticks up into the cover from the body area */
.hm-proffs__worker {
  position: absolute;
  right: clamp(1.5rem, 5vw, 4rem);
  top: calc(-1 * clamp(80px, 12vw, 170px));
  width: clamp(220px, 28vw, 380px);
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  display: block;
  z-index: 2;
  grid-column: 2;
  justify-self: end;
}

.hm-proffs__copy { max-width: 460px; }
.hm-proffs__copy p {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #fff;
}
.hm-proffs__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--wp--preset--color--primary);
  color: #fff !important;
  padding: 0.85rem 1.4rem;
  font-family: var(--wp--preset--font-family--apex-new);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  text-decoration: none;
  transition: background 0.18s ease;
}
.hm-proffs__cta:hover { background: var(--wp--preset--color--primary-hover); color: #fff !important; }
.hm-proffs__cta svg { flex: 0 0 14px; }

.hm-proffs__logos {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 5vw, 4rem) clamp(3rem, 6vw, 4.5rem);
}
.hm-proffs__logos .hm-logo-grid {
  grid-template-columns: repeat(9, 1fr);
  gap: 2.25rem 1.5rem;
  justify-items: center;
}
.hm-proffs__logos .hm-logo-grid img {
  max-width: 90px;
  max-height: 32px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

@media (max-width: 980px) {
  .hm-proffs__logos .hm-logo-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 860px) {
  .hm-proffs__body { grid-template-columns: 1fr; }
  .hm-proffs__worker {
    position: static;
    margin: -clamp(60px, 10vw, 120px) auto 0;
    width: min(80%, 360px);
    grid-column: 1;
    justify-self: center;
  }
  .hm-proffs__title { max-width: 80%; }
}
@media (max-width: 560px) {
  .hm-proffs__logos .hm-logo-grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem 1rem; }
}

/* Old `.hm-proffs-cover` selector kept as fallback (unused after the rewrite) */
.hm-proffs-cover { position: relative; }

/* ---------- "Snabbt och enkelt" — video poster ---------- */
.hm-videoposter {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  overflow: hidden;
}
.hm-videoposter img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-videoposter__play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 78px; height: 78px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.18s ease, background 0.18s ease;
}
.hm-videoposter:hover .hm-videoposter__play { transform: translate(-50%, -50%) scale(1.06); background: #fff; }
.hm-videoposter__play::before {
  content: '';
  display: block;
  width: 0; height: 0;
  border-left: 22px solid var(--wp--preset--color--contrast);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 6px;
}

/* ---------- Contact info row + map ---------- */
.hm-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 900px; margin: 0 0 2.5rem; }
@media (max-width: 720px) { .hm-contact-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.hm-contact-grid h5 {
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--wp--preset--color--neutral);
  margin: 0 0 0.5rem;
}
.hm-contact-grid p { font-size: 1rem; line-height: 1.5; margin: 0; color: var(--wp--preset--color--contrast); }

/* Hitta-till-oss inline row: H3 title + 3 info columns */
.hm-hitta-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 720px) { .hm-hitta-row { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
@media (max-width: 480px) { .hm-hitta-row { grid-template-columns: 1fr; gap: 1.5rem; } }
.hm-hitta-row h3 {
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0;
  line-height: 1;
}
.hm-hitta-row h5 {
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--wp--preset--color--neutral);
  margin: 0 0 0.5rem;
}
.hm-hitta-row p { font-size: 0.95rem; line-height: 1.5; margin: 0; }

/* Dark-zone overrides inside Snabbt / Hitta sections */
.hm-dark-section .hm-hitta-row h5 { color: rgba(255,255,255,0.6); }
.hm-dark-section .hm-langeleve__intro p { color: #fff; }
.hm-dark-section .hm-videoposter { background: #000; }
.hm-dark-section .hm-videoposter__play { background: rgba(255,255,255,0.92); }
.hm-dark-section .hm-videoposter__play::before { border-left-color: var(--wp--preset--color--contrast); }

/* ---------- Team grid (dark, 3-col) ---------- */
.hm-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
}
@media (max-width: 860px) { .hm-team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .hm-team-grid { grid-template-columns: 1fr; } }
.hm-team-member img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.hm-team-member h5 {
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  margin: 0.75rem 0 0.25rem;
  line-height: 1.3;
  color: inherit;
}
.hm-team-member p { font-size: 0.85rem; margin: 0 0 0.15rem; opacity: 0.78; }
.hm-team-member a { font-size: 0.85rem; opacity: 0.78; text-decoration: none; color: inherit; }
.hm-team-member a:hover { opacity: 1; color: var(--wp--preset--color--primary); }

/* ---------- Om oss section (light grey, wider, larger text) ---------- */
.hm-omoss { display: grid; grid-template-columns: 1.25fr 1fr; gap: 4rem; align-items: start; }
@media (max-width: 860px) { .hm-omoss { grid-template-columns: 1fr; gap: 2rem; } }
.hm-omoss h3 {
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin: 0 0 1.5rem;
}
.hm-omoss p { font-size: clamp(1rem, 1.15vw, 1.125rem); line-height: 1.7; margin: 0 0 1.25rem; }
.hm-omoss img { width: 100%; height: auto; display: block; }
.hm-omoss-section { background-color: var(--wp--preset--color--surface); }

/* ---------- Förmånskund CTA ---------- */
.hm-formanskund {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  overflow: hidden;
  background: #111;
  color: #fff;
}
@media (max-width: 720px) { .hm-formanskund { grid-template-columns: 1fr; } }
.hm-formanskund__img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; display: block; }
.hm-formanskund__copy {
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem);
  display: flex; flex-direction: column; justify-content: center;
}
.hm-formanskund__copy h4 {
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0;
  margin: 0 0 1rem;
  color: #fff;
}
.hm-formanskund__copy p { font-size: 0.95rem; line-height: 1.55; margin: 0 0 1.25rem; }
.hm-formanskund__copy a {
  font-family: var(--wp--preset--font-family--apex-new);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  border-bottom: 1px solid #fff;
  padding-bottom: 0.25rem;
  align-self: flex-start;
  transition: opacity 0.18s ease;
}
.hm-formanskund__copy a:hover { opacity: 0.75; }

/* ---------- Section spacing helpers ---------- */
.hm-section { padding: clamp(3rem, 7vw, 5.5rem) var(--wp--preset--spacing--40); }
.hm-section--narrow { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(2rem, 5vw, 4rem); }
.hm-section__inner { max-width: 1200px; margin: 0 auto; }

.hm-section h2.hm-h2 {
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin: 0 0 1.25rem;
  letter-spacing: 0;
}

/* Attefallshus 2-col */
.hm-attefallshus { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .hm-attefallshus { grid-template-columns: 1fr; gap: 1.5rem; } }
.hm-attefallshus h4 {
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 1rem;
  color: var(--wp--preset--color--contrast);
}
.hm-attefallshus p { font-size: 1rem; line-height: 1.6; margin: 0 0 1rem; }
.hm-attefallshus a { color: var(--wp--preset--color--contrast); text-decoration: underline; text-underline-offset: 3px; }
.hm-attefallshus a:hover { color: var(--wp--preset--color--primary); }

/* ---------- Legal pages (Allmänna villkor / GDPR & cookies) ---------- */
.hm-legal { padding: 0 0 clamp(4rem, 7vw, 6rem); }

.hm-legal__hero {
  background-color: var(--wp--preset--color--surface);
  padding: clamp(3.5rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
}
.hm-legal__hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.hm-legal__hero h1 {
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1;
  margin: 0;
  color: var(--wp--preset--color--contrast);
}

.hm-legal__body {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(3rem, 5vw, 4rem) clamp(1.5rem, 5vw, 3rem) 0;
}
.hm-legal__body > p:first-of-type {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--wp--preset--color--contrast);
  margin: 0 0 2rem;
}
.hm-legal__body h2 {
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.1;
  margin: 2.5rem 0 1rem;
  color: var(--wp--preset--color--contrast);
}
.hm-legal__body h3 {
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  margin: 2rem 0 0.85rem;
  color: var(--wp--preset--color--contrast);
}
.hm-legal__body p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1.25rem;
  color: var(--wp--preset--color--contrast);
}
.hm-legal__body a {
  color: var(--wp--preset--color--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hm-legal__body a:hover { color: var(--wp--preset--color--primary-hover); }

/* Länge leve idéerna — top: 2-col H2 + intro */
.hm-langeleve { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .hm-langeleve { grid-template-columns: 1fr; } }
.hm-langeleve__intro p { font-size: 1rem; line-height: 1.65; max-width: 540px; margin: 0; }

/* Länge leve idéerna — bottom: 2-col left (experts+logos) | right (showroom image with overlay) */
.hm-langeleve-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: stretch;
}
@media (max-width: 860px) { .hm-langeleve-grid { grid-template-columns: 1fr; gap: 2rem; } }

.hm-langeleve-left { display: flex; flex-direction: column; gap: 2.5rem; }

.hm-langeleve-left .hm-expert-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 100%;
  margin: 0;
}

.hm-langeleve-left .hm-logo-grid--design {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem 1.5rem;
  align-items: center;
  justify-items: start;
}
@media (max-width: 560px) {
  .hm-langeleve-left .hm-logo-grid--design { grid-template-columns: repeat(3, 1fr); }
}
.hm-langeleve-left .hm-logo-grid--design img {
  max-width: 100px;
  max-height: 30px;
  width: auto; height: auto;
  object-fit: contain;
  opacity: 0.9;
}

/* Right column = showroom image, fills column height */
.hm-langeleve-right { display: flex; }
.hm-langeleve-right .hm-skapande {
  width: 100%;
  height: 100%;
  min-height: 480px;
  aspect-ratio: auto;
}
.hm-langeleve-right .hm-skapande img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hm-langeleve-right .hm-skapande__overlay h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }

/* ===========================================================
   attefallshus.npn.se — front page
   =========================================================== */

/* ---------- Buttons ---------- */
.at-btns { gap: 1rem; }
.at-btn .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
  border-radius: 0;
  padding: 1.55rem 1.75rem;
  line-height: 1;
}
.at-btn__arrow {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  fill: currentColor;
  transition: transform 0.18s ease;
}
.at-btn .wp-block-button__link:hover .at-btn__arrow { transform: translateX(3px); }
.at-btn--solid .wp-block-button__link {
  background: #004EA0;
  color: #fff;
}
.at-btn--ghost .wp-block-button__link {
  background: #f0f0f0;
  color: var(--wp--preset--color--contrast);
}

/* ---------- Hero ---------- */
.at-hero { align-items: flex-end; min-height: 100vh; position: relative; }
.at-hero__arrow {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  text-decoration: none;
  animation: at-bounce 2s ease-in-out infinite;
}
.at-hero__arrow:hover { color: #fff; opacity: 0.8; }
@keyframes at-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}
@media (prefers-reduced-motion: reduce) { .at-hero__arrow { animation: none; } }
.at-hero .wp-block-cover__inner-container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
  padding-bottom: clamp(2rem, 6vw, 5rem);
}
.at-hero__kicker {
  font-family: var(--wp--preset--font-family--apex-new);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: #fff;
  margin: 0 0 0.5rem;
}
.at-hero__title {
  font-family: var(--wp--preset--font-family--veneer);
  font-weight: 400;
  text-transform: uppercase;
  color: #fff;
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 0 0 1.75rem;
  font-size: clamp(3.5rem, 12vw, 9rem);
}
.at-hero .at-btns { margin-top: 0; }
/* Sidhjältar (om/kontakt/så går det till): mirror använder fast 120px Veneer på en rad */
.at-hero--page .at-hero__title { font-size: clamp(2.75rem, 8.3vw, 7.5rem); }

/* ---------- Intro ---------- */
/* Inner flow wrapper fills the 1200 content edge; children left-anchored, capped at 900 */
.at-intro__inner > * { max-width: 900px; margin-left: 0; margin-right: auto; }
.at-intro .hm-h2 { margin-bottom: 1.5rem; }
.at-intro p {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  color: var(--wp--preset--color--contrast);
}
.at-intro p:last-child { margin-bottom: 0; }
.at-intro .at-btns { margin-top: 1.75rem; }

/* ---------- Så går det till: steg 5 modellval (mörkt band, två bildkort) ---------- */
.at-models2 { padding-block: clamp(2.5rem, 5vw, 4rem); }
.at-models2__row { gap: clamp(1.25rem, 3vw, 2.5rem); }
.at-models2 .at-model__img img { width: 100%; height: auto; display: block; }
.at-model__cap {
  color: #fff;
  font-family: "ApexNew-Book", system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.0625rem;
  margin: 0.9rem 0 0;
}
/* Salt-pulpettak Lofthus-showcase: ligger an mot bandet ovan (ingen springa),
   100px padding och kvadratiska bilder som mirror (607×607) */
.at-lofshow { margin-block: 0 !important; padding-block: clamp(3rem, 7vw, 6.25rem); }
.at-lofshow .at-model__img img { aspect-ratio: 1 / 1; object-fit: cover; }
/* Två intilliggande mörka sektioner ska bilda en sammanhängande mörk zon (ingen vit springa) */
.at-mediatext--dark + .at-mediatext--dark { margin-top: 0 !important; }
/* Mörk sektion direkt efter ett full-bleed band ska ligga an mot bandet (ingen vit springa) */
.at-band + .at-mediatext--dark,
.at-modelband + .at-mediatext--dark { margin-top: 0 !important; }
/* Mer luft i toppen/botten av den mörka zonen, men måttlig padding där två mörka möts.
   OBS: dubbel klass (.at-dark.at-mediatext--dark) krävs för att slå .at-dark (rad ~1970). */
.at-dark.at-mediatext--dark { padding-block: clamp(4rem, 8.5vw, 7rem) !important; }
.at-dark.at-mediatext--dark + .at-dark.at-mediatext--dark { padding-top: clamp(2.5rem, 5vw, 4rem) !important; }
.at-dark.at-mediatext--dark:has(+ .at-mediatext--dark) { padding-bottom: clamp(2.5rem, 5vw, 4rem) !important; }

/* Modell-video (autoplay) i content-bredd */
.at-videosec .wp-block-video { margin: 0; }
.at-videosec video { width: 100%; height: auto; display: block; }

/* Modeller-sektion: grå bakgrund, kompakt gap rubrik→första modell, luft mellan varianter */
.at-modeller { background-color: #F0F0F0; }
.at-modeller > .hm-h2 { margin: 0 0 clamp(1.5rem, 3vw, 2.5rem); }
.at-modeller > .at-variant { margin-top: clamp(3rem, 6vw, 5rem); }
.at-modeller > .at-variant:first-of-type { margin-top: 0; }

/* ---------- Inspiration: full-bleed bildgalleri ---------- */
/* 3-kol kant-till-kant rutnät (kort 413×463, 100px gap @1440), full-bleed
   livsstilsbilder spänner alla kolumner. Caption = Engschrift versaler overlay. */
.at-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 6.95vw, 100px);
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.at-gtile { position: relative; margin: 0; overflow: hidden; aspect-ratio: 413 / 463; }
.at-gtile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.at-gtile figcaption {
  position: absolute; left: 1.4rem; bottom: 1.2rem; right: 1.4rem;
  color: #fff; font-family: "Engschrift", sans-serif; font-weight: 400;
  text-transform: uppercase; line-height: 1; letter-spacing: 0.01em;
  font-size: clamp(1.4rem, 2.4vw, 2.1875rem);
  text-shadow: 0 1px 10px rgba(0,0,0,.45);
}
.at-gband { grid-column: 1 / -1; margin: 0; overflow: hidden; aspect-ratio: 1440 / 562; }
.at-gband img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) {
  .at-gallery { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .at-gband { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .at-gallery { grid-template-columns: 1fr; }
}

/* ---------- Attefallshus-landning: modellkort ---------- */
.at-modelcards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 7vw, 6.5rem);
}
.at-modelcard { margin: 0; }
.at-modelcard__img { margin: 0; overflow: hidden; }
.at-modelcard__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.at-modelcard__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.15rem; }
.at-modelcard__name {
  font-family: "Engschrift", sans-serif; font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.45rem, 2.4vw, 2.1875rem); line-height: 1; margin: 0;
  color: var(--wp--preset--color--contrast);
}
.at-modelcard__price {
  font-family: "Engschrift", sans-serif; font-weight: 400; text-transform: uppercase;
  font-size: 1.375rem; color: #db672a; margin: 0.45rem 0 0; line-height: 1;
}
.at-modelcard__foot .at-btn--ghost { padding: 0.85rem 1.4rem; flex: none; }
@media (max-width: 780px) { .at-modelcards { grid-template-columns: 1fr; } }

/* Full-bleed modell-band med centrerad caption */
.at-modelband { width: 100vw; margin-left: calc(50% - 50vw); position: relative; }
.at-modelband .wp-block-cover__inner-container { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.at-modelband .at-modelband__cap {
  color: #fff; font-family: "Engschrift", sans-serif; font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.5rem, 2.6vw, 2.1875rem); letter-spacing: 0.04em; margin: 0 0 2.2rem;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
}

/* Mindre sektionsrubrik (mirrorns h3-feature-rubriker, 35px) */
.at-mediatext .hm-h2.is-sm { font-size: clamp(1.6rem, 2.6vw, 2.1875rem); }

/* ============================================================
   Modell-undersida (salt-pulpettak m.fl.)
   ============================================================ */
/* Variant-rader (Bashus/Mellanhus/Lofthus): planritnings-karusell + text */
.at-variant__kicker { font-family: "ApexNew-Book", sans-serif; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.9rem; color: #777; margin: 0 0 0.4rem; }
.at-variant__name { font-family: "Engschrift", sans-serif; text-transform: uppercase; font-weight: 400; font-size: clamp(1.6rem, 2.8vw, 2.1875rem); line-height: 1; margin: 0 0 0.5rem; color: var(--wp--preset--color--contrast); }
.at-variant__price { font-family: "Engschrift", sans-serif; text-transform: uppercase; color: #db672a; font-size: 1.375rem; line-height: 1; margin: 0 0 1.1rem; }
.at-variant__body p { margin: 0 0 1.4rem; }

/* Generell scroll-snap-karusell med pilar */
.at-carousel { position: relative; }
.at-carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.at-carousel__track::-webkit-scrollbar { display: none; }
.at-carousel__slide { flex: 0 0 100%; scroll-snap-align: center; }
.at-carousel__slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.at-carousel__btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.9); color: #1a1a1a; font-size: 1.3rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 7px rgba(0,0,0,0.18); z-index: 2; }
.at-carousel__btn:hover { background: #fff; }
.at-carousel__btn--prev { left: 0.6rem; }
.at-carousel__btn--next { right: 0.6rem; }
/* Planritnings-karusell: vit bakgrund, fast proportion */
.at-plancar .at-carousel__slide { aspect-ratio: 4 / 3; background: #fff; }

/* Spec-accordion: Vad ingår / Standard-Tillval */
.at-spec__sub { font-family: "Engschrift", sans-serif; text-transform: uppercase; font-weight: 400; color: var(--wp--preset--color--primary); font-size: clamp(1.35rem, 2.4vw, 1.875rem); margin: 2.4rem 0 0.4rem; }
.at-spec .wp-block-details { border-top: 1px solid #e2e2e2; margin: 0; }
.at-spec .wp-block-details:last-of-type { border-bottom: 1px solid #e2e2e2; }
.at-spec .wp-block-details > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 1.05rem 0; font-family: var(--wp--preset--font-family--apex-new); font-weight: 500; font-size: 1.375rem; color: #000; }
.at-spec .wp-block-details > summary::-webkit-details-marker { display: none; }
.at-spec .wp-block-details > summary::marker { content: ""; }
/* CSS-ritad +/– (två streck). OBS: temat sätter en chevron via summary::after
   (border + rotate 45deg) – måste nollas, annars roteras vårt "+" till "✕". */
.at-spec .wp-block-details > summary::after {
  content: ""; flex: none; width: 20px; height: 20px; margin-left: 1rem;
  border: 0 !important; transform: none !important; border-radius: 0;
  background-image: linear-gradient(#000, #000), linear-gradient(#000, #000);
  background-size: 20px 2px, 2px 20px;
  background-position: center, center;
  background-repeat: no-repeat;
}
.at-spec .wp-block-details[open] > summary::after { background-size: 20px 2px, 0 0; transform: none !important; }
.at-spec .wp-block-details[open] > summary::after { content: "\2013"; }
.at-spec__content { padding: 0 0 1.3rem; }
.at-spec__lab { font-family: "Engschrift", sans-serif; text-transform: uppercase; font-weight: 400; font-size: 1.375rem; letter-spacing: 1.4px; margin: 1.4rem 0 0.5rem; }
.at-spec__lab--standard { color: #db672a; }
.at-spec__lab--tillval { color: #004EA0; }
.at-spec__row { display: flex; justify-content: space-between; gap: 1.75rem; padding: 0.5rem 0; font-size: 1.25rem; font-weight: 300; line-height: 1.5; color: #000; }
.at-spec__row .txt { font-family: "ApexNew-Book", system-ui, sans-serif; }
.at-spec__row .price { color: #1a1a1a; white-space: nowrap; font-family: var(--wp--preset--font-family--apex-new); font-weight: 500; font-size: 1.25rem; }

/* Inspireras-karusell (återanvänder .at-gtile caption-overlay) */
.at-inspcar .at-carousel__track { gap: clamp(1rem, 2vw, 1.5rem); }
.at-inspcar .at-carousel__slide { flex: 0 0 clamp(230px, 31%, 380px); }
.at-inspcar .at-gtile { aspect-ratio: 1 / 1; height: auto; }

/* ---------- Om-sidan: kortare hero, feature-block, video ---------- */
/* Sidhjältar ska vara full fönsterhöjd precis som startsidan (övervinner inline min-height:70vh) */
.at-hero--page { min-height: 100vh !important; min-height: 100dvh !important; }
/* Hero-text vänsterställd vid content-bredden (1320, = header/footer-kant 60px @1440),
   precis som startsidan. Mina sid-cover saknar contentSize → barnen centreras smalt;
   här tvingas de till 1320 så texten ligger i vänsterkant. */
.at-hero--page .wp-block-cover__inner-container > * { max-width: 1320px !important; }
.at-features {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 3.5vw, 2.5rem);
}
.at-feature__title {
  font-family: "Engschrift", sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
  font-size: clamp(1.4rem, 2.6vw, 2rem) !important;
  margin: 0 0 0.6rem;
  color: var(--wp--preset--color--contrast);
}
.at-features p { margin: 0; font-size: 1.0625rem; line-height: 1.65; }
.at-videowrap { padding-block: clamp(1rem, 2vw, 2rem); }
.at-video { margin: 0; }
.at-video video { width: 100%; height: auto; display: block; }

/* ---------- Kontakt: butikskort + 2-bildsrad ---------- */
.at-butiker .hm-h2 { margin-bottom: clamp(2rem, 4vw, 3rem); }
.at-stores { display: flex; flex-direction: column; }
.at-store { padding: clamp(2rem, 4vw, 3rem) 0; border-bottom: 1px solid rgba(0,0,0,0.12); }
.at-store:first-child { padding-top: 0; }
.at-store:last-child { border-bottom: 0; }
.at-store__city {
  font-family: "Engschrift", sans-serif; text-transform: uppercase; font-weight: 400;
  color: #db672a; font-size: clamp(1.6rem, 3vw, 2.1875rem); letter-spacing: 0.01em;
  margin: 0 0 1.5rem;
}
.at-store__contacts,
.at-store__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2rem; }
.at-store__contacts { margin-bottom: 1.75rem; }
@media (max-width: 700px) { .at-store__contacts, .at-store__meta { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .at-store__contacts, .at-store__meta { grid-template-columns: 1fr; } }
.at-store__contact, .at-store__block { display: flex; flex-direction: column; }
.at-store__role {
  font-family: var(--wp--preset--font-family--apex-new); font-weight: 500;
  color: #004EA0; font-size: 1rem; margin-bottom: 0.5rem;
}
.at-store__name { font-weight: 600; color: var(--wp--preset--color--contrast); line-height: 1.4; }
.at-store__line { color: var(--wp--preset--color--contrast); line-height: 1.5; }
.at-store__email { color: #004EA0; text-decoration: underline; word-break: break-word; }
.at-store__contact > * + *, .at-store__block > * + * { margin-top: 0.2rem; }

.at-imgrow { gap: 0 !important; margin-top: clamp(2rem, 4vw, 3.5rem); }
.at-imgrow__img { margin: 0; }
.at-imgrow__img img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }

/* ---------- Media-text rows ---------- */
.at-mediatext { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.at-mediatext__row { gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.at-mediatext--reverse .at-mediatext__row { flex-direction: row-reverse; }
.at-mediatext__img { margin: 0; }
.at-mediatext__img img {
  width: 100%;
  height: auto;
  display: block;
}
.at-mediatext__body .hm-h2 { margin: 0 0 1.25rem; }
.at-mediatext__body p { font-size: 1.25rem; font-weight: 300; line-height: 1.6; margin: 0 0 1.5rem; }
.at-mediatext__body .at-btns { margin-top: 0.5rem; }

/* ---------- Full-bleed bands ---------- */
/* Äkta full bredd oavsett main/post-content-padding (responsiv, ingen hårdkodad px) */
.at-band {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: 0;
}

/* ---------- Overlay layout (bild överlappar bandet ovanför) ---------- */
/* Hela sektionen dras upp så bilden överlappar röda bandet; texten centreras vertikalt mot bilden */
/* Sektionen dras upp så bilden (kolumn utan egen marginal) överlappar bandet.
   Texten har en FAST marginal nedåt och ligger kvar oavsett bredd (glider inte
   upp över bilden när fönstret krymper). */
.at-overlay { margin-top: -90px; padding-top: 0; padding-bottom: clamp(2.5rem, 5vw, 4.5rem); position: relative; z-index: 2; }
.at-overlay__row { align-items: flex-start; justify-content: space-between; gap: clamp(1.5rem, 3vw, 3rem); flex-wrap: nowrap; }
.at-overlay__media { margin-top: 0; }            /* bilden vid sektionens topp = överlappar bandet */
/* padding-top (ej margin-top, som WP nollställer på kolumner) → fast, stabil offset nedåt */
.at-overlay__text { padding-top: 180px; }
.at-overlay__img { margin: 0; }
.at-overlay__img img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.at-overlay__text .hm-h2 { margin: 0 0 1.75rem; }
@media (max-width: 980px) { .at-overlay__text { padding-top: 130px; } }
@media (max-width: 781px) {
  .at-overlay { margin-top: -70px; }
  .at-overlay__row { flex-wrap: wrap; }
  .at-overlay__media { order: -1; }
  .at-overlay__text { padding-top: 0; }
}

/* ---------- Inspireras tiles ---------- */
.at-inspireras .hm-h2 { margin-bottom: 2rem; }
.at-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
}
@media (max-width: 900px) { .at-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .at-tiles { grid-template-columns: 1fr; } }
.at-tile { margin: 0; display: flex; flex-direction: column; }
.at-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.at-tile__body { padding: 1.25rem 0.25rem 0; }
.at-tile__title {
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: var(--wp--preset--color--contrast);
}
.at-tile__body p { font-size: 0.95rem; line-height: 1.6; margin: 0; color: var(--wp--preset--color--neutral); }
.at-inspireras .at-btns { margin-top: 2.5rem; justify-content: flex-start; }

/* ---------- Dark zone ---------- */
.at-dark { padding-block: clamp(1rem, 2vw, 2rem); }
.at-dark .hm-h2,
.at-dark .at-tile__title { color: #fff; }
.at-dark .at-mediatext__body p { color: rgba(255,255,255,0.82); }
.at-dark .at-mediatext { padding-block: clamp(2rem, 4vw, 3.5rem); }

/* ---------- Footer (attefall) ---------- */
.hm-footer--attefall .hm-footer-cols { align-items: flex-start; gap: clamp(2.5rem, 9vw, 11rem); }
.hm-footer--attefall .hm-footer-col { min-width: 140px; }
/* Copyright-texten: tvinga vit (ärver annars contrast = mörk → osynlig) */
.hm-footer--attefall .hm-copy { color: #fff !important; }
/* Footer-rubriken: normal ApexNew (ej Engschrift/versal som typsektionen sätter) */
.hm-footer--attefall .hm-footer-h {
  font-family: var(--wp--preset--font-family--apex-new) !important;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 500;
  font-size: 1.05rem;
}
.hm-footer-h {
  color: #fff;
  font-family: var(--wp--preset--font-family--apex-new);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 1.1rem;
  margin: 0 0 0.9rem;
}
.hm-footer--attefall .hm-footer-col p { font-size: 0.95rem; }
.hm-footer--attefall .hm-footer-col a { color: rgba(255,255,255,0.85); }
.hm-footer--attefall .hm-footer-col a:hover { color: #fff; opacity: 1; }

/* ===========================================================
   attefallshus — typsnitt (matchar mirrorn)
   Rubriker: Engschrift · Brödtext: ApexNew-Book · Hero-titel: Veneer
   =========================================================== */
@font-face {
  font-family: "Engschrift";
  src: url("../fonts/Engschrift.woff2") format("woff2"),
       url("../fonts/Engschrift.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ApexNew-Book";
  src: url("../fonts/ApexNew-Book.woff2") format("woff2"),
       url("../fonts/ApexNew-Book.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Brödtext */
body,
.at-intro p,
.at-mediatext__body p,
.at-tile__body p,
.at-hero__kicker {
  font-family: "ApexNew-Book", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Sektionsrubriker → Engschrift (hero-titeln behåller Veneer) */
.hm-section h2.hm-h2,
.at-mediatext__body .hm-h2,
.at-dark .hm-h2,
.at-inspireras .hm-h2,
.at-tile__title,
.hm-footer-h {
  font-family: "Engschrift", sans-serif !important;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.hm-section h2.hm-h2 { font-size: clamp(2rem, 4.5vw, 3.125rem); line-height: 1.05; }
.at-tile__title { font-size: 1.35rem; letter-spacing: 0.01em; }
.hm-footer-h { font-size: 1.4rem; }

/* ===========================================================
   attefallshus — sticky header (ljusgrå vid scroll) + sök
   =========================================================== */
.is-transparent-header.hm-header--attefall {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background-color 0.25s ease, padding 0.25s ease, box-shadow 0.25s ease;
}
body.admin-bar .is-transparent-header.hm-header--attefall { top: 32px; }
@media (max-width: 782px) { body.admin-bar .is-transparent-header.hm-header--attefall { top: 46px; } }

/* Scrollat läge: ljusgrå bakgrund, mörk text/ikoner */
.hm-header--attefall.is-scrolled {
  background: #F0F0F0 !important;
  padding-top: 0.7rem !important;
  padding-bottom: 0.7rem !important;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
}
.hm-header--attefall.is-scrolled .hm-nav-right a { color: #000 !important; }
.hm-header--attefall.is-scrolled .at-search-toggle,
.hm-header--attefall.is-scrolled .hm-menu-toggle { color: #000; }

/* Plain-mall (sidor utan hero, t.ex. legal): solid header från toppen + mörk text,
   och innehållet skjuts ner under den fixerade headern. */
body.page-template-page-plain .hm-header--attefall,
body.search .hm-header--attefall {
  background: #F0F0F0 !important;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
}
body.page-template-page-plain .hm-header.is-transparent-header .hm-nav-right a,
body.search .hm-header.is-transparent-header .hm-nav-right a { color: #000 !important; }
body.page-template-page-plain .hm-header--attefall .at-search-toggle,
body.page-template-page-plain .hm-header--attefall .hm-menu-toggle,
body.search .hm-header--attefall .at-search-toggle,
body.search .hm-header--attefall .hm-menu-toggle { color: #000; }
.at-plain-main { padding-top: clamp(6rem, 9vw, 8rem); }

/* ---------- Sökresultatsida ---------- */
.at-search-results .at-search-title { margin: 0 0 1.5rem; }
.at-search-results .at-searchform { max-width: 560px; margin: 0 0 clamp(2.5rem, 5vw, 4rem); }
.at-search-results .at-searchform .wp-block-search__inside-wrapper {
  border: 1px solid #ccc; border-radius: 0; overflow: hidden; background: #fff;
}
.at-search-results .at-searchform .wp-block-search__input {
  border: 0; background: transparent; font-family: var(--wp--preset--font-family--apexnew-book);
  font-size: 1.1rem; padding: 0.85rem 1rem;
}
.at-search-results .at-searchform .wp-block-search__button {
  background: var(--wp--preset--color--primary); color: #fff; border: 0; margin: 0;
  font-family: var(--wp--preset--font-family--apex-new); font-weight: 500;
  padding: 0 1.6rem; cursor: pointer;
}
.at-results { max-width: 900px; }
.at-result { padding: 1.6rem 0; border-bottom: 1px solid #e2e2e2; margin: 0; }
.at-result:first-of-type { border-top: 1px solid #e2e2e2; }
.at-result__title { margin: 0 0 0.5rem; }
.at-result__title a {
  font-family: "Engschrift", sans-serif; font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.01em; font-size: clamp(1.4rem, 2.4vw, 1.875rem); line-height: 1.1;
  color: var(--wp--preset--color--contrast); text-decoration: none;
}
.at-result__title a:hover { color: var(--wp--preset--color--primary); }
.at-result__excerpt { font-family: var(--wp--preset--font-family--apexnew-book); font-size: 1.0625rem; line-height: 1.6; color: #444; margin: 0; }
.at-results .wp-block-query-pagination { margin-top: clamp(2rem, 4vw, 3rem); gap: 0.75rem; font-family: var(--wp--preset--font-family--apex-new); }
.at-results .wp-block-query-pagination a { text-decoration: none; color: var(--wp--preset--color--primary); }
.at-search-noresults { font-family: var(--wp--preset--font-family--apexnew-book); font-size: 1.2rem; color: #444; max-width: 900px; }
/* Vänsterställd textkolumn i linje med header/footer:
   post-content centreras på samma content-bredd som header & footer (1320px →
   vänsterkant 60px @1440 på alla bredder ≥1320), och innehållet flödar
   (layout:default) kapat till 900px så det ligger kvar i den vänsterkanten. */
.at-plain-main .wp-block-post-content {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 0;
}
.at-plain-main .wp-block-post-content > * { max-width: 900px; margin-left: 0; margin-right: auto; }

/* Plain-sidans rubriker (Engschrift versaler, som mirrorns .noimg-sidor) + brödtext */
.at-plain-main h1,
.at-plain-main h2,
.at-plain-main h3,
.at-plain-main h4 {
  font-family: "Engschrift", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--wp--preset--color--contrast);
}
.at-plain-main h1 { font-size: clamp(2.4rem, 5.2vw, 4.375rem); margin: 0 0 clamp(2rem, 4vw, 3rem); }
.at-plain-main h2 { font-size: clamp(1.85rem, 3.5vw, 3.125rem); margin: clamp(2.25rem, 4vw, 3rem) 0 1rem; }
.at-plain-main h3 { font-size: clamp(1.45rem, 2.8vw, 2.1875rem); margin: clamp(1.75rem, 3vw, 2.25rem) 0 0.75rem; }
.at-plain-main p { font-size: 1.125rem; line-height: 1.7; margin: 0 0 1.25rem; }
.at-plain-main a { color: var(--wp--preset--color--primary); text-decoration: underline; }

/* Sök-ikon i headern */
.at-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
  color: #fff;
  transition: opacity 0.18s ease;
}
.at-search-toggle:hover { opacity: 0.7; }

/* Sök-dropdown (fälls ut under headern) */
.at-search {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #F0F0F0;
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  display: none;
}
.at-search.is-open { display: block; }
.at-search__form {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}
.at-search__icon { display: inline-flex; color: #000; flex: none; }
.at-search__input {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  outline: none;
  color: #000;
  font-family: var(--wp--preset--font-family--apex-new);
  font-size: 1.25rem;
  padding: 0.4rem 0;
}
.at-search__input::placeholder { color: #777; }
/* Dölj webbläsarens inbyggda rensa-kryss (så bara vår stäng-X visas) */
.at-search__input::-webkit-search-cancel-button,
.at-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.at-search__clear {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
  color: #555;
  flex: none;
}
.at-search__clear:hover { color: #000; }
.at-search--has-text .at-search__clear { display: inline-flex; }
.at-search__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
  color: #000;
  flex: none;
}
.at-search__close:hover { opacity: 0.7; }

/* ============================================================
   Block-editor (admin) – endast i editor-iframen
   Laddas via add_editor_style(). theme.json sätter redan rätt
   standardfonter (Engschrift rubriker / ApexNew-Book brödtext).
   Här döljer vi den fixerade header/footer-template-parten så att
   den inte överlappar innehållet i redigeringsvyn, och tar bort
   plain-sidans toppadding (som annars ger ett tomrum i editorn). */
.editor-styles-wrapper .hm-header,
.editor-styles-wrapper .hm-header--attefall,
.editor-styles-wrapper .hm-footer,
.editor-styles-wrapper .hm-footer--attefall { display: none !important; }
.editor-styles-wrapper .at-plain-main { padding-top: 0 !important; }


