/* Master Company Service Kft. – közös arculat a szabályzat-oldalakhoz.
   Színek a logóból: piros #E30613, szürke #8A8B8D. */
:root {
  --red: #E30613;
  --red-dark: #B5050F;
  --red-soft: #FDEDEE;
  --ink: #1C1F24;
  --graphite: #23272E;
  --graphite-2: #2E333B;
  --text: #3A4049;
  --muted: #6B7280;
  --logo-grey: #8A8B8D;
  --line: #E5E7EB;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --green: #1E8E3E;
  --green-soft: #E8F5EC;
  --amber: #B86A00;
  --amber-soft: #FFF4E0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .12);
  --f-display: 'Montserrat', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); }
strong { color: var(--ink); font-weight: 600; }

/* ---------- Navigáció ---------- */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  padding: .85rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: border-color .25s, box-shadow .25s;
}
nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(16, 24, 40, .06); }
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 38px; width: auto; display: block; }
.nav-back {
  font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  transition: border-color .2s, color .2s, background .2s;
  white-space: nowrap;
}
.nav-back:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* ---------- Fejléc ---------- */
.page-header {
  position: relative; overflow: hidden;
  background: var(--graphite);
  color: #fff;
  padding: 4.5rem 2rem 3.5rem;
}
/* a logó "tető" motívuma, nagyban, a fejléc jobb oldalán */
.page-header::before {
  content: '';
  position: absolute; right: -60px; bottom: -40px;
  width: 520px; height: 300px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 300'%3E%3Cpath d='M20 290 L260 70 L500 290' fill='none' stroke='%23E30613' stroke-width='34' stroke-linejoin='miter'/%3E%3Cg fill='%23ffffff' opacity='.18'%3E%3Crect x='232' y='200' width='24' height='24'/%3E%3Crect x='264' y='200' width='24' height='24'/%3E%3Crect x='232' y='232' width='24' height='24'/%3E%3Crect x='264' y='232' width='24' height='24'/%3E%3C/g%3E%3C/svg%3E") no-repeat right bottom / contain;
  opacity: .9;
  animation: roof-in 1s cubic-bezier(.2, .8, .2, 1) both;
}
.page-header::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 85% 100%, rgba(227, 6, 19, .22), transparent 70%);
  pointer-events: none;
}
.header-inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: var(--red);
  padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1.2rem;
}
h1 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -.02em;
  color: #fff; margin-bottom: 1rem; max-width: 720px;
}
.header-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.header-meta span {
  font-size: .8rem; color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  padding: .3rem .75rem; border-radius: 999px;
}
.header-lead { font-size: 1.08rem; color: rgba(255, 255, 255, .78); max-width: 620px; line-height: 1.7; }

/* ---------- Tartalom ---------- */
.content-wrap { max-width: 900px; margin: 0 auto; padding: 2.5rem 2rem 5rem; }

.doc-section {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 2.2rem 2.4rem; margin-bottom: 1.5rem;
}
h2 {
  font-family: var(--f-display); font-size: 1.35rem; font-weight: 800;
  color: var(--ink); letter-spacing: -.01em; line-height: 1.3;
  margin-bottom: 1.1rem; display: flex; align-items: center; gap: .8rem;
}
h2 .sec-num {
  flex-shrink: 0; display: inline-grid; place-items: center;
  min-width: 2.2rem; height: 2.2rem; padding: 0 .4rem;
  font-size: .8rem; font-weight: 800; color: #fff; background: var(--red);
  border-radius: 10px;
}
.content-wrap > h2 { margin: 2.5rem 0 1rem; }
.content-wrap > h2:first-child { margin-top: 0; }
h3 { font-family: var(--f-display); font-size: 1rem; font-weight: 700; color: var(--ink); margin: 1.6rem 0 .6rem; }
p { font-size: .96rem; margin-bottom: .8rem; }
p:last-child { margin-bottom: 0; }

/* Tartalomjegyzék */
.toc {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.6rem 2rem; margin-bottom: 1.5rem; border-left: 4px solid var(--red);
}
.toc-title { font-family: var(--f-display); font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: .8rem; }
.toc ol { padding-left: 1.3rem; display: grid; grid-template-columns: 1fr 1fr; gap: .25rem 2rem; }
.toc li { font-size: .9rem; }
.toc li::marker { color: var(--logo-grey); font-weight: 600; }
.toc a { color: var(--text); text-decoration: none; transition: color .2s; }
.toc a:hover { color: var(--red); }

/* Táblázat */
.data-table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.2rem 0;
  font-size: .88rem; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
.data-table th {
  background: var(--bg); color: var(--muted); font-weight: 700; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; text-align: left;
  padding: .8rem 1rem; border-bottom: 1px solid var(--line);
}
.data-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #FAFAFB; }
.data-table td:first-child { color: var(--ink); font-weight: 600; }

/* Szabálylisták */
.rule-list { list-style: none; display: flex; flex-direction: column; gap: .65rem; margin: 1rem 0; }
.rule-list li { font-size: .93rem; padding-left: 2.1rem; position: relative; line-height: 1.6; }
.rule-list li::before {
  position: absolute; left: 0; top: .05rem;
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 800;
}
.rule-list.do li::before { content: '✓'; color: var(--green); background: var(--green-soft); }
.rule-list.dont li::before { content: '✕'; color: var(--red); background: var(--red-soft); }
.rule-list.info li::before { content: '›'; color: var(--red); background: var(--red-soft); font-size: 1rem; line-height: 1; }

/* Kiemelések */
.highlight-box, .alert-box { border-radius: var(--radius-sm); padding: 1.1rem 1.4rem; margin: 1.2rem 0; }
.highlight-box { background: var(--bg); border-left: 4px solid var(--logo-grey); }
.content-wrap > .highlight-box { background: var(--card); box-shadow: var(--shadow); border-left-color: var(--red); margin: 0 0 1.5rem; }
.alert-box { background: var(--red-soft); border-left: 4px solid var(--red); }
.highlight-box p, .alert-box p { font-size: .9rem; margin: 0; }
.alert-box strong { color: var(--red-dark); }

/* Lépések */
.steps { display: flex; flex-direction: column; gap: .9rem; margin: 1rem 0; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--red); color: #fff; font-family: var(--f-display); font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(227, 6, 19, .25);
}
.step-text { font-size: .93rem; padding-top: .3rem; line-height: 1.6; }

/* Kapcsolati blokkok */
.contact-block {
  display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.2rem;
}
.contact-block-item { background: var(--bg); border-radius: var(--radius-sm); padding: .9rem 1.1rem; font-size: .92rem; }
.content-wrap > .contact-block .contact-block-item { background: var(--card); box-shadow: var(--shadow); }
.contact-block-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.contact-block-val { color: var(--ink); font-weight: 600; text-decoration: none; word-break: break-word; }
a.contact-block-val:hover { color: var(--red); }

.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.contact-card { background: var(--bg); border-radius: var(--radius-sm); padding: 1.3rem 1.4rem; }
.contact-card-title { font-family: var(--f-display); font-weight: 800; color: var(--ink); margin-bottom: .8rem; }
.contact-card-item { margin-bottom: .7rem; font-size: .9rem; }
.contact-card-item:last-child { margin-bottom: 0; }
.contact-card-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-card-val { color: var(--ink); font-weight: 600; text-decoration: none; }
a.contact-card-val:hover { color: var(--red); }

/* Kártyarácsok: kockázatok, jogok, értékek, folyamat */
.risk-grid, .rights-grid, .values-grid, .process-grid { display: grid; gap: 1rem; margin: 1.2rem 0; }
.risk-grid, .rights-grid { grid-template-columns: 1fr 1fr; }
.values-grid, .process-grid { grid-template-columns: repeat(3, 1fr); }
.process-grid { grid-template-columns: repeat(4, 1fr); }

.risk-card, .right-card, .value-card, .process-step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.2rem 1.3rem; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.risk-card:hover, .right-card:hover, .value-card:hover, .process-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.risk-card { border-top: 4px solid var(--logo-grey); }
.risk-card.high { border-top-color: var(--red); }
.risk-card.med { border-top-color: var(--amber); }
.risk-card.low { border-top-color: var(--green); }
.risk-level { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .4rem; }
.risk-card.high .risk-level { color: var(--red); }
.risk-card.med .risk-level { color: var(--amber); }
.risk-card.low .risk-level { color: var(--green); }
.risk-title, .right-card-title, .value-title, .process-title { font-family: var(--f-display); font-weight: 700; color: var(--ink); margin-bottom: .35rem; line-height: 1.35; }
.risk-text, .right-card-text, .value-text, .process-text { font-size: .86rem; color: var(--muted); line-height: 1.6; }
.value-icon { font-size: 1.6rem; display: block; margin-bottom: .5rem; }
.process-num {
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--red); color: #fff;
  font-family: var(--f-display); font-weight: 800; display: grid; place-items: center; margin-bottom: .6rem;
}
.values-grid { margin-top: 0; margin-bottom: 1.5rem; }
.content-wrap > .values-grid .value-card { border: none; box-shadow: var(--shadow); }

.pledge {
  position: relative; background: var(--graphite); color: #fff;
  border-radius: var(--radius); padding: 2.2rem 2.4rem 2.2rem 4.2rem; margin: 1.5rem 0;
}
.pledge::before {
  content: '“'; position: absolute; left: 1.4rem; top: .6rem;
  font-family: Georgia, serif; font-size: 4rem; color: var(--red); line-height: 1;
}
.pledge p { color: rgba(255, 255, 255, .88); font-size: 1.02rem; font-style: italic; margin: 0; }
.pledge strong { color: #fff; }

/* Nyitóoldal: dokumentumkártyák */
.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1rem; }
.doc-card {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem; text-decoration: none; color: inherit;
  border: 1px solid transparent;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(227, 6, 19, .35); }
.doc-icon {
  flex-shrink: 0; width: 3rem; height: 3rem; border-radius: 12px;
  background: var(--red-soft); display: grid; place-items: center; font-size: 1.4rem;
  transition: background .25s, transform .25s;
}
.doc-card:hover .doc-icon { background: var(--red); transform: rotate(-6deg) scale(1.05); }
.doc-title { font-family: var(--f-display); font-weight: 800; font-size: 1.02rem; color: var(--ink); margin-bottom: .25rem; }
.doc-text { font-size: .86rem; color: var(--muted); line-height: 1.55; }
.doc-arrow { margin-left: auto; align-self: center; color: var(--red); font-weight: 800; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s; }
.doc-card:hover .doc-arrow { opacity: 1; transform: translateX(0); }

.app-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.5rem; padding: 1.6rem 2rem; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--graphite) 0%, var(--graphite-2) 100%); color: #fff;
}
.app-cta p { color: rgba(255, 255, 255, .8); margin: 0; }
.app-cta strong { color: #fff; display: block; font-family: var(--f-display); font-size: 1.1rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--red); color: #fff; text-decoration: none; font-weight: 700; font-size: .92rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(227, 6, 19, .35);
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--red-dark); transform: translateY(-2px); }

/* Lábléc */
footer {
  background: var(--graphite); color: rgba(255, 255, 255, .55);
  text-align: center; font-size: .8rem; padding: 1.6rem 2rem;
  border-top: 4px solid var(--red);
}
footer a { color: rgba(255, 255, 255, .8); }

/* ---------- Animációk ---------- */
@keyframes roof-in { from { opacity: 0; transform: translateY(40px); } to { opacity: .9; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Mobil ---------- */
@media (max-width: 720px) {
  nav { padding: .7rem 1rem; }
  .nav-logo img { height: 30px; }
  .nav-back { font-size: .78rem; padding: .4rem .8rem; }
  .page-header { padding: 3rem 1rem 2.5rem; }
  .page-header::before { width: 230px; height: 135px; right: -60px; bottom: -30px; opacity: .3; animation: none; }
  .content-wrap { padding: 1.5rem 1rem 3.5rem; }
  .doc-section { padding: 1.5rem 1.2rem; }
  .toc { padding: 1.3rem 1.2rem; }
  .toc ol, .contact-block, .contact-cards, .risk-grid, .rights-grid, .values-grid, .process-grid, .doc-grid { grid-template-columns: 1fr; }
  .data-table { display: block; overflow-x: auto; }
  .pledge { padding: 1.8rem 1.4rem 1.8rem 3.4rem; }
  .app-cta { padding: 1.4rem 1.2rem; }
}

/* ---------- Nyomtatás ---------- */
@media print {
  nav, .nav-back, .app-cta, .page-header::before, .page-header::after { display: none !important; }
  body { background: #fff; }
  .page-header { background: #fff; color: var(--ink); padding: 0 0 1rem; border-bottom: 3px solid var(--red); }
  h1 { color: var(--ink); }
  .header-meta span { color: var(--text); border-color: var(--line); background: none; }
  .doc-section, .toc, .content-wrap > .highlight-box { box-shadow: none; border: 1px solid var(--line); break-inside: avoid; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
