/* ============================================================
   Dolcsevita.hu – modern magazin design (mobil-first)
   ============================================================ */

:root {
  --brand:        #6b1b7a;   /* frissített lila márkaszín */
  --brand-dark:   #4c1157;
  --brand-light:  #f5ebf7;
  --accent:       #c9962e;   /* arany kiegészítő – "dolce vita" */
  --ink:          #211a24;
  --ink-soft:     #5d5364;
  --line:         #e9e2ec;
  --bg:           #fdfcfe;
  --card:         #ffffff;
  --radius:       14px;
  --shadow:       0 1px 2px rgba(40, 20, 50, .06), 0 8px 24px -12px rgba(40, 20, 50, .18);
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }

.wrap { max-width: 1140px; margin-inline: auto; padding-inline: 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Fejléc ---------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(40,20,50,.03);
}

.topbar-in {
  display: flex; align-items: center; gap: .75rem;
  padding-block: .55rem;
}

.logo { flex: 1; min-width: 0; }
.logo img { width: auto; max-height: 44px; }

.search { display: flex; align-items: center; gap: 0; }
.search input {
  font: inherit; font-size: .9rem;
  border: 1px solid var(--line); border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: .45rem .9rem;
  width: clamp(110px, 24vw, 240px);
  background: var(--bg); color: var(--ink);
  outline-offset: 2px;
}
.search button {
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  border-radius: 0 999px 999px 0;
  padding: .45rem .7rem; cursor: pointer; line-height: 1;
}
.search button:hover { background: var(--brand-dark); }
.search svg { display: block; }

/* Hamburger */
.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 0; cursor: pointer;
}
.burger span {
  display: block; height: 2.5px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
body.nav-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Navigáció – mobil: lenyíló panel */
.mainnav { display: none; border-top: 1px solid var(--line); background: var(--card); }
body.nav-open .mainnav { display: block; max-height: 75vh; overflow: auto; }

.nav-list { list-style: none; margin: 0; padding: .25rem 1rem .75rem; }
.nav-item { border-bottom: 1px solid var(--line); }
.nav-item:last-child { border-bottom: 0; }

.nav-top {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  width: 100%; padding: .7rem .25rem;
  background: none; border: 0; cursor: pointer;
  font: 600 .95rem var(--font-body); color: var(--ink);
  text-transform: uppercase; letter-spacing: .04em;
}
.nav-top svg { transition: transform .25s; flex: none; }
.nav-item.open > .nav-top svg { transform: rotate(180deg); }

.subnav { list-style: none; margin: 0; padding: 0 0 .5rem .75rem; display: none; }
.nav-item.open > .subnav { display: block; }
.subnav a {
  display: block; padding: .45rem .5rem;
  color: var(--ink-soft); border-radius: 8px;
}
.subnav a:hover { background: var(--brand-light); color: var(--brand-dark); text-decoration: none; }

/* Navigáció – asztali: vízszintes sor lenyílókkal */
@media (min-width: 900px) {
  .burger { display: none; }
  .mainnav { display: block !important; border-top: 1px solid var(--line); }
  .nav-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; padding: 0 1rem; margin-inline: auto; }
  .nav-item { border: 0; position: relative; }
  .nav-top { width: auto; padding: .65rem .8rem; }
  .nav-top:hover { color: var(--brand); }
  .subnav {
    position: absolute; left: 0; top: 100%; min-width: 210px;
    background: var(--card); border: 1px solid var(--line); border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow); padding: .4rem; z-index: 60;
  }
  .nav-item.open > .subnav { display: block; }
}

/* ---------- Tartalom ---------- */

.site-main { padding-block: 1.25rem 2.5rem; }

.section-title {
  display: flex; align-items: center; gap: .75rem;
  margin: 2rem 0 1rem;
}
.section-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* Vezércikk (hero) */
.hero {
  display: grid; gap: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-media { aspect-ratio: 16 / 9; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-body { padding: 1.25rem; }
.hero-body h1 a { color: inherit; }
.hero-lead { color: var(--ink-soft); }
@media (min-width: 800px) {
  .hero { grid-template-columns: 7fr 5fr; }
  .hero-media { aspect-ratio: auto; min-height: 320px; }
  .hero-body { padding: 2rem; align-self: center; }
}

/* Kártyarács */
.cardgrid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  margin: 0; padding: 0; list-style: none;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(40,20,50,.07), 0 16px 32px -12px rgba(40,20,50,.25); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--brand-light); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-light), #efe0f2);
  color: var(--brand); font-family: var(--font-display); font-size: 2rem; font-weight: 800;
}
.card-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.card-body h3 { margin: 0; }
.card-body h3 a { color: inherit; }
.card-body h3 a:hover { color: var(--brand); text-decoration: none; }
.card-excerpt { color: var(--ink-soft); font-size: .92rem; margin: 0; }

.badge {
  align-self: flex-start;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-light);
  padding: .2rem .6rem; border-radius: 999px;
}

/* Friss cikkek lista */
.latest { list-style: none; margin: 0; padding: 0; columns: 1; }
@media (min-width: 700px) { .latest { columns: 2; column-gap: 2.5rem; } }
.latest li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.latest a { display: block; padding: .55rem .25rem; color: var(--ink); font-weight: 600; }
.latest a:hover { color: var(--brand); text-decoration: none; }

/* ---------- Cikkoldal ---------- */

.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin: 0 0 1rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: .35rem; color: var(--line); }

.article { max-width: 760px; margin-inline: auto; }
.article-header { margin-bottom: 1.25rem; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
  color: var(--ink-soft); font-size: .88rem; margin-top: .5rem;
}
.article-lead {
  font-size: 1.12rem; color: var(--ink-soft); font-style: italic;
  border-left: 3px solid var(--accent); padding-left: 1rem; margin: 1rem 0;
}
.article-figure { margin: 1.25rem 0; }
.article-figure img { border-radius: var(--radius); width: 100%; }
.article-body { font-size: 1.05rem; }
.article-body img { border-radius: 10px; height: auto; margin-block: .75rem; }
.article-body table { max-width: 100%; }

.share { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.5rem 0; }
.share a, .share button {
  display: inline-flex; align-items: center; gap: .4rem;
  font: 600 .85rem var(--font-body);
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink); cursor: pointer;
  padding: .45rem .9rem;
}
.share a:hover, .share button:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* ---------- Rovatlista ---------- */

.rovat-head { margin-bottom: 1.25rem; }
.rovat-head .count { color: var(--ink-soft); font-size: .9rem; }

.list-card {
  display: grid; gap: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 1.1rem;
}
.list-card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--brand-light); }
.list-card-media img { width: 100%; height: 100%; object-fit: cover; }
.list-card-body { padding: 1rem 1.15rem 1.2rem; }
.list-card-body h2 { font-size: 1.3rem; margin-bottom: .35rem; }
.list-card-body h2 a { color: inherit; }
.list-card-body h2 a:hover { color: var(--brand); text-decoration: none; }
.list-card-sub { color: #b3261e; font-weight: 600; font-size: .95rem; margin: 0 0 .4rem; }
.list-card-excerpt { color: var(--ink-soft); margin: 0; }
.more-link { font-weight: 700; }
@media (min-width: 720px) {
  .list-card.has-media { grid-template-columns: 280px 1fr; }
  .list-card.has-media .list-card-media { aspect-ratio: auto; min-height: 100%; }
}

/* Lapozó */
.pager { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: 1.75rem 0 .5rem; }
.pager a, .pager .current {
  min-width: 2.4rem; text-align: center;
  padding: .45rem .7rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card);
  font-weight: 600; font-size: .92rem;
}
.pager a:hover { border-color: var(--brand); text-decoration: none; }
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Keresés ---------- */

.search-result { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.search-result h2 { font-size: 1.15rem; margin: 0 0 .25rem; }
.search-result .meta { color: var(--ink-soft); font-size: .85rem; }

/* ---------- Statikus / hiba ---------- */

.prose { max-width: 720px; margin-inline: auto; }
.error-page { text-align: center; padding: 3rem 1rem; }
.error-page .code { font-family: var(--font-display); font-size: 5rem; font-weight: 800; color: var(--brand-light); -webkit-text-stroke: 2px var(--brand); margin: 0; line-height: 1; }

/* ---------- Lábléc ---------- */

.site-footer {
  background: #241227; color: #d9cfe0; margin-top: 3rem;
  font-size: .92rem;
}
.site-footer a { color: #d9cfe0; }
.site-footer a:hover { color: #fff; }
.footer-in {
  display: grid; gap: 2rem; padding-block: 2.5rem 1.5rem;
}
.footer-logo { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: #fff; margin: 0 0 .5rem; }
.footer-logo span { color: var(--accent); }
.footer-nav { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.footer-col p { font-weight: 700; text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; color: #a893b3; margin: 0 0 .5rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .3rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.1rem;
}
.footer-bottom p { margin: 0; }
@media (min-width: 900px) {
  .footer-in { grid-template-columns: 280px 1fr; }
}

/* Hirdetésblokk helye */
.ad-slot { margin: 1.5rem auto; text-align: center; min-height: 0; }
