:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #5f6c7b;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --border: #e5e7eb;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  /* Kotvy z menu (#skolenia …) nech nezajdú pod lepiacu hlavičku.
     Hodnota = jej najväčšia výška na šírke, kde sa lepí (viď @media nižšie). */
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
  background: #eef2ff;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
}

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.container.narrow {
  width: min(calc(100% - 2rem), 720px);
}

/* Nadpis, ktorý na obrazovke netreba, ale čítačke a osnove stránky chýba. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

/* Na užšej obrazovke sa hlavička zalamuje a je vysoká — lepiaca by zaberala
   veľkú časť displeja a jej výška by sa nedala pokryť jedným scroll-padding. */
@media (max-width: 900px) {
  html {
    scroll-padding-top: 0;
  }

  .site-header {
    position: static;
  }
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 100%;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo-title {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.3;
}

.logo-subtitle {
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--muted);
}

nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.hero {
  padding: 5rem 0 4rem;
}

.lead {
  max-width: 42rem;
  font-size: 1.375rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.hero-areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2.5rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text);
}

.hero-areas > li,
#skolenia .card {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.hero-areas > .hero-area-featured {
  background: #eff6ff;
  border: 3px solid var(--accent);
  padding: calc(1.25rem - 2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.hero-areas > .hero-area-security,
#skolenia .training-card-company {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.hero-areas > .hero-area-cloud,
#skolenia .training-card-individual {
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.hero-areas > .hero-area-networks {
  background: #fffbeb;
  border-color: #fde68a;
}

.hero-area-featured strong {
  color: var(--accent-dark);
  font-size: 1.2rem;
}

@media (max-width: 520px) {
  .hero-areas {
    grid-template-columns: 1fr;
  }
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.button:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.button-secondary {
  background: var(--surface);
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: none;
}

.button-secondary:hover {
  background: #eff6ff;
  color: var(--accent-dark);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

#skolenia .cards {
  grid-template-columns: minmax(0, 1fr);
}

#skolenia .card {
  font-size: 1.125rem;
  line-height: 1.55;
  box-shadow: none;
}

#skolenia .card h3 {
  font-size: 1.125rem;
}

#skolenia .card p {
  color: var(--text);
}

#skolenia h2,
#gopase h2 {
  text-align: center;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.feature-list {
  margin: 1.25rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

/* ---------- tlač ---------- */

@media print {
  /* Hlavička nesie nadpis stránky (h1) — tlačí sa, len bez menu. */
  .site-header nav,
  .site-footer {
    display: none;
  }

  .site-header {
    position: static;
    background: none;
    backdrop-filter: none;
  }

  body {
    background: #fff;
  }

  .section {
    padding: 1rem 0;
    break-inside: avoid;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

.gopase-intro {
  max-width: 42rem;
}

.section {
  padding: 4rem 0;
}

/* Kontakt nemá viditeľný nadpis — plná medzera nad ním pôsobila
   ako prázdne miesto pod sekciou O mne. */
#kontakt {
  padding-top: 0;
}

.section-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  align-items: start;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.section-pair > .section > .container {
  width: 100%;
}

@media (max-width: 900px) {
  .section-pair {
    grid-template-columns: 1fr;
  }
}

.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section h1,
.section h2 {
  margin-top: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-heading {
  margin-bottom: 2rem;
}

.site-footer {
  padding: 2rem 0 3rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 3.5rem;
  }
}
