/*
Theme Name: PSA Industri
Theme URI: https://www.psaindustri.dk/
Author: PSA INDUSTRI ApS
Description: Tema til PSA INDUSTRI. Produkter, kategorier og størrelser som egen indholdstype, klar til flere sprog med Polylang eller WPML.
Version: 1.2.16
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: psa-industri
*/

:root {
  --psa-accent: #F0B323;
  --psa-ink: #16191D;
  --psa-bg: #F4F4F1;
  --psa-surface: #FFFFFF;
  --psa-line: #D9D9D3;
  --psa-muted: #5B6670;
  --psa-steel: #2B3036;
  --psa-steel-2: #3A4046;
  --psa-hatch-a: #E6E6E0;
  --psa-hatch-b: #EEEEE9;
  --psa-font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --psa-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--psa-bg);
  color: var(--psa-ink);
  font-family: var(--psa-font);
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--psa-ink); }
a:hover { color: var(--psa-muted); }
h1, h2, h3 { font-family: var(--psa-display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--psa-accent); outline-offset: 2px; }

.screen-reader-text {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}
.psa-wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Topbar */
.psa-topbar { background: var(--psa-ink); color: #E9E9E4; font-size: 15px; }
.psa-topbar .psa-wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.psa-topbar a { color: #E9E9E4; text-decoration: none; }
.psa-contactline { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.psa-langs { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.psa-langs a { display: block; padding: 2px 10px; font-size: 14px; text-transform: uppercase; }
.psa-langs .current a { background: var(--psa-accent); color: var(--psa-ink); font-weight: 600; }

/* Header */
.psa-header { background: var(--psa-surface); border-bottom: 1px solid var(--psa-line); }
.psa-header .psa-wrap { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.psa-logo { text-decoration: none; color: var(--psa-ink); font-family: var(--psa-display); font-weight: 700; font-size: 34px; letter-spacing: .02em; line-height: 1; }
.psa-logo span { font-weight: 600; letter-spacing: .14em; font-size: 22px; }
.psa-logo img { display: block; max-height: 36px; width: auto; max-width: 100%; }
.psa-nav ul { display: flex; flex-wrap: wrap; gap: 6px 26px; list-style: none; margin: 0; padding: 0; font-weight: 500; }
.psa-nav a { text-decoration: none; display: block; padding-bottom: 3px; border-bottom: 3px solid transparent; }
.psa-nav .current-menu-item > a,
.psa-nav .current-menu-ancestor > a,
.psa-nav .current_page_item > a,
.psa-nav .current-page-ancestor > a { border-bottom-color: var(--psa-accent); }

/* Undermenuer */
.psa-nav li { position: relative; }
.psa-nav .menu-item-has-children > a::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; vertical-align: middle; }
.psa-nav .sub-menu {
  display: none; position: absolute; left: 0; top: 100%; z-index: 50; min-width: 230px;
  flex-direction: column; gap: 0; margin: 0; padding: 6px 0; list-style: none;
  background: var(--psa-surface); border: 1px solid var(--psa-line); box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.psa-nav li:hover > .sub-menu,
.psa-nav li:focus-within > .sub-menu { display: flex; }
.psa-nav .sub-menu a { padding: 8px 18px; border-bottom: 0; white-space: nowrap; }
.psa-nav .sub-menu a:hover { background: var(--psa-bg); }
.psa-burger { display: none; }
@media (max-width: 900px) {
  .psa-header .psa-wrap { gap: 10px 20px; padding-top: 14px; padding-bottom: 14px; }
  .psa-burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 10px; background: transparent; border: 1px solid var(--psa-line); border-radius: 4px; cursor: pointer; }
  .psa-burger span { display: block; height: 2px; background: var(--psa-ink); }
  .psa-nav { display: none; flex: 0 0 100%; width: 100%; }
  .psa-nav.is-open { display: block; }
  .psa-nav ul { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .psa-nav li { border-top: 1px solid var(--psa-line); }
  .psa-nav a { padding: 12px 0 12px 10px; border-bottom: 0; border-left: 3px solid transparent; }
  .psa-nav .current-menu-item > a,
  .psa-nav .current-menu-ancestor > a,
  .psa-nav .current_page_item > a,
  .psa-nav .current-page-ancestor > a { border-bottom-color: transparent; border-left-color: var(--psa-accent); }
  .psa-nav .sub-menu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 6px 18px; min-width: 0; background: transparent; }
  .psa-nav .sub-menu li { border-top: 0; }
  .psa-nav .sub-menu a { padding: 8px 0 8px 10px; white-space: normal; font-weight: 400; font-size: 16px; }
  .psa-nav .menu-item-has-children > a::after { display: none; }
  .psa-topbar .psa-contactline { display: flex; flex-direction: column; gap: 4px; }
}

/* Hero */
.psa-hero { background: var(--psa-ink); color: var(--psa-bg); }
.psa-hero .psa-wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.psa-hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.psa-eyebrow { font-family: var(--psa-display); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; font-size: 16px; color: var(--psa-accent); }
.psa-hero h1 { font-size: clamp(44px, 6vw, 76px); line-height: .98; }
.psa-hero p { max-width: 520px; color: #C9CBC6; font-size: 19px; margin: 0; }
.psa-hero-image { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; }
.psa-hero-image img { display: block; width: 100%; max-width: 560px; }
.psa-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.psa-btn { display: inline-block; min-height: 44px; padding: 12px 26px; font-weight: 600; text-decoration: none; background: var(--psa-accent); color: var(--psa-ink); border: 2px solid var(--psa-accent); }
.psa-btn:hover { color: var(--psa-ink); filter: brightness(.95); }
.psa-btn--ghost { background: transparent; color: var(--psa-bg); border-color: var(--psa-bg); }
.psa-btn--ghost:hover { color: var(--psa-bg); background: rgba(255,255,255,.08); }

/* Intro */
.psa-intro .psa-wrap { display: flex; flex-wrap: wrap; gap: 36px 56px; padding-top: 72px; padding-bottom: 24px; }
.psa-intro-text { flex: 2 1 460px; min-width: 0; }
.psa-intro-text h2 { font-size: 44px; margin-bottom: 14px; }
.psa-intro-text p { max-width: 62ch; }
.psa-facts { flex: 1 1 280px; min-width: 0; border-top: 3px solid var(--psa-ink); }
.psa-fact { display: flex; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid #D0D0CA; }
.psa-fact strong { font-family: var(--psa-display); font-weight: 700; font-size: 40px; line-height: 1; min-width: 96px; font-variant-numeric: tabular-nums; }

/* Sections and cards */
.psa-section .psa-wrap { padding-top: 40px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 28px; }
.psa-section-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; }
.psa-section-head h2 { font-size: 44px; }
.psa-section-head a { font-weight: 600; }
.psa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.psa-card { display: flex; flex-direction: column; text-decoration: none; color: var(--psa-ink); background: var(--psa-surface); border: 1px solid var(--psa-line); }
.psa-card:hover { color: var(--psa-ink); border-color: var(--psa-ink); }
.psa-card-img { height: 150px; background: repeating-linear-gradient(135deg, var(--psa-hatch-a) 0 10px, var(--psa-hatch-b) 10px 20px); }
.psa-card-img img { display: block; width: 100%; height: 100%; object-fit: contain; background: #8A8B8C; }
.psa-card--tall .psa-card-img { height: 190px; }
.psa-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.psa-card-title { font-family: var(--psa-display); font-weight: 700; font-size: 28px; line-height: 1.1; }
.psa-card-desc { color: var(--psa-ink); }
.psa-card-meta { font-size: 14px; color: var(--psa-muted); }

/* Topbjælke og menu følger med ved scroll (kun på bredere skærme, så den ikke fylder på mobil) */
/* Logoet øverst og menuen under, på alle sprog (på computer) */
@media (min-width: 901px) {
  .psa-header .psa-wrap { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
}
@media (min-width: 901px) {
  html { scroll-padding-top: 170px; }
  .psa-sticky { position: sticky; top: 0; z-index: 100; }
  .admin-bar .psa-sticky { top: 32px; }
}
@media (min-width: 783px) and (max-width: 900px) {
  .admin-bar .psa-sticky { top: 0; }
}

/* Page header, breadcrumbs */
.psa-main .psa-wrap { padding-top: 36px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 28px; }
.psa-crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 15px; color: var(--psa-muted); }
.psa-crumbs a { color: var(--psa-muted); }
.psa-crumbs [aria-current] { color: var(--psa-ink); font-weight: 600; }
.psa-title { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.psa-title h1 { font-size: clamp(40px, 5vw, 60px); line-height: 1; }
.psa-lead { font-size: 19px; }
.psa-content { max-width: 760px; }
.psa-content > *:last-child { margin-bottom: 0; }
.psa-content a.psa-download { font-weight: 600; font-size: 19px; }

/* Størrelser */
.psa-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.psa-size { background: var(--psa-surface); border: 1px solid var(--psa-line); display: flex; flex-direction: column; }
.psa-size-img { height: 230px; background: var(--psa-hatch-b); display: flex; justify-content: center; align-items: flex-start; padding-top: 16px; }
.psa-flap { display: flex; flex-direction: column; }
.psa-flap-top { flex: 1; background: repeating-linear-gradient(90deg, var(--psa-steel-2) 0 3px, var(--psa-steel) 3px 6px); }
.psa-flap-bottom { background: #1E2227; }
.psa-size-body { padding: 14px 18px 18px; display: flex; flex-direction: column; }
.psa-size-dim { font-family: var(--psa-display); font-weight: 700; font-size: 28px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.psa-size-nr { color: var(--psa-muted); font-variant-numeric: tabular-nums; }

/* Kontakt og fod */
.psa-contact .psa-wrap { padding-top: 56px; padding-bottom: 72px; }
.psa-contactbox { background: var(--psa-surface); border: 1px solid var(--psa-line); padding: 32px; display: flex; flex-direction: column; gap: 10px; }
.psa-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.psa-contactimage { border: 1px solid var(--psa-line); background: var(--psa-surface); overflow: hidden; min-height: 280px; }
.psa-contactimage img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 800px) {
  .psa-contact-grid { grid-template-columns: 1fr; }
  .psa-contactimage { min-height: 0; aspect-ratio: 3 / 2; }
}
.psa-contactbox h2 { font-size: 36px; }
.psa-contactbox p { margin: 0; }
.psa-contactbox address { font-style: normal; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.psa-footer { background: var(--psa-ink); color: #C9CBC6; font-size: 15px; }
.psa-footer .psa-wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }

/* Almindelige sider og WordPress-indhold */
.psa-entry h2, .psa-entry h3 { margin: 1.4em 0 .5em; }
.psa-entry h2 { font-size: 36px; }
.psa-entry h3 { font-size: 28px; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 14px; color: var(--psa-muted); }
.psa-pagination { display: flex; gap: 12px; }

@media (max-width: 600px) {
  .psa-hero .psa-wrap { padding-top: 40px; padding-bottom: 40px; }
  .psa-intro-text h2, .psa-section-head h2 { font-size: 34px; }
}
@media (prefers-reduced-motion: no-preference) {
  .psa-card { transition: border-color .15s ease; }
}

/* Størrelse: detaljeside */
.psa-size--link { text-decoration: none; color: inherit; }
.psa-size--link:hover { border-color: var(--psa-ink); color: inherit; }
.psa-back { font-weight: 600; text-decoration: none; }
.psa-sizedetail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.psa-drawing { margin: 0; background: #fff; border: 1px solid var(--psa-line); padding: 12px; }
.psa-drawing img { display: block; width: 100%; height: auto; }
.psa-size-img--big { height: 420px; border: 1px solid var(--psa-line); }
.psa-sizedetail-info { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.psa-size-nr-big { margin: 0; font-size: 20px; color: var(--psa-muted); font-variant-numeric: tabular-nums; }
.psa-panel { background: var(--psa-surface); border: 1px solid var(--psa-line); }
.psa-panel h2 { font-size: 26px; padding: 14px 20px; background: var(--psa-bg); border-bottom: 1px solid var(--psa-line); }
.psa-panel dl { margin: 0; }
.psa-spec { display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--psa-line); }
.psa-spec:last-child { border-bottom: 0; }
.psa-spec dt { font-weight: 600; }
.psa-spec dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.psa-mount { display: flex; gap: 20px; align-items: center; padding: 16px 20px; }
.psa-mount-img { flex: 0 0 150px; }
.psa-mount-img img { display: block; width: 150px; height: auto; }
.psa-mount-text { display: flex; flex-direction: column; gap: 4px; }
.psa-tests { list-style: none; margin: 0; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 900px) {
  .psa-sizedetail { grid-template-columns: 1fr; gap: 24px; }
  .psa-size-img--big { height: 300px; }
}
.psa-size-img--photo { height: auto; padding: 12px; background: #fff; align-items: center; border-bottom: 1px solid var(--psa-line); }
.psa-size-img--photo img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; }
.psa-mount-img a { display: block; }
