/* uradne.sk – site chrome shared by both layouts: layout/public (before public-site.css) and layout/page (before
   app-theme.css). The single source of the design template's fonts and tokens and of the chrome: gov bar, dark
   header with its navigation and phone menu, the chrome's buttons and the dark footer. Markup:
   partial/public/{gov-bar,header,site-footer}.phtml and partial/app/header.phtml; behaviour: site-chrome.js.

   Only what both layouts share lives here; public-site.css has the public pages, app-theme.css the application's
   additions (wider column, the logged-in header's second row, account strip, admin bar, and the resets against
   the old style.css/Bootstrap rules that the public site does not load). */

/* Source Sans 3 (SIL Open Font License), the design template's font: one variable file per subset covers
   weights 400–700, as the template declares it (a heavier weight such as the h1's 900 renders at 700, as there). */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/css/assets/fonts/source-sans-3/source-sans-3-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/css/assets/fonts/source-sans-3/source-sans-3-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --p600: #072c66;
  --p500: #0b4199;
  --p400: #126dff;
  --p300: #88b3f6;
  --p200: #c3d9f9;
  --p100: #eff5fe;
  --n900: #212121;
  --n700: #616161;
  --n600: #757575;
  --n300: #e0e0e0;
  --n100: #f5f5f5;
  --alert: #c3112b;
  --alert-light: #fbeef0;
  --alert-dark: #4e0711;
  --positive: #078814;
  --positive-light: #ebf5ec;
  --positive-dark: #033608;
  --focus: #d96e00;

  --text: #000;
  --muted: #616161;
  --bg: #fff;
  --line: #e0e0e0;
  --radius: 8px;
  --wrap: 1180px;
  --gutter: max(20px, calc((100% - var(--wrap)) / 2 + 20px));

  --s1: 15px;
  --s2: 20px;
  --s3: 30px;
  --s4: 40px;
  --s5: 60px;
  --s6: 100px;
}

/* Focus: 3 px orange outline, offset 2 px (white on the dark chrome) */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; background: #fff; color: var(--p600); font-weight: 700;
}
.skip-link:focus { left: 10px; top: 10px; }

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

/* ---------- Gov bar (official domain) ---------- */
.gov-bar { background: var(--p100); color: var(--p600); font-size: 14px; line-height: 20px; border-bottom: 1px solid var(--p200); }
.gov-bar .wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s1); padding-top: 6px; padding-bottom: 6px; }
.gov-bar details { flex: 1; min-width: 0; }
.gov-bar summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px;
  color: var(--p600); padding: 4px 0;
}
.gov-bar summary::-webkit-details-marker { display: none; }
.gov-bar summary::after {
  content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.gov-bar details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.gov-bar summary strong { font-weight: 700; }
.gov-bar__info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); padding: var(--s1) 0 10px; max-width: 900px; }
.gov-bar__info p { margin: 0 0 4px; }
.gov-bar__lang { color: var(--p600); font-weight: 700; text-decoration: none; padding: 4px 0; }
.gov-bar__langs { display: flex; gap: 12px; }
.gov-bar__langs a { color: var(--p600); font-weight: 700; text-decoration: none; padding: 4px 0; }
.gov-bar__langs a:hover, .gov-bar__langs a.current { text-decoration: underline; }

/* ---------- Buttons ----------
   The public site's button, for the public pages (body.public-site) and the chrome of both layouts: the dark
   header and the application's account strip (partial/header-info). Scoped, because layout/page also loads
   Bootstrap, whose .btn the application's screens use. Before the header, whose own .btn rules override these. */
:is(.public-site, .site-header, .app-account) .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 11px 24px; border-radius: var(--radius); border: 2px solid var(--p400);
  font: inherit; font-weight: 700; font-size: 16px; line-height: 24px;
  text-decoration: none; cursor: pointer; text-align: center;
  background: var(--p400); color: #fff;
}
:is(.public-site, .site-header, .app-account) .btn:hover { background: var(--p500); border-color: var(--p500); color: #fff; }
:is(.public-site, .site-header, .app-account) .btn--secondary,
:is(.public-site, .site-header, .app-account) .btn--light { background: #fff; color: var(--p500); border-color: var(--p500); }
:is(.public-site, .site-header, .app-account) .btn--secondary:hover,
:is(.public-site, .site-header, .app-account) .btn--light:hover { background: var(--p100); border-color: var(--p500); color: var(--p600); }
:is(.public-site, .site-header, .app-account) .btn--small { min-height: 40px; padding: 7px 18px; }
:is(.public-site, .site-header, .app-account) .btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header (dark, one row on desktop) ----------
   DOM order: logo, menu button, nav, contacts and login buttons. That is also the visual order on desktop (the
   button is hidden) and on phones, so the opened menu comes right after its button in the focus order. (The
   template's markup has the contacts and buttons before the nav and reorders them with `order`.) */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; flex-wrap: wrap; column-gap: var(--s3);
  padding-inline: var(--gutter);
  background: var(--p600); color: #fff;
  box-shadow: 0 2px 8px rgba(7, 44, 102, .25);
}
.logo { display: inline-flex; align-items: center; flex-shrink: 0; padding: var(--s1) 0; }
.logo img { width: 170px; height: auto; filter: brightness(0) invert(1); }
.main-nav { flex: 1; min-width: 0; }
.header-actions { display: flex; align-items: center; gap: var(--s1); }
.header-contact { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.header-contact li { margin: 0; }
.header-contact a { display: inline-flex; align-items: center; text-decoration: none; }
.header-contact .txt { display: none; }
.header-contact img { width: 36px; height: 36px; background: var(--p400); border-radius: 50%; padding: 4px; }
.header-buttons { display: flex; gap: 10px; }
.site-header .btn { background: #fff; border-color: #fff; color: var(--p600); }
.site-header .btn:hover { background: var(--p100); border-color: var(--p100); color: var(--p600); }
.site-header .btn--secondary { background: transparent; color: #fff; border-color: #fff; }
.site-header .btn--secondary:hover { background: rgba(255, 255, 255, .14); border-color: #fff; color: #fff; }

.menu-btn {
  display: none; align-items: center; gap: 10px;
  padding: 8px 16px; border: 2px solid #fff; border-radius: var(--radius);
  font: inherit; font-weight: 700; font-size: 16px; line-height: 24px; color: #fff;
  background: transparent; cursor: pointer;
}
.menu-btn__icon { display: inline-block; width: 18px; height: 2px; background: currentColor; position: relative; }
.menu-btn__icon::before, .menu-btn__icon::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.menu-btn__icon::before { top: -6px; }
.menu-btn__icon::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-btn__icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__icon::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__icon::after { top: 0; transform: rotate(-45deg); }

.main-nav ul { display: flex; margin: 0; padding: 0; max-width: none; list-style: none; }
.main-nav li { margin: 0; }
.main-nav a {
  display: block; padding: 24px 15px 21px; font-weight: 700; font-size: 16px; line-height: 24px;
  color: #fff; text-decoration: none; border-bottom: 3px solid transparent;
}
.main-nav a:hover { color: #fff; border-bottom-color: var(--p300); }
.main-nav a[aria-current] { border-bottom-color: #fff; }
/* Prihlásenie and Registrácia in the phone menu, where the header's buttons are hidden. */
.main-nav .nav-portal { display: none; }

/* ---------- Footer (dark) ---------- */
.site-footer { background: var(--p600); color: #fff; font-size: 16px; line-height: 24px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr 1.2fr; gap: var(--s4); padding-top: var(--s5); padding-bottom: var(--s4); }
.footer-grid > div { min-width: 0; }
.site-footer h2 { font-size: 20px; line-height: 26px; margin-bottom: var(--s1); color: #fff; }
.site-footer h3 { font-size: 16px; line-height: 24px; margin: var(--s1) 0 6px; color: #fff; }
.site-footer h2 + h3 { margin-top: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #fff; display: inline-block; padding: 3px 0; min-height: 26px; }
.site-footer p a { display: inline; padding: 0; min-height: 0; }
.site-footer a:hover { color: #fff; text-decoration-thickness: 2px; }
.site-footer p { margin: 0 0 10px; }
.site-footer .muted { color: var(--p200); }
.site-footer .footer-spaced { margin-top: 14px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .25); padding-top: var(--s3); padding-bottom: var(--s3); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); }
.footer-bottom > div { display: grid; gap: 10px; max-width: 760px; min-width: 0; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-bottom li { margin: 0; }
.footer-bottom p { margin: 0; color: var(--p200); }
.footer-bottom p a { color: #fff; }
.footer-logo { width: 150px; height: auto; filter: brightness(0) invert(1); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-contact { display: none; }
  .site-header { column-gap: var(--s1); }
}

@media (max-width: 960px) {
  /* Row 1: logo … menu button; row 2: the nav, which holds Prihlásenie and Registrácia instead of the buttons. */
  .logo { margin-right: auto; }
  .header-actions { display: none; }
  .main-nav { order: 1; flex: 0 0 100%; border-top: 1px solid rgba(255, 255, 255, .25); }
  .main-nav ul { flex-direction: column; padding: 6px 0 var(--s1); }
  .main-nav a { padding: 12px 8px; border-bottom: 0; border-left: 4px solid transparent; }
  .main-nav a:hover { border-bottom-color: transparent; background: rgba(255, 255, 255, .1); }
  .main-nav a[aria-current] { border-left-color: #fff; background: rgba(255, 255, 255, .12); }
  .main-nav .nav-portal { display: block; }
  /* With JS the list collapses behind the menu button; without JS it stays open. */
  .js .menu-btn { display: inline-flex; }
  .js .main-nav { display: none; max-height: calc(100vh - 120px); overflow-y: auto; }
  .js .main-nav[data-open] { display: block; }
}

@media (max-width: 730px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .gov-bar__info { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .logo img { width: 150px; }
}
