/* ============================================
   NIS2 Felkészültség-mérő — Stíluskészlet
   Színek: Navy, Gold, White
   Fontok: Playfair Display (display) + Montserrat (body)
   ============================================ */

:root {
  /* Színpaletta */
  --navy: #0a1f44;
  --navy-light: #1a3163;
  --navy-dark: #061230;
  --gold: #c9a44c;
  --gold-light: #e2c374;
  --gold-dark: #9c7c2e;
  --white: #ffffff;
  --off-white: #f8f6f1;
  --grey-100: #f3f3f0;
  --grey-200: #e6e4dc;
  --grey-400: #a8a59b;
  --grey-600: #555248;
  --grey-800: #2b2a26;

  /* Státusz színek */
  --success: #2d7a3e;
  --warning: #b8860b;
  --danger: #a8323b;

  /* Tipográfia */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Méretezés */
  --radius: 6px;
  --shadow-sm: 0 2px 8px rgba(10, 31, 68, 0.08);
  --shadow-md: 0 6px 20px rgba(10, 31, 68, 0.12);
  --shadow-lg: 0 16px 48px rgba(10, 31, 68, 0.16);

  /* Layout */
  --container: 1100px;
  --header-height: 72px;
}

/* === Globális === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey-800);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-weight: 500; }

p { margin: 0 0 1em; }

a {
  color: var(--gold-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
a:hover { border-color: var(--gold); }

/* === Konténerek === */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header === */
.site-header {
  background: var(--navy);
  color: var(--white);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  border: none;
}
.brand:hover { border: none; color: var(--gold-light); }

.brand-logo {
  width: 38px; height: 38px;
}

.brand-sub {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-top: 2px;
}

.user-bar {
  font-size: .85rem;
  color: var(--off-white);
  text-align: right;
}
.user-bar strong { color: var(--gold-light); font-weight: 600; }
.user-bar small { display: block; color: var(--grey-400); font-size: .72rem; }

/* === Disclaimer szalag === */
.disclaimer {
  background: var(--gold);
  color: var(--navy-dark);
  text-align: center;
  padding: 10px 20px;
  font-size: .85rem;
  font-weight: 500;
  border-bottom: 1px solid var(--gold-dark);
}
.disclaimer strong { font-weight: 700; }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 400px; height: 100%;
  background: radial-gradient(circle at 70% 50%, rgba(201,164,76,.18), transparent 70%);
  pointer-events: none;
}
.hero h1 { color: var(--white); }
.hero h1 .accent { color: var(--gold); font-style: italic; }
.hero p.lead { font-size: 1.15rem; color: var(--off-white); max-width: 620px; }
.hero .container { position: relative; z-index: 1; }

/* === Kártya === */
.card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.card-title {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

/* === Form === */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--navy);
  font-size: .92rem;
}

label .req { color: var(--danger); }

input[type=text],
input[type=email],
input[type=number],
input[type=password],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--grey-800);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,164,76,.18);
}

.field-hint { font-size: .8rem; color: var(--grey-600); margin-top: 4px; }

/* === Gombok === */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .18s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-secondary:hover {
  background: var(--navy-light);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--grey-600);
  border-color: var(--grey-200);
}
.btn-ghost:hover {
  background: var(--grey-100);
  color: var(--navy);
}

.btn-block { display: block; width: 100%; text-align: center; }
.btn-large { padding: 16px 32px; font-size: 1.05rem; }
.btn-small { padding: 8px 16px; font-size: .85rem; }

/* === Sticky save button === */
.floating-save {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  padding: 14px 24px;
  background: var(--gold);
  color: var(--navy);
  border: 2px solid var(--gold-dark);
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
}
.floating-save:hover { background: var(--gold-light); }
.floating-save .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  display: inline-block; animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .3; }
}

/* === Progress bar === */
.progress-wrap {
  background: var(--grey-100);
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
  margin: 14px 0;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 999px;
  transition: width .4s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--grey-600);
  margin-top: 4px;
}

/* === Szint indikátor === */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.level-alapveto    { background: #e6f0ff; color: #1a4585; }
.level-optimalis   { background: #fef3d4; color: #7c5a0a; }
.level-teljeskoru  { background: #f5e0d4; color: #7c2a0a; }

/* === Kérdés tétel === */
.question-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--grey-200);
}
.question-item:last-child { border-bottom: none; }

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.question-text {
  flex: 1;
  font-weight: 500;
  color: var(--grey-800);
}
.question-id {
  font-family: 'Courier New', monospace;
  font-size: .8rem;
  color: var(--gold-dark);
  font-weight: 700;
  margin-right: 8px;
}
.question-law {
  font-size: .75rem;
  color: var(--grey-600);
  margin-top: 4px;
  font-style: italic;
}

.scale-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.scale-options label {
  cursor: pointer;
  padding: 8px 4px;
  text-align: center;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  background: var(--white);
  font-size: .78rem;
  font-weight: 500;
  color: var(--grey-600);
  transition: all .15s ease;
  margin: 0;
}
.scale-options input { display: none; }
.scale-options label:hover { border-color: var(--gold); color: var(--navy); }
.scale-options input:checked + span {
  display: block;
}
.scale-options label.selected {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.scale-options label.selected.score-100 { background: var(--success); border-color: var(--success); }
.scale-options label.selected.score-75  { background: #4a8a59; border-color: #4a8a59; }
.scale-options label.selected.score-50  { background: var(--warning); border-color: var(--warning); }
.scale-options label.selected.score-25  { background: #c47a4a; border-color: #c47a4a; }
.scale-options label.selected.score-0   { background: var(--danger); border-color: var(--danger); }
.scale-options label.selected.score-na  { background: var(--grey-400); border-color: var(--grey-400); }

@media (max-width: 700px) {
  .scale-options { grid-template-columns: repeat(3, 1fr); }
}

/* === Kategória szekció === */
.category-section {
  margin-bottom: 32px;
}
.category-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.category-section h2::before {
  content: "";
  width: 36px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

/* === Eredmény oldal === */
.result-hero {
  background: var(--navy);
  color: var(--white);
  padding: 50px 0 40px;
  text-align: center;
  border-bottom: 4px solid var(--gold);
}
.result-hero h1 { color: var(--white); margin-bottom: 8px; }
.result-hero .stars {
  font-size: 3.5rem;
  color: var(--gold);
  letter-spacing: .1em;
  margin: 16px 0 8px;
}
.result-hero .stars .empty { color: rgba(255,255,255,.18); }
.result-hero .level-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gold-light);
}
.result-hero .overall {
  font-size: 1.1rem;
  color: var(--off-white);
  margin-top: 16px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 30px 0;
}
.score-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  border-top: 4px solid var(--gold);
}
.score-card h3 { margin: 0 0 8px; font-size: 1rem; font-family: var(--font-body); color: var(--grey-600); font-weight: 500; }
.score-card .value {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.score-card .label { font-size: .82rem; color: var(--grey-600); margin-top: 4px; }
.score-card.passed { border-top-color: var(--success); }
.score-card.passed .value { color: var(--success); }
.score-card.failed { border-top-color: var(--danger); }
.score-card.failed .value { color: var(--danger); }

.category-results table {
  width: 100%;
  border-collapse: collapse;
}
.category-results th,
.category-results td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--grey-200);
  font-size: .9rem;
}
.category-results th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.category-results td.score-cell {
  font-weight: 700;
  text-align: right;
  font-family: 'Courier New', monospace;
}

.action-list {
  list-style: none;
  padding: 0;
}
.action-list li {
  padding: 14px 18px;
  background: var(--off-white);
  border-left: 4px solid var(--gold);
  margin-bottom: 8px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .92rem;
}
.action-list li.priority-high { border-left-color: var(--danger); }
.action-list li.priority-med { border-left-color: var(--warning); }
.action-list li.priority-low { border-left-color: var(--success); }
.action-list li .prio {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 8px;
  background: var(--danger);
  color: var(--white);
}
.action-list li.priority-med .prio { background: var(--warning); }
.action-list li.priority-low .prio { background: var(--success); }

/* === Toast üzenet === */
.toast {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 200;
  padding: 14px 22px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: .9rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all .25s ease;
  pointer-events: none;
  border-left: 4px solid var(--gold);
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

/* === Modal === */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,31,68,.7);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--gold);
}
.modal h2 { margin-top: 0; }
.modal .modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-end;
}

.pin-display {
  background: var(--navy);
  color: var(--gold);
  font-family: 'Courier New', monospace;
  font-size: 2.6rem;
  letter-spacing: .5em;
  text-align: center;
  padding: 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  font-weight: 700;
}

/* === Footer === */
.site-footer {
  background: var(--navy-dark);
  color: var(--grey-400);
  padding: 30px 0;
  margin-top: 60px;
  text-align: center;
  font-size: .85rem;
}
.site-footer a { color: var(--gold); border: none; }

/* === Diagnosis / check tooltips === */
.check-warning {
  background: #fff5e0;
  border-left: 4px solid var(--warning);
  padding: 12px 18px;
  margin: 16px 0;
  font-size: .9rem;
  color: var(--grey-800);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.check-error {
  background: #fde9eb;
  border-left: 4px solid var(--danger);
  padding: 12px 18px;
  margin: 16px 0;
  font-size: .9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.check-success {
  background: #e8f5ec;
  border-left: 4px solid var(--success);
  padding: 12px 18px;
  margin: 16px 0;
  font-size: .9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* === Util === */
.text-center { text-align: center; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.muted { color: var(--grey-600); font-size: .9rem; }

@media print {
  .site-header, .site-footer, .floating-save, .btn, .no-print { display: none !important; }
  body { background: var(--white); }
  .card { box-shadow: none; border: 1px solid var(--grey-200); }
}
