/* Budapest Hősei – arculat az útmutató (InDesign) alapján */
:root {
  --navy: #12326E;
  --navy-dark: #0D2452;
  --cyan: #0EA6CE;
  --gold: #D2B37C;
  --gold-light: #F3ECDC;
  --ink: #12326E;
  --muted: #5B6B8A;
  --bg: #FFFFFF;
  --bg-soft: #F5F7FB;
  --line: #D2B37C;
  --danger: #B3261E;
  --ok: #1E7F4F;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Source Sans 3", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  font-size: 17px; line-height: 1.45; font-weight: 600;
}
a { color: var(--cyan); }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.1; }
h1 { font-weight: 900; text-transform: uppercase; letter-spacing: .01em; }
h2 { color: var(--cyan); font-weight: 900; text-transform: uppercase; font-size: 1.7rem; }
h3 { color: var(--navy); font-weight: 900; font-size: 1.2rem; }
p { margin: 0 0 .8rem; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .9rem; }

/* fejléc */
.hero { background: var(--navy); color: #fff; padding: 2rem 0 0; position: relative; overflow: hidden; }
.hero .wrap { display: flex; flex-direction: column; gap: 1.2rem; padding-bottom: 2.2rem; }
.hero .logo { height: 40px; color: #fff; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); margin: 0; }
.hero .sub { font-size: clamp(1.2rem, 3vw, 1.9rem); font-weight: 700; font-style: italic; text-transform: uppercase; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; background: #fff;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}
.hero.compact { padding-top: 1rem; }
.hero.compact .wrap { padding-bottom: 1.4rem; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hero.compact h1 { font-size: 1.6rem; }
.hero.compact .sub { font-size: .9rem; }
.hero.compact::after { height: 24px; }
.hero .nav a { color: #fff; text-decoration: none; margin-left: 1rem; font-weight: 700; }
.hero .nav a:hover { color: var(--gold); }
.hero .nav form { display: inline; }
.hero .nav button { background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; padding: .3rem .8rem; border-radius: 6px; cursor: pointer; margin-left: 1rem; font: inherit; font-weight: 700; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 1.2rem; }
main { padding: 2.2rem 0 3rem; }

/* szekciók */
.section { padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.lead-icon { color: var(--gold); width: 38px; height: 38px; margin-bottom: .4rem; display: block; }
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; font-size: 1.05rem; padding-bottom: 1.6rem; border-bottom: 2px solid var(--line); box-shadow: 0 3px 0 -1px var(--line); margin-bottom: .6rem; }
@media (max-width: 700px) { .intro { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 1rem 0; }
.tile { text-align: center; padding: .6rem .6rem; border-left: 1px solid var(--gold); font-size: .95rem; }
.tile:first-child { border-left: 0; }
.tile .ico { width: 42px; height: 42px; color: var(--gold); display: block; margin: 0 auto .5rem; }
@media (max-width: 700px) { .tile { border-left: 0; border-top: 1px solid var(--gold-light); } }

.ico { display: inline-block; vertical-align: middle; fill: currentColor; }
ul.plain { padding-left: 1.2rem; }

/* kártyák, gombok, űrlapok */
.card { background: var(--bg-soft); border: 1px solid #E3E8F2; border-radius: var(--radius); padding: 1.4rem; margin: 1rem 0; }
.card.gold { background: var(--gold-light); border-color: var(--gold); }
.card h3 { margin-top: 0; }
.btn { display: inline-block; background: var(--cyan); color: #fff; border: 0; border-radius: 8px; padding: .7rem 1.4rem;
       font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: #0c8fb3; }
.btn.navy { background: var(--navy); }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: .35rem .8rem; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-weight: 700; margin: .8rem 0 .3rem; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=number], input[type=search], textarea, select {
  width: 100%; padding: .65rem .8rem; font: inherit; font-weight: 400; border: 1.5px solid #B9C3D6; border-radius: 8px; background: #fff; color: #10203f;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--cyan); border-color: var(--cyan); }
input.code { font-family: ui-monospace, Consolas, monospace; font-size: 1.3rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
textarea { min-height: 220px; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin: .8rem 0; }
.check input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; }
.help { font-size: .9rem; color: var(--muted); font-weight: 400; margin-top: .2rem; }
.alert { padding: .8rem 1rem; border-radius: 8px; margin: 1rem 0; font-weight: 600; }
.alert.error { background: #FBE9E7; color: var(--danger); border: 1px solid #F0B8B3; }
.alert.ok { background: #E6F4EC; color: var(--ok); border: 1px solid #B6DEC7; }
.alert.info { background: #E8F6FA; color: #0b7796; border: 1px solid #B8E3EF; }

/* állapotsáv */
.phase { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; padding: 0; list-style: none; }
.phase li { flex: 1 1 130px; text-align: center; padding: .5rem .4rem; border-radius: 6px; background: var(--bg-soft); color: var(--muted); font-size: .9rem; font-weight: 700; }
.phase li.done { background: var(--gold-light); color: var(--navy); }
.phase li.active { background: var(--cyan); color: #fff; }

/* jelöltek */
.cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.cand { border: 2px solid #E3E8F2; border-radius: var(--radius); padding: 1.1rem; background: #fff; position: relative; }
.cand:has(input:checked) { border-color: var(--cyan); box-shadow: 0 0 0 3px #B8E3EF; }
.cand input[type=radio] { position: absolute; top: 1rem; right: 1rem; width: 1.3rem; height: 1.3rem; }
.cand img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 8px; margin-bottom: .6rem; }
.cand .story { font-weight: 400; font-size: .95rem; max-height: 9.5em; overflow: hidden; position: relative; }
.cand .story.open { max-height: none; }
.cand .more { font-size: .9rem; cursor: pointer; color: var(--cyan); background: none; border: 0; padding: 0; font-weight: 700; }
.cand label { margin: 0; cursor: pointer; }

/* táblázatok */
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid #E3E8F2; vertical-align: top; }
th { color: var(--navy); background: var(--bg-soft); font-weight: 900; }
td { font-weight: 400; }
.table-wrap { overflow-x: auto; }
.bar { height: 10px; background: var(--gold-light); border-radius: 5px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--cyan); }

/* admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.admin-nav a { display: block; padding: .5rem .9rem; border-radius: 8px; background: var(--bg-soft); color: var(--navy); text-decoration: none; font-weight: 700; }
.admin-nav a.active, .admin-nav a:hover { background: var(--navy); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1rem 0; }
.stat { background: var(--bg-soft); border-radius: var(--radius); padding: .9rem; }
.stat b { display: block; font-size: 2rem; color: var(--cyan); font-weight: 900; line-height: 1; }
.stat span { color: var(--muted); font-size: .9rem; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.inline-form { display: inline; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--gold-light); color: var(--navy); }
.badge.ok { background: #E6F4EC; color: var(--ok); }
.badge.warn { background: #FBE9E7; color: var(--danger); }
.codebox { font-family: ui-monospace, Consolas, monospace; font-size: 2rem; letter-spacing: .1em; background: var(--gold-light); padding: 1rem; border-radius: 8px; text-align: center; color: var(--navy); }
pre { white-space: pre-wrap; font-weight: 400; }
.story-box { background: #fff; border: 1px solid #E3E8F2; border-left: 4px solid var(--gold); padding: 1rem; border-radius: 6px; margin: .8rem 0; font-weight: 400; }
.counter { text-align: right; font-size: .85rem; color: var(--muted); }

footer { background: var(--bg-soft); padding: 1.6rem 0; text-align: center; color: var(--muted); font-size: .9rem; font-weight: 400; }
footer .logo { height: 34px; color: var(--navy); display: block; margin: 0 auto .6rem; }
footer a { color: var(--navy); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; align-items: center; }
.suggest { position: relative; }
.suggest ul { position: absolute; z-index: 5; left: 0; right: 0; background: #fff; border: 1px solid #B9C3D6; border-radius: 8px; list-style: none; margin: 2px 0 0; padding: .2rem 0; max-height: 260px; overflow: auto; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.suggest li { padding: .5rem .8rem; cursor: pointer; font-weight: 400; }
.suggest li:hover, .suggest li.hl { background: var(--gold-light); }
.suggest li small { color: var(--muted); display: block; }
.chosen { background: var(--gold-light); border-radius: 8px; padding: .6rem .9rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
