
:root{
  --bg:#f7fbff;
  --card:#ffffff;
  --text:#0b1220;
  --muted:#4b5a77;
  --border: rgba(12, 24, 48, .10);
  --shadow: 0 12px 40px rgba(12,24,48,.12);
  --r: 20px;

  --a:#7c3aed;   /* purple */
  --b:#06b6d4;   /* cyan */
  --c:#22c55e;   /* green */
  --d:#f97316;   /* orange */
  --e:#e11d48;   /* rose */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(1100px 520px at 18% -10%, rgba(124,58,237,.25), transparent 55%),
    radial-gradient(900px 520px at 80% 0%, rgba(6,182,212,.20), transparent 55%),
    radial-gradient(900px 520px at 70% 90%, rgba(34,197,94,.16), transparent 55%),
    linear-gradient(180deg, #ffffff, #f2f7ff 55%, #f9fbff);
}

a{color:inherit}
.wrap{max-width:1150px;margin:0 auto;padding:18px}
header{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(10px);
  background: rgba(247,251,255,.78);
  border-bottom: 1px solid var(--border);
}
.top{
  display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
}
.brand{display:flex; align-items:center; gap:12px}
.logo{
  width:44px;height:44px;border-radius:16px;
  background: conic-gradient(from 220deg, var(--a), var(--b), var(--c), var(--d), var(--e), var(--a));
  box-shadow: 0 18px 45px rgba(124,58,237,.20);
}
.brand h1{font-size:16px;margin:0}
.brand p{margin:0;color:var(--muted);font-size:12px}
nav{display:flex;gap:8px;flex-wrap:wrap}
nav a{
  text-decoration:none;
  padding:10px 12px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.80);
  box-shadow: 0 8px 22px rgba(12,24,48,.06);
  font-size:13px;
}
nav a:hover{transform: translateY(-1px)}
.hero{
  display:grid; gap:16px;
  grid-template-columns: 1.2fr .8fr;
  align-items:stretch;
  margin-top:14px;
}
@media (max-width:900px){.hero{grid-template-columns:1fr}}
.card{
  background: rgba(255,255,255,.90);
  border:1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.hero .left{padding:22px}
.kicker{
  display:inline-flex; align-items:center; gap:10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(124,58,237,.20);
  background: linear-gradient(90deg, rgba(124,58,237,.12), rgba(6,182,212,.10));
  font-size:12px;
}
.dot{width:10px;height:10px;border-radius:999px;background:linear-gradient(180deg,var(--c),var(--b))}
.h-title{margin:12px 0 8px;font-size:38px;line-height:1.10}
.h-sub{margin:0;color:var(--muted);max-width:68ch}
.pills{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.pill{
  padding:10px 12px;border-radius:14px;
  border:1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.72));
  font-size:13px;
}
.heroimg{
  min-height: 320px;
  border-radius: var(--r);
  overflow:hidden;
  position:relative;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  background:
    linear-gradient(140deg, rgba(255,255,255,.0), rgba(255,255,255,.72)),
    url("https://commons.wikimedia.org/wiki/Special:FilePath/Sziget.JPG") center/cover no-repeat;
}
.heroimg .cap{
  position:absolute; left:14px; right:14px; bottom:14px;
  padding:10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  border:1px solid var(--border);
  color:var(--muted);
  font-size:12px;
}
.grid{
  margin-top:16px;
  display:grid; gap:14px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width:900px){.grid{grid-template-columns:1fr}}
.section{padding:18px}
h2{margin:0 0 10px;font-size:18px}
p{margin:0 0 10px}
.muted{color:var(--muted)}
.list{margin:10px 0 0 18px;color:var(--muted)}
.tools{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  margin-top:10px;
}
select, input, button{
  border:1px solid var(--border);
  background: rgba(255,255,255,.90);
  padding:10px 12px;
  border-radius: 14px;
  font-size:14px;
  outline:none;
}
button{cursor:pointer}
button.primary{
  border-color: rgba(124,58,237,.25);
  background: linear-gradient(90deg, rgba(124,58,237,.18), rgba(6,182,212,.12));
}
.timeline{display:grid; gap:10px; margin-top:12px}
.event{
  display:grid; grid-template-columns: 90px 1fr;
  gap:12px;
  padding:14px;
  border-radius: 18px;
  border:1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.75));
}
@media (max-width:640px){.event{grid-template-columns:1fr}}
.year{
  font-weight:800;
  font-size:14px;
  width:fit-content;
  padding:8px 10px;
  border-radius: 14px;
  color:#0b1220;
  border:1px solid rgba(6,182,212,.25);
  background: linear-gradient(90deg, rgba(6,182,212,.18), rgba(34,197,94,.12));
}
.etitle{margin:0 0 6px;font-weight:800}
.tags{display:flex; flex-wrap:wrap; gap:8px; margin-top:8px}
.tag{
  font-size:12px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.92);
  color: var(--muted);
}
.gallery{
  display:grid; gap:10px;
  grid-template-columns: repeat(4, 1fr);
  margin-top:12px;
}
@media (max-width:950px){.gallery{grid-template-columns: repeat(2, 1fr)}}
@media (max-width:520px){.gallery{grid-template-columns: 1fr}}
figure{
  margin:0;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--border);
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 30px rgba(12,24,48,.08);
}
figure img{width:100%; height:190px; object-fit:cover; display:block}
figcaption{padding:10px 12px 12px;font-size:12px;color:var(--muted)}
.footer{
  margin-top:18px;
  padding:16px 18px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:12px;
}
.langcards{
  display:grid; gap:14px;
  grid-template-columns: repeat(3, 1fr);
  margin-top:16px;
}
@media (max-width:900px){.langcards{grid-template-columns:1fr}}
.lc{
  padding:18px;
  text-decoration:none;
  display:block;
}
.lc h2{margin:0 0 6px;font-size:18px}
.lc p{margin:0;color:var(--muted)}
.lc .bar{
  height:10px;border-radius:999px;margin-top:12px;
  background: linear-gradient(90deg, var(--a), var(--b), var(--c), var(--d), var(--e));
  opacity:.85;
}


/* --- v4 additions --- */
.langswitch a{
  text-decoration:none;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.88);
  font-size:12px;
}
.langswitch a.active{
  border-color: rgba(124,58,237,.30);
  background: linear-gradient(90deg, rgba(124,58,237,.20), rgba(6,182,212,.14));
  font-weight:800;
}
.filters{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  margin-top:10px;
}
.chip{
  cursor:pointer;
  user-select:none;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.90);
  font-size:12px;
  color: var(--muted);
}
.chip.active{
  color: var(--text);
  border-color: rgba(34,197,94,.35);
  background: linear-gradient(90deg, rgba(34,197,94,.18), rgba(6,182,212,.12));
  font-weight:800;
}

/* mobile-first tightening */
@media (max-width: 520px){
  .wrap{padding:14px}
  nav a{padding:9px 10px}
  .h-title{font-size:30px}
  .hero .left{padding:16px}
  .section{padding:14px}
  .heroimg{min-height:260px}
  figure img{height:170px}
}


/* --- Lightbox (v8) --- */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(11,18,32,.78);
  backdrop-filter: blur(6px);
}
.lightbox.open{display:flex;}
.lb-card{
  width:min(1100px, 96vw);
  max-height: 92vh;
  border-radius: 22px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  background: rgba(255,255,255,.96);
  display:flex;
  flex-direction:column;
}
.lb-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 12px;
  border-bottom:1px solid rgba(12,24,48,.10);
}
.lb-title{
  font-size: 12px;
  color: var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.lb-actions{display:flex; gap:8px; align-items:center;}
.lb-btn{
  cursor:pointer;
  border:1px solid rgba(12,24,48,.12);
  background: rgba(255,255,255,.92);
  border-radius: 14px;
  padding: 8px 10px;
  font-size: 12px;
}
.lb-btn:hover{transform: translateY(-1px);}
.lb-body{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(180deg, rgba(247,251,255,.6), rgba(255,255,255,.92));
  padding: 10px;
  flex: 1;
}
.lb-img{
  max-width: 100%;
  max-height: 74vh;
  border-radius: 16px;
  border:1px solid rgba(12,24,48,.10);
  background:#fff;
}
.lb-caption{
  padding: 10px 12px 12px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid rgba(12,24,48,.08);
}
.lb-nav{
  position:absolute;
  top: 50%;
  transform: translateY(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(11,18,32,.35);
  color: #fff;
  cursor:pointer;
  user-select:none;
}
.lb-nav:hover{background: rgba(11,18,32,.48);}
.lb-prev{left: 12px;}
.lb-next{right: 12px;}
@media (max-width: 520px){
  .lb-nav{width:38px;height:38px;}
  .lb-img{max-height: 68vh;}
}


/* --- Mobile language switcher placement (v14) --- */
@media (max-width: 520px){
  footer{
    display:flex;
    flex-direction:column;
  }
  #linksBlock{ order: 1; }
  .langswitch{ order: 2; margin-top: 14px; }
}
