/*
Theme Name: Besev Kft.
Theme URI: https://besev.hu
Author: Besev Kft.
Description: A Besev Kft. egyoldalas weboldala – asztalosmunka és villanyszerelés, árkalkulátorral.
Version: 1.0.4
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: besev
*/

  :root {
    --navy: #1F3A57;
    --navy-2: #2D475F;
    --stone: #D6D5D0;
    --cream: #E7E4DE;
    --slate: #5E6F80;
    --wood: #9A6A3A;

    --bg: #D9D8D3;
    --surface: #E9E7E2;
    --ink: #17283B;
    --muted: #4F5E6D;
    --line: #BDBCB6;
    --brand: var(--navy);
    --brand-2: var(--navy-2);
    --on-brand: var(--cream);
    --accent: var(--wood);

    --display: "Archivo Black", "Arial Black", "Helvetica Neue", Arial, sans-serif;
    --body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --bg: #111C28;
      --surface: #172636;
      --ink: #E7E4DE;
      --muted: #A6B1BC;
      --line: #2A3B4E;
      --brand: #203E5E;
      --brand-2: #2C4A68;
      --on-brand: #EDEAE4;
      --accent: #C99562;
    }
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111C28;
    --surface: #172636;
    --ink: #E7E4DE;
    --muted: #A6B1BC;
    --line: #2A3B4E;
    --brand: #203E5E;
    --brand-2: #2C4A68;
    --on-brand: #EDEAE4;
    --accent: #C99562;
  }

  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  section[id] { scroll-margin-top: 72px; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.55;
  }
  .wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
  h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
  p { margin: 0; }
  a { color: inherit; }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
  .label {
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }

  /* Header */
  header.top {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 10;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
  .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
  .brand svg { width: 40px; height: 40px; flex: none; }
  .brand-name { font-family: var(--display); font-size: 20px; letter-spacing: 0.04em; color: var(--brand); }
  :root[data-theme="dark"] .brand-name { color: var(--ink); }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-name { color: var(--ink); } }
  .brand-name small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; color: var(--muted); margin-left: 6px; }
  nav.links { display: flex; gap: 24px; font-weight: 600; font-size: 15px; }
  nav.links a { text-decoration: none; color: var(--muted); }
  nav.links a:hover { color: var(--ink); }
  .btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 20px;
    background: var(--brand); color: var(--on-brand);
    border: 0; border-radius: 10px;
    font: 700 16px/1 var(--body);
    text-decoration: none; cursor: pointer;
    white-space: nowrap;
  }
  .btn:hover { background: var(--brand-2); }
  .btn:disabled { opacity: 0.45; cursor: not-allowed; }
  .btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
  .btn.ghost:hover { background: var(--surface); }
  .top .btn { padding: 10px 16px; font-size: 15px; }
  @media (max-width: 760px) { nav.links { display: none; } }

  /* Hero: formwork planks */
  .hero {
    background: var(--brand);
    color: var(--on-brand);
    background-image: repeating-linear-gradient(180deg, transparent 0 58px, rgba(255,255,255,0.055) 58px 92px);
  }
  .hero .wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; padding-block: 72px 80px; }
  .hero .label { color: rgba(231,228,222,0.72); }
  .hero h1 { font-size: clamp(38px, 6.2vw, 74px); margin-top: 18px; }
  .hero h1 em { font-style: normal; color: #D9B48A; }
  .hero p.lead { margin-top: 22px; font-size: 19px; max-width: 34em; color: rgba(237,234,228,0.88); }
  .hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
  .hero .btn { background: var(--cream); color: #1F3A57; }
  .hero .btn:hover { background: #fff; }
  .hero .btn.ghost { background: transparent; color: var(--on-brand); box-shadow: inset 0 0 0 2px rgba(237,234,228,0.55); }
  .hero .btn.ghost:hover { background: rgba(255,255,255,0.08); }
  .hero-mark { justify-self: center; width: min(100%, 340px); }
  .hero-mark svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 30px rgba(0,0,0,0.28)); }
  @media (max-width: 820px) {
    .hero .wrap { grid-template-columns: 1fr; padding-block: 48px 56px; gap: 36px; }
    .hero-mark { width: 180px; justify-self: start; order: -1; }
  }

  /* Status strip */
  .strip { border-bottom: 1px solid var(--line); background: var(--surface); }
  .strip .wrap { display: flex; flex-wrap: wrap; gap: 10px 32px; padding-block: 16px; font-size: 15px; align-items: center; }
  .status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
  .dot { width: 10px; height: 10px; border-radius: 50%; background: #9AA3AC; }
  .status.open .dot { background: #2F8F5B; box-shadow: 0 0 0 4px rgba(47,143,91,0.18); }
  .status.closed .dot { background: #B5533C; }
  .strip span.muted { color: var(--muted); }

  /* Sections */
  section.block { padding-block: 88px; }
  .sec-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: 44px; }
  .sec-head h2 { font-size: clamp(30px, 4vw, 44px); color: var(--ink); }
  .sec-head p { color: var(--muted); font-size: 18px; }

  .services { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .service {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
  }
  .service .swatch { height: 92px; }
  .service.electric .swatch {
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23F2C94C' d='M13.5 2 4 13.5h6.5L9 22l10-12h-6.6z'/%3E%3C/svg%3E") 28px center / 44px 44px no-repeat,
      linear-gradient(135deg, #1F3A57 0%, #2D5A87 100%);
  }
  .service.wood .swatch {
    background-color: #A87A4C;
    background-image:
      repeating-linear-gradient(90deg, rgba(60,35,15,0.16) 0 2px, transparent 2px 9px, rgba(255,230,200,0.10) 9px 11px, transparent 11px 23px);
  }
  .service .body { padding: 28px 28px 32px; display: grid; gap: 14px; }
  .service h3 { font-size: 28px; }
  .service p { color: var(--muted); }
  .service ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 0; }
  .service li { padding: 11px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: baseline; }
  .service li::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none; transform: translateY(-2px); }
  @media (max-width: 760px) { .services { grid-template-columns: 1fr; } }

  /* Process */
  .process-bg { background: var(--surface); border-block: 1px solid var(--line); }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: s; }
  .step { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 3px solid var(--brand); }
  :root[data-theme="dark"] .step { border-top-color: var(--accent); }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step { border-top-color: var(--accent); } }
  .step .label::before { counter-increment: s; content: counter(s) ". lépés"; }
  .step h3 { font-size: 22px; }
  .step p { color: var(--muted); }
  @media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

  /* Contact */
  .contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
  .card-dark {
    background: var(--brand); color: var(--on-brand);
    border-radius: 16px; padding: 32px;
    display: grid; gap: 22px;
  }
  .row { display: grid; gap: 6px; padding-bottom: 20px; border-bottom: 1px solid rgba(237,234,228,0.16); }
  .row:last-child { border-bottom: 0; padding-bottom: 0; }
  .row .label { color: rgba(237,234,228,0.65); }
  .row .val { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
  .row .big { font-family: var(--display); font-size: clamp(22px, 3.2vw, 30px); letter-spacing: 0.01em; text-decoration: none; word-break: break-word; }
  .row .big.small { font-family: var(--body); font-weight: 700; font-size: 21px; }
  .copy {
    font: 600 13px/1 var(--body);
    padding: 8px 12px; border-radius: 8px;
    background: rgba(255,255,255,0.10); color: var(--on-brand);
    border: 1px solid rgba(237,234,228,0.25); cursor: pointer;
  }
  .copy:hover { background: rgba(255,255,255,0.18); }
  .hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
  .hours td { padding: 6px 0; }
  .hours td:last-child { text-align: right; font-weight: 700; }
  .hours tr.today td { color: #D9B48A; }
  .hours tr.off td:last-child { font-weight: 400; opacity: 0.7; }

  .quote {
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px;
    display: grid; gap: 16px;
  }
  .quote h3 { font-size: 24px; }
  .quote p { color: var(--muted); }
  .quote ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
  .quote ol li::marker { font-family: var(--mono); color: var(--accent); }
  @media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }

  /* Calculator */
  .calc { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
  .calc-form, .calc-list {
    background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 28px;
    display: grid; gap: 20px;
  }
  .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
  .seg button {
    font: 700 16px/1 var(--body); padding: 12px; border-radius: 8px; border: 0; cursor: pointer;
    background: transparent; color: var(--muted);
  }
  .seg button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
  .field { display: grid; gap: 6px; }
  .field label { font-weight: 700; font-size: 15px; }
  .field .hint { font-size: 14px; color: var(--muted); }
  .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
  select, input[type="number"] {
    width: 100%; font: 400 17px/1.3 var(--body); color: var(--ink);
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  }
  .unit-in { position: relative; }
  .unit-in input { padding-right: 44px; }
  .unit-in span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 13px; color: var(--muted); pointer-events: none; }
  .check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
  .check input { width: 18px; height: 18px; accent-color: var(--accent); }
  .result {
    background: var(--brand); color: var(--on-brand); border-radius: 12px; padding: 20px 22px;
    display: grid; gap: 6px;
  }
  .result .label { color: rgba(237,234,228,0.68); }
  .result .price { font-family: var(--display); font-size: clamp(24px, 3.4vw, 32px); font-variant-numeric: tabular-nums; line-height: 1.15; }
  .result .qty { font-size: 15px; color: rgba(237,234,228,0.8); font-variant-numeric: tabular-nums; }
  .calc-list h3 { font-size: 22px; }
  .items { list-style: none; margin: 0; padding: 0; display: grid; }
  .items li { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
  .items .name { font-weight: 700; }
  .items .meta { grid-column: 1; font-size: 14px; color: var(--muted); }
  .items .amt { grid-row: 1 / span 2; grid-column: 2; font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; font-size: 15px; }
  .items .rm { grid-row: 1 / span 2; grid-column: 3; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
  .items .rm:hover { color: var(--ink); background: var(--surface); }
  .empty { color: var(--muted); font-size: 15px; padding: 14px 0; border-top: 1px solid var(--line); }
  .total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; border-top: 2px solid var(--ink); flex-wrap: wrap; }
  .total strong { font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; }
  .note { font-size: 14px; color: var(--muted); }
  .list-actions { display: flex; flex-wrap: wrap; gap: 10px; }
  .btn.small { padding: 10px 14px; font-size: 15px; }
  @media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
  .calc > * { min-width: 0; }
  select { max-width: 100%; text-overflow: ellipsis; }
  @media (max-width: 380px) { .brand-name small { display: none; } .top .btn { padding: 9px 12px; font-size: 14px; } .seg button { font-size: 14px; padding: 11px 6px; } }
  @media (max-width: 420px) { .calc-form, .calc-list, .card-dark, .quote { padding: 20px; } .service .body { padding: 22px 20px 26px; } }

  footer { border-top: 1px solid var(--line); }
  footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 28px; color: var(--muted); font-size: 14px; }

  .toast {
    position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    background: var(--ink); color: var(--bg);
    padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 15px;
  }

  /* WordPress admin sáv bejelentkezve */
  .admin-bar header.top { top: 32px; }
  @media (max-width: 782px) { .admin-bar header.top { top: 46px; } }
  @media (max-width: 600px) { .admin-bar header.top { top: 0; } }
