/* fontoslinkek.hu – mobile-first */

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

body {
  margin: 0;
  background: #f5f4ef;
  color: #1a1c1b;
  font: 400 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: #1a1c1b; text-decoration: none; }
a:hover { color: #146c43; text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #146c43; outline-offset: 2px; }

h1, h2, .logo { font-family: "Bricolage Grotesque", Inter, sans-serif; letter-spacing: -0.02em; }

.icon { flex: none; }

.sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* Fejléc */
.top { background: #fff; border-bottom: 1px solid #e3e1d9; }
.top-in { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-size: 24px; font-weight: 800; color: #1a1c1b; }
.logo span { color: #146c43; }
.logo:hover { text-decoration: none; color: #1a1c1b; }
.today { margin: 0; font-size: 14px; color: #5e615c; }
.today strong { color: #1a1c1b; font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 4px 12px;
  border: 1px solid #e3e1d9; border-radius: 999px;
  font-size: 13px; color: #5e615c;
}
.pill strong { color: #1a1c1b; }

/* Kereső */
.hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 32px; padding-bottom: 24px; text-align: center; }
.hero h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 800; }
.lead { margin: 0; color: #5e615c; font-size: 16px; max-width: 560px; }

.search {
  display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 720px; margin-top: 6px;
  padding: 4px 4px 4px 16px;
  background: #fff; border: 2px solid #1a1c1b; border-radius: 999px;
  box-shadow: 0 6px 24px rgba(26, 28, 27, 0.08);
  color: #5e615c;
}
.search input {
  flex: 1; min-width: 0; padding: 10px 2px;
  border: 0; outline: none; background: transparent;
  font: inherit; font-size: 17px; color: #1a1c1b;
}
.search input:focus-visible { outline: none; }
.search:focus-within { border-color: #146c43; }
.search input::-webkit-search-cancel-button { display: none; }
.search button {
  min-height: 46px; padding: 0 18px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: #146c43; color: #fff;
  font: inherit; font-size: 16px; font-weight: 600;
}
.search button:hover { background: #0f5434; }

.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 760px; }
.quick a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  background: #fff; border: 1px solid #e3e1d9; border-radius: 999px;
  font-size: 14px; font-weight: 500;
}

/* Segélyhívók */
.sos { background: #1a1c1b; color: #fff; border-radius: 14px; padding: 16px 18px; margin-bottom: 20px; }
.sos h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 18px; }
.sos ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.sos a { display: flex; align-items: baseline; gap: 8px; min-height: 32px; color: #fff; }
.sos strong { white-space: nowrap; font-family: "Bricolage Grotesque", Inter, sans-serif; font-size: 19px; font-weight: 800; }
.sos span { font-size: 13px; color: #d4d6d1; }
.sos a:hover span { color: #fff; }

/* Kártyák – a script.js teszi masonry-vé (grid + row span), sorrend megmarad */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; padding-bottom: 40px; }
.cards.masonry { grid-auto-rows: 4px; row-gap: 0; }

.card { background: #fff; border: 1px solid #e3e1d9; border-radius: 14px; padding: 16px 18px 6px; box-shadow: 0 6px 2px -6px #e3e1d9; }
.card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 19px; font-weight: 700; }
.card h2 .icon { color: #146c43; }
.card ul { list-style: none; margin: 0; padding: 0; }
.card li { border-top: 1px solid #efede6; }
.card a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; font-weight: 500; }
.card small { min-width: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 400; color: #6a6d67; white-space: nowrap; }

/* Hírek kártya – a címek több sorba törhetnek, előttük az időpont */
.news a { justify-content: flex-start; gap: 10px; line-height: 1.3; }
.news time { flex: none; width: 38px; font-size: 12.5px; font-weight: 400; color: #6a6d67; font-variant-numeric: tabular-nums; }
.news-more { margin: 0; padding: 10px 0; border-top: 1px solid #efede6; font-size: 13px; }
.news-more a { display: inline; padding: 0; color: #146c43; font-weight: 600; }
.news-more a:hover { color: #0f5434; }

/* Lábléc */
.foot { background: #fff; border-top: 1px solid #e3e1d9; font-size: 14px; color: #5e615c; }
.foot-in { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; padding-bottom: 24px; }
.foot p { margin: 0; }
.foot a { color: #5e615c; text-decoration: underline; }
.foot a:hover { color: #146c43; }
.foot nav { display: flex; gap: 18px; }

/* Tablet */
@media (min-width: 640px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .hero { padding-top: 48px; padding-bottom: 32px; }
  .hero h1 { font-size: 36px; }
  .search { padding-left: 20px; }
  .search button { padding: 0 26px; }
  .sos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 18px 22px; }
  .sos h2 { margin: 0; }
  .sos ul { display: flex; flex-wrap: wrap; gap: 6px 22px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

/* Desktop */
@media (min-width: 960px) {
  .top-in { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
  .logo { font-size: 26px; }
  .pills { margin-top: 0; }
  .hero { padding-top: 56px; padding-bottom: 36px; }
  .hero h1 { font-size: 42px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-in { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 1200px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Aloldalak (impresszum, adatvédelem) */
.page { max-width: 780px; padding-top: 28px; padding-bottom: 48px; }
.page h1 { margin: 0 0 16px; font-size: 30px; line-height: 1.2; font-weight: 800; }
.page h2 { margin: 32px 0 10px; font-size: 20px; line-height: 1.2; font-weight: 700; }
.page p, .page ul, .page dl { margin: 0 0 12px; }
.page ul { padding-left: 20px; }
.page li { margin-bottom: 4px; }
.page a { color: #146c43; text-decoration: underline; }
.page a:hover { color: #0f5434; }
.page .updated { margin-top: -8px; font-size: 14px; color: #6a6d67; }
.page dl { background: #fff; border: 1px solid #e3e1d9; border-radius: 14px; padding: 14px 18px; }
.page dt { margin-top: 8px; font-size: 13px; font-weight: 600; color: #5e615c; }
.page dt:first-child { margin-top: 0; }
.page dd { margin: 0; overflow-wrap: anywhere; }
.page-links { margin-top: 32px !important; padding-top: 16px; border-top: 1px solid #e3e1d9; font-size: 14px; color: #5e615c; }

@media (min-width: 640px) {
  .page { padding-top: 40px; }
  .page h1 { font-size: 38px; }
  .page dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; padding: 16px 22px; }
  .page dt { margin-top: 0; font-size: 14px; }
}
