/*
Theme Name: PolBergen Verdeelkast
Theme URI: https://polbergen.nl
Author: PolBergen
Author URI: https://polbergen.nl
Description: Interactief verdeelkast-thema voor PolBergen. De homepage is het vooraanzicht van een hoofdverdeelkast met zes automaten als navigatie. Alle teksten aanpasbaar in het beheer, SEO-proof met LocalBusiness-schema.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: polbergen
Tags: business, one-page, custom-colors
*/


  :root {
    --cab:      #0E1E2B;   /* cabinet navy */
    --cab-2:    #0A1620;   /* deeper */
    --back:     #13283A;   /* backplate */
    --rail:     #9FA8AE;   /* din rail steel */
    --rail-2:   #6E767C;
    --module:   #E7E2D6;   /* breaker body cream */
    --module-2: #D2CBBC;
    --module-sh:#B3AC9C;
    --ink:      #0E1E2B;
    --accent:   #E85A2C;
    --gold:     #F2B544;
    --paper:    #F5F2EC;
    --steel:    #8FA3B5;  /* licht genoeg voor leesbare microtekst op donker */
    --live:     #E85A2C;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { background: #0A1620; }
  body { font-family: 'Hanken Grotesk', sans-serif; background: var(--cab-2); color: var(--paper); -webkit-font-smoothing: antialiased; }
  .mono { font-family: 'JetBrains Mono', monospace; }
  ::selection { background: var(--accent); color: var(--paper); }
  a { color: inherit; }

  /* ============================================================
     PANEL VIEW  (non-scroll, fills viewport)
     ============================================================ */
  #panel {
    position: fixed; inset: 0;
    background:
      radial-gradient(130% 100% at 50% -10%, #163049 0%, var(--cab) 50%, var(--cab-2) 100%);
    display: flex; flex-direction: column;
    padding: clamp(16px, 3vw, 38px);
    padding-top: max(clamp(16px, 3vw, 38px), env(safe-area-inset-top));
    padding-left: max(clamp(16px, 3vw, 38px), env(safe-area-inset-left));
    padding-right: max(clamp(16px, 3vw, 38px), env(safe-area-inset-right));
    padding-bottom: max(clamp(16px, 3vw, 38px), env(safe-area-inset-bottom));
    overflow: hidden;
    z-index: 10;
  }

  /* header */
  .cab-head { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 3; }
  .plate { display: flex; align-items: center; gap: 12px; }
  .plate svg { width: clamp(34px, 4vw, 46px); height: clamp(34px,4vw,46px); }
  .plate .pw { font-family: 'Hanken Grotesk'; font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.7rem); letter-spacing: -0.03em; }
  .plate .pw b { color: var(--accent); }
  .plate .sub { display:block; font-family:'JetBrains Mono'; font-size: .66rem; letter-spacing: .24em; color: var(--steel); text-transform: uppercase; margin-top: 2px; }

  .status { text-align: right; font-family: 'JetBrains Mono'; font-size: clamp(.66rem,1vw,.74rem); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
  .status-line { white-space: nowrap; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
  .status-sub { white-space: nowrap; margin-top: 6px; }
  .status .live-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background: var(--gold); margin-right: 6px; box-shadow: 0 0 8px var(--gold); animation: blink 2.4s ease-in-out infinite; }
  @keyframes blink { 50% { opacity: .35; } }
  .status .v { color: var(--paper); }
  #soundBtn { background: none; border: 1px solid #25415680; border-radius: 6px; cursor: pointer; font-size: .8rem; line-height: 1; padding: 3px 6px; margin-left: 10px; vertical-align: middle; filter: grayscale(.3); transition: .2s; }
  #soundBtn:hover { border-color: var(--accent); }
  #soundBtn.muted { opacity: .45; }

  /* backplate that holds the rail */
  .cab-body { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; z-index: 2; min-height: 0; }
  .backplate {
    width: 100%; max-width: 1180px;
    background: linear-gradient(180deg, #0d1c29, #0e2031);
    border: 1px solid #1d3344; border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 30px 60px -30px rgba(0,0,0,.7);
    padding: clamp(28px, 4.5vw, 60px) clamp(20px,3.5vw,52px);
    position: relative;
  }
  .panel-instr { text-align: center; font-family:'JetBrains Mono'; font-size: clamp(.66rem,1.1vw,.78rem); letter-spacing: .2em; text-transform: uppercase; color: var(--steel); margin-bottom: clamp(16px,2.4vw,28px); }
  .panel-instr b { color: var(--gold); }

  /* DIN RAIL + breakers */
  .rail-zone { position: relative; }
  .din {
    position: absolute; left: -6px; right: -6px; top: 50%; transform: translateY(-50%);
    height: 30px; border-radius: 3px;
    background: linear-gradient(180deg, #aeb6bb 0%, #8b9398 50%, #aeb6bb 100%);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.45), inset 0 -1px 2px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.35);
    z-index: 1;
  }
  .din::before, .din::after { content:""; position:absolute; left:0; right:0; height:3px; background: rgba(0,0,0,.12); }
  .din::before { top: 5px; } .din::after { bottom: 5px; }

  .breakers { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(8px, 1.4vw, 18px); }

  .circuit { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
  a.circuit:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 10px; }

  /* wire stub above breaker */
  .wire { width: 7px; height: clamp(26px, 5vh, 52px); border-radius: 3px 3px 0 0;
    background: #1a3346;
    position: relative; overflow: hidden; }
  .wire::after { content:""; position:absolute; left:0; right:0; top:0; height:200%;
    background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 22px);
    opacity: 0; transition: opacity .3s; animation: wireflow 1.3s linear infinite; }
  .circuit.on .wire::after { opacity: .9; }
  @keyframes wireflow { to { transform: translateY(50%); } }

  /* the breaker module */
  .breaker {
    position: relative; cursor: pointer; border: none; padding: 0;
    width: 100%; aspect-ratio: 0.6 / 1; max-height: clamp(150px, 26vh, 250px);
    background: linear-gradient(180deg, #f1ede3 0%, var(--module) 55%, var(--module-2) 100%);
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 20px -8px rgba(0,0,0,.55);
    display: flex; flex-direction: column; align-items: center;
    transition: transform .14s ease, box-shadow .2s ease;
    overflow: hidden;
  }
  .circuit:hover .breaker { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 16px 28px -10px rgba(0,0,0,.6); }
  .circuit.on .breaker { box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 0 30px -2px rgba(232,90,44,.5), 0 14px 26px -10px rgba(0,0,0,.55); }

  /* ---- ABB S200-style MCB ---- */
  /* aansluitklem boven/onder met schroef */
  .mcb-term { width: 48%; height: 10px; border-radius: 2px; flex-shrink: 0; position: relative;
    background: linear-gradient(180deg,#3f454b,#23272c); box-shadow: inset 0 1px 2px rgba(0,0,0,.75); }
  .mcb-term::after { content:""; position:absolute; left:50%; top:50%; width:12px; height:12px; transform:translate(-50%,-50%); border-radius:50%;
    background: linear-gradient(115deg, transparent 42%, rgba(0,0,0,.5) 42% 58%, transparent 58%), radial-gradient(circle at 35% 30%, #d3ccbc, #8e8675);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); }
  .mcb-term.top { margin-top: 10px; }
  .mcb-term.bot { margin-top: auto; margin-bottom: 9px; }

  /* type/merk print bovenaan */
  .mcb-brand { margin-top: 11px; font-family:'Hanken Grotesk',sans-serif; font-weight: 800; font-size: .54rem; letter-spacing: -0.01em; color: #5a5f64; line-height: 1; }
  .mcb-brand::after { content: "PB-200"; display: block; font-family:'JetBrains Mono',monospace; font-weight: 400; font-size: .44rem; letter-spacing: .08em; color: #a7a59e; margin-top: 2px; }

  /* rood spanningsvenster */
  .mcb-flag { margin-top: 10px; width: 26%; height: 8px; border-radius: 1px; position: relative; overflow: hidden;
    background: #aea99c; box-shadow: inset 0 1px 2px rgba(0,0,0,.45); transition: box-shadow .2s; }
  .mcb-flag::after { content:""; position:absolute; inset:0; opacity:0; transition: opacity .15s;
    background: linear-gradient(180deg,#ef3b2a,#c40d12); }
  .circuit.on .mcb-flag::after { opacity: 1; }
  .circuit.on .mcb-flag { box-shadow: inset 0 1px 2px rgba(0,0,0,.45), 0 0 10px rgba(226,35,26,.8); }

  /* verzonken bezel + grijze ABB-hendel */
  .mcb-well { position: relative; margin-top: 11px; width: 46%; height: 30%;
    background: linear-gradient(180deg,#cfccc3,#bdb9af);
    border: 1px solid #b1ada3; border-radius: 5px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.5); }
  .mcb-mark { position: absolute; left: 50%; transform: translateX(-50%); font-family:'JetBrains Mono'; font-weight:700; font-size:.6rem; color:#494e53; line-height:1; }
  .mcb-mark.i { top: -14px; }
  .mcb-mark.o { bottom: -14px; }
  .mcb-lever { position: absolute; left: 11%; right: 11%; bottom: 7%; height: 44%; border-radius: 3px;
    background: linear-gradient(180deg,#a3a8ad 0%, #868c91 45%, #6c7176 100%);
    box-shadow: 0 3px 4px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 3px rgba(0,0,0,.3);
    transition: bottom .16s cubic-bezier(.5,1.8,.55,1); }
  .mcb-lever::before { content:""; position:absolute; left:26%; right:26%; top:16%; bottom:16%; border-radius:1px;
    background: repeating-linear-gradient(180deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3.5px); }
  .circuit.on .mcb-lever { bottom: 49%; }

  /* rating (curve + ampère), ABB-stijl prominent */
  .rating { margin-top: 9px; font-family:'JetBrains Mono'; font-weight:700; font-size: clamp(.6rem,1.1vw,.8rem); color: #3f4448; letter-spacing: .04em; }

  /* legend label under each circuit */
  .legend {
    margin-top: 14px; width: 100%;
    background: #0a141d; border: 1px solid #21384b; border-radius: 4px;
    padding: 7px 4px 6px; text-align: center;
    transition: border-color .25s, background .25s;
  }
  .circuit.on .legend { border-color: var(--accent); background: #14110d; }
  .legend .ln { display: block; font-family:'Oswald'; font-weight:600; text-transform: uppercase; letter-spacing: .08em;
    font-size: clamp(.66rem, 1.15vw, .92rem); color: var(--paper); line-height: 1; }
  .circuit.on .legend .ln { color: var(--gold); }
  .legend .lc { display: block; font-family:'JetBrains Mono'; font-size: .65rem; letter-spacing: .16em; color: var(--steel); text-transform: uppercase; margin-top: 3px; }

  .cab-foot { display:flex; justify-content:space-between; align-items:center; position: relative; z-index:3; font-family:'JetBrains Mono'; font-size: clamp(.65rem,1vw,.72rem); letter-spacing:.14em; text-transform:uppercase; color: var(--steel); }
  .cab-foot a { color: var(--steel); text-decoration: none; transition: color .2s; }
  .cab-foot a:hover { color: var(--gold); }

  /* surge overlay for transition */
  #surge { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0;
    background: radial-gradient(circle at 50% 50%, rgba(242,181,68,.0), rgba(232,90,44,.0));
  }
  #surge.fire { animation: surge .65s ease forwards; }
  @keyframes surge {
    0% { opacity: 0; background: radial-gradient(circle at var(--sx,50%) var(--sy,50%), rgba(242,181,68,.9), rgba(232,90,44,.5) 25%, transparent 55%); }
    40% { opacity: 1; }
    100% { opacity: 1; background: radial-gradient(circle at var(--sx,50%) var(--sy,50%), rgba(242,181,68,1), rgba(232,90,44,1) 80%, var(--cab) 100%); }
  }

  /* ============================================================
     SUB PAGES (scrollable)
     ============================================================ */
  section.page { display: none; min-height: 100vh; background: var(--cab-2); }
  section.page.active { display: block; }
  body.in-page { overflow: auto; }
  body.in-panel { overflow: hidden; }

  .topbar { position: sticky; top: 0; z-index: 20; display:flex; align-items:center; justify-content: space-between;
    padding: 16px 30px; padding-top: max(16px, env(safe-area-inset-top)); background: rgba(10,22,32,.82); backdrop-filter: blur(14px); border-bottom: 1px solid #1d3344; }
  .back-switch { display: inline-flex; align-items: center; gap: 12px; background: none; border: 1px solid var(--steel); color: var(--paper);
    font-family:'JetBrains Mono'; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; padding: 9px 16px; border-radius: 100px; cursor: pointer; transition: .2s; }
  .back-switch:hover { border-color: var(--accent); color: var(--gold); }
  .back-switch .mini { width: 22px; height: 12px; border-radius: 7px; background: #16293a; position: relative; }
  .back-switch .mini::after { content:""; position:absolute; top:1px; left:1px; width:10px; height:10px; border-radius:50%; background: var(--accent); transition: left .2s; }
  .back-switch:hover .mini::after { left: 11px; }
  .topbar .pw { font-family:'Hanken Grotesk'; font-weight:800; letter-spacing:-.03em; font-size:1.1rem; }
  .topbar .pw b { color: var(--accent); }

  .phero { padding: 90px 30px 60px; max-width: 1100px; margin: 0 auto; position: relative; }
  .phero .code { font-family:'JetBrains Mono'; font-size:.72rem; letter-spacing:.24em; text-transform:uppercase; color: var(--accent); }
  .phero h1 { font-family:'Hanken Grotesk'; font-weight: 900; font-size: clamp(2.6rem, 8vw, 6rem); line-height: .92; letter-spacing: -0.04em; margin: 18px 0 14px; color: var(--paper); }
  .phero .one { font-size: clamp(1.2rem, 3vw, 1.9rem); color: var(--gold); font-weight: 700; max-width: 22ch; }
  .pbody { max-width: 1100px; margin: 0 auto; padding: 0 30px 110px; }
  .pbody .lead { font-size: 1.2rem; color: var(--paper); max-width: 60ch; margin-bottom: 40px; line-height: 1.6; }
  .pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 50px; }
  .pcard { background: #122537; border: 1px solid #1d3344; border-radius: 12px; padding: 26px 28px; overflow-wrap: anywhere; }
  .pcard a { color: var(--gold); text-decoration: none; overflow-wrap: anywhere; }
  .pcard a:hover { color: var(--accent); }
  @media (max-width: 640px) {
    .pgrid { grid-template-columns: 1fr; gap: 12px; }
    .disc-recap { grid-template-columns: 1fr 1fr !important; }
  }
  .pcard h2, .pcard h4 { font-family:'JetBrains Mono'; font-size:.7rem; letter-spacing:.2em; text-transform:uppercase; color: var(--accent); margin-bottom: 12px; }
  .pcard p { color: var(--paper); opacity:.85; }
  .pcard ul { list-style: none; }
  .pcard ul li { padding: 8px 0 8px 18px; position: relative; border-bottom: 1px solid #1d3344; opacity:.9; }
  .pcard ul li:last-child { border-bottom: none; }
  .pcard ul li::before { content:""; position:absolute; left:0; top:16px; width:8px; height:2px; background: var(--accent); }
  .pcta { background: linear-gradient(135deg, #15293b, #0e1e2b); border:1px solid #1d3344; border-radius: 16px; padding: 50px; text-align:center; }
  .pcta h3 { font-family:'Hanken Grotesk'; font-weight:800; font-size: clamp(1.6rem,4vw,2.6rem); letter-spacing:-.03em; margin-bottom: 14px; }
  .pcta p { color: var(--paper-2,#AFC0CC); opacity:.8; margin-bottom: 26px; }
  .btn { display:inline-block; background: var(--accent); color: var(--paper); text-decoration:none; font-weight:700; padding: 15px 32px; border-radius: 100px; transition:.2s; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(232,90,44,.6); }
  .pfoot { border-top:1px solid #1d3344; padding: 30px; text-align:center; font-family:'JetBrains Mono'; font-size:.7rem; letter-spacing:.12em; text-transform:uppercase; color: var(--steel); }
  .pfoot a { color: var(--steel); text-decoration: none; transition: color .2s; }
  .pfoot a:hover { color: var(--gold); }

  /* about specials */
  .founders { display:flex; gap: 16px; flex-wrap: wrap; margin: 30px 0 50px; }
  .founder { flex:1; min-width: 220px; background:#122537; border:1px solid #1d3344; border-radius:12px; padding: 26px; }
  .founder .nm { font-family:'Hanken Grotesk'; font-weight:800; font-size:1.4rem; }
  .founder .rl { font-family:'JetBrains Mono'; font-size:.68rem; letter-spacing:.16em; text-transform:uppercase; color: var(--accent); margin-top:4px; }
  .disc-recap { display:grid; grid-template-columns: repeat(4,1fr); gap:12px; }
  .disc-recap .d { background:#0e1e2b; border:1px solid #1d3344; border-radius:10px; padding:18px; }
  .disc-recap .d .t { font-family:'Oswald'; font-weight:600; text-transform:uppercase; letter-spacing:.05em; font-size:1rem; }
  .disc-recap .d .s { font-size:.85rem; color:#AFC0CC; opacity:.8; margin-top:6px; }

  /* ============================================================
     RESPONSIVE — portrait / mobile : vertical panel
     ============================================================ */
  @media (max-aspect-ratio: 9/13), (max-width: 720px) {
    .panel-instr { margin-bottom: 14px; font-size: .66rem; }
    .breakers { grid-template-columns: 1fr 1fr; gap: 14px 14px; }
    .din { display: none; }
    .wire { display: none; }
    .circuit { flex-direction: column; align-items: center; }
    .breaker { width: clamp(52px, 15vw, 66px); height: clamp(92px, 14vh, 116px); aspect-ratio: auto; max-height: none; }
    .mcb-brand { display: none; }
    .mcb-term { width: 46%; height: 8px; }
    .mcb-term.top { margin-top: 8px; }
    .mcb-term.bot { margin-bottom: 7px; }
    .mcb-flag { margin-top: 8px; width: 28%; height: 7px; }
    .mcb-well { margin-top: 9px; width: 48%; height: 34%; }
    .mcb-mark { font-size: .5rem; }
    .mcb-mark.i { top: -12px; }
    .mcb-mark.o { bottom: -12px; }
    .rating { margin-top: 7px; font-size: .58rem; }
    .legend { margin-top: 10px; width: 100%; padding: 6px 6px 5px; }
    .legend .ln { font-size: .82rem; }
    .legend .lc { font-size: .6rem; }
    .backplate { padding: 20px 16px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .wire::after, .status .live-dot { animation: none !important; }
    #surge.fire { animation-duration: .25s; }
  }
/* ====== WordPress-aanvullingen ====== */
a.circuit { text-decoration: none; color: inherit; }
a.back-switch { text-decoration: none; }
.disc-recap a.d { color: inherit; }

/* Crawlbare SEO-tekst: toegankelijk maar niet beeldvullend */
.pb-seo {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* WP admin bar niet over het paneel */
body.admin-bar #panel { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar #panel { top: 46px; } }

/* Leesbare opmaak voor lange tekstpagina's (privacy, cookies, voorwaarden) */
.prose { max-width: 760px; color: #C9D2DA; font-size: 1.02rem; line-height: 1.7; }
.prose h2 { font-family: 'Hanken Grotesk', sans-serif; font-weight: 800; color: var(--paper); font-size: 1.5rem; letter-spacing: -0.02em; margin: 38px 0 12px; }
.prose h3 { font-family: 'Hanken Grotesk', sans-serif; font-weight: 700; color: var(--paper); font-size: 1.15rem; margin: 26px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent); }
.prose strong { color: var(--paper); }
.cab-foot .legal a { margin: 0; }
.cab-foot { flex-wrap: wrap; gap: 6px 16px; }
.cab-foot .legal a { display: inline; }
