/*
 * Dr. Jaczó Dániel Ügyvédi Iroda — reproduction site stylesheet.
 *
 * Written from scratch for the rebuild (mobile-first, with real responsive
 * breakpoints) rather than reusing the original html5blank theme CSS, which
 * used a fixed 1360px absolute-positioned layout and shipped every one of
 * its responsive @media blocks completely empty (a real defect on the live
 * site — see DISCOVERY.md §12). Brand colors, fonts and page structure are
 * kept faithful to the original.
 */

/* ---------- Fonts ---------- */

@font-face {
  font-family: 'Quarzo';
  src: url('/assets/fonts/Quarzo.woff') format('woff');
  font-display: swap;
}

/*
 * The original site also declares a 'CronosPro' webfont for some headings,
 * but the font files 404 on the live site (see DISCOVERY.md §4/§15#9), so
 * in practice it has never actually rendered there. We deliberately do not
 * source/license this font — see README "Known limitations" — and rely on
 * the same sans-serif fallback stack the live site already (accidentally)
 * falls back to, so there is no visual regression.
 *
 * Open Sans / Montserrat are loaded from Google Fonts, same as the live
 * site (see the <link> tags in header.php) — this was reverted from an
 * earlier system-font-only version: visual-fidelity vs. the live site is a
 * hard project requirement, and the real hosting environment has normal
 * internet access, so there is no good reason to deviate here. The system
 * stack is kept as the fallback while the webfont loads (or in the rare
 * case it fails to), matching the previous appearance in that scenario.
 */

:root {
  --accent: #f5863c;   /* orange */
  --accent-dark: #d96f28;
  --teal: #005471;     /* dark teal */
  --blue: #04a4cc;     /* brighter blue */
  --ink: #232323;
  --paper: #ffffff;
  --paper-muted: #f7f5f2;
  --border: #e2ddd4;
  --success-bg: #e9f7ef;
  --success-border: #57b979;
  --success-ink: #1e6b3c;
  --error-bg: #fdecea;
  --error-border: #e2685c;
  --error-ink: #9c2c22;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, Helvetica, sans-serif;
  --font-display: 'Quarzo', cursive;
  --header-min: 260px;
}

/*
 * Retro/Modern style switcher — see includes/header.php (markup + hero
 * data attributes), assets/js/main.js (click handling + hero image swap)
 * and DISCOVERY.md §5 (the live site's original behavior). This is a
 * simplified reproduction: instead of swapping two entire stylesheets, it
 * re-points the same accent/font custom properties already used
 * throughout this file — which, combined with the JS-driven hero photo
 * swap, is enough to recreate a real, visible before/after difference
 * (buttons, links, footer, page title all re-tint; body switches from
 * sans-serif to serif) without maintaining a second full stylesheet.
 * Colors are drawn from the live site's own retro.css palette (`#614719`
 * brown accent, serif body font) vs. modern.css's (`#f5863c` orange,
 * Open Sans).
 */
.retro-mode {
  --accent: #8a6a2f;
  --accent-dark: #614719;
  --font-body: 'Times New Roman', Times, serif;
}
.retro-mode .site-header--plain {
  background: linear-gradient(135deg, #614719, #3a2a0f);
}

/* ---------- Reset-ish basics ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); text-decoration: underline; }
a:hover, a:focus { color: var(--accent); }

h1, h2, h3 { line-height: 1.25; color: var(--teal); }
h1 { font-size: 1.9rem; margin: 0 0 .5em; }
h2 { font-size: 1.4rem; margin: 1.4em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 .4em; }

p { margin: 0 0 1em; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- Header / hero ---------- */

.site-header {
  position: relative;
  background-color: var(--teal);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  min-height: var(--header-min);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,20,28,.72) 0%, rgba(0,20,28,.35) 45%, rgba(0,20,28,.72) 100%);
  pointer-events: none;
}

.site-header--plain {
  background-image: none !important;
  background: linear-gradient(135deg, var(--teal), #013847);
  min-height: 150px;
}
.site-header--plain::before { display: none; }

.site-header__bar {
  position: relative;
  z-index: 1;
  padding: 14px 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.logo img { border-radius: 6px; }
.logo__text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.25;
}
.logo:hover, .logo:focus { color: var(--accent); }

/* Hamburger — hidden on wide screens */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 4px;
  width: 44px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: #fff;
}

.site-nav {
  width: 100%;
  order: 3;
  display: none;
}
.site-nav.is-open { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav > ul:first-child {
  border-top: 1px solid rgba(255,255,255,.25);
  margin-top: 12px;
  padding-top: 8px;
}

.site-nav li a,
.site-nav li span {
  display: block;
  padding: 10px 4px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .02em;
}
.site-nav li a:hover,
.site-nav li a:focus,
.site-nav li.is-current a {
  color: var(--accent);
}

.lang-switch {
  display: flex;
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,.25);
  margin-top: 8px !important;
  padding-top: 8px;
}
.lang-switch li a,
.lang-switch li span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  font-weight: 400;
  font-size: .92rem;
}
.lang-switch img { border-radius: 2px; }
.lang-switch li.is-current a,
.lang-switch li.is-current span { color: var(--accent); }

.style-switch {
  display: flex;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,.25);
  margin-top: 8px !important;
  padding-top: 8px;
}
.style-switch__btn {
  background: none;
  border: 0;
  padding: 6px 0;
  font: inherit;
  font-size: .92rem;
  color: #fff;
  cursor: pointer;
  text-decoration: underline;
}
.style-switch__btn:hover,
.style-switch__btn:focus { color: var(--accent); }
.style-switch__btn[data-style="modern"] { font-weight: 700; }
.retro-mode .style-switch__btn[data-style="modern"] { font-weight: 400; }
.retro-mode .style-switch__btn[data-style="retro"] { font-weight: 700; }

.page-title {
  position: relative;
  z-index: 1;
  color: #fff;
  margin: 0;
  padding: 18px 0 26px;
  font-size: 1.7rem;
}

/* ---------- Main content ---------- */

main {
  padding: 32px 0 48px;
}

main :first-child { margin-top: 0; }

.lede { font-size: 1.05rem; }

.content-block + .content-block { margin-top: 2rem; }

/* Practice-areas accordion, built with native <details>/<summary> — no JS
   required, fully keyboard/screen-reader accessible out of the box. */
.practice-list {
  border-top: 1px solid var(--border);
}
.practice-list details {
  border-bottom: 1px solid var(--border);
}
.practice-list summary {
  cursor: pointer;
  padding: 14px 4px;
  font-weight: 700;
  color: var(--teal);
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.practice-list summary::-webkit-details-marker { display: none; }
.practice-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 700;
}
.practice-list details[open] summary::after { content: "\2212"; }
.practice-list details[open] summary { color: var(--accent-dark); }
.practice-list .practice-body {
  padding: 0 4px 18px;
  color: var(--ink);
}

/* Downloads list (szoftverjog PDFs) */
.downloads {
  list-style: none;
  margin: 1.2em 0;
  padding: 0;
}
.downloads li {
  padding: 10px 0 10px 30px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.downloads li::before {
  content: "\1F4C4";
  position: absolute;
  left: 0;
}

/* Address / contact block */
.info-card {
  background: var(--paper-muted);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 18px 20px;
  border-radius: 4px;
}
.info-card p { margin: 0 0 .4em; }
.info-card p:last-child { margin-bottom: 0; }

.two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
}
.two-col > .info-card { flex: 1 1 260px; }
.two-col > .form-col { flex: 2 1 360px; }

/* Map */
.map-frame {
  border: 0;
  width: 100%;
  height: 380px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

/* ---------- Forms ---------- */

.contact-form .field { margin-bottom: 16px; }
.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--teal);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(4,164,204,.2);
}
.contact-form textarea { min-height: 140px; resize: vertical; }

/* Honeypot: kept in normal document flow (not display:none) so most spam
   bots that only skip hidden/off-screen fields still fill it in, but placed
   off-canvas and unreachable by keyboard/AT for real visitors. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover, .btn:focus { background: var(--accent-dark); color: #fff; }

.notice {
  padding: 14px 18px;
  border-radius: 4px;
  border: 1px solid;
  margin-bottom: 20px;
  font-weight: 600;
}
.notice--success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-ink);
}
.notice--error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-ink);
}

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

.site-footer {
  background: var(--accent);
  color: #fff;
  padding: 22px 0;
  margin-top: 40px;
}
.site-footer__inner { text-align: center; }
.footer-nav {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 0;
}
.footer-nav li { display: flex; align-items: center; }
.footer-nav li + li::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  background: rgba(255,255,255,.6);
  margin: 0 12px;
}
.footer-nav a {
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: .04em;
  font-weight: 700;
}
.footer-nav a:hover, .footer-nav a:focus { color: var(--teal); }

.site-footer .copyright,
.site-footer .dizajn {
  margin: 2px 0;
  font-size: .82rem;
}

/* ---------- 404 page ---------- */

.error-page {
  text-align: center;
  padding: 40px 0 60px;
}
.error-page .error-code {
  font-size: 5rem;
  color: var(--accent);
  font-family: var(--font-display);
  margin: 0;
}

/* ---------- Responsive breakpoints ----------
   The original theme shipped 320/480/768/1024/1140/1280px @media blocks
   that were all completely empty (a real defect — see DISCOVERY.md §12).
   These are filled in with real, working rules. Mobile-first: base styles
   above already work down to ~320px; the rules below progressively unlock
   the wider desktop layout. */

@media (min-width: 480px) {
  .page-title { font-size: 2rem; }
}

@media (min-width: 700px) {
  .contact-form #two-column {
    display: flex;
    gap: 24px;
  }
  .contact-form #left,
  .contact-form #right { flex: 1 1 0; }
}

@media (min-width: 768px) {
  :root { --header-min: 360px; }

  .nav-toggle { display: none; }

  .site-nav {
    display: flex !important;
    order: 0;
    width: auto;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
  }
  .site-nav > ul:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
  .site-nav ul { display: flex; gap: 18px; }
  .site-nav li a, .site-nav li span { padding: 6px 2px; }

  .lang-switch {
    border-top: 0;
    margin-top: 0 !important;
    padding-top: 0;
    margin-left: 12px;
  }

  .page-title { font-size: 2.3rem; padding-bottom: 34px; }

  main { padding: 48px 0 64px; }
}

@media (min-width: 1024px) {
  .wrap { padding: 0 32px; }
  h1 { font-size: 2.1rem; }
}
