/* ------------------------------------------------------------------ */
/*  Fonturi — aceleasi ca pe elodi.ro, gazduite local (zero apeluri    */
/*  externe catre Google).                                             */
/* ------------------------------------------------------------------ */
@import url("fonts/fonts.css");

/* ------------------------------------------------------------------ */
/*  Paleta — identica cu elodi.ro                                      */
/* ------------------------------------------------------------------ */
:root {
  --bg:        #faf8f3;
  --cream:     #f6f2e9;
  --surface:   #ffffff;
  --ink:       #1c1917;
  --ink-soft:  #57534e;
  --line:      #e8e2d6;
  --accent:    #5a8068;
  --accent-dk: #466451;
  --accent-bg: #e9efe9;
  --ok:        #466451;
  --err:       #a3402f;
  --radius:    14px;
  --shadow:    0 4px 14px rgba(40,34,26,.07);
  --bar-h:     72px;
  --font-head: 'Outfit', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 0 calc(var(--bar-h) + 24px);
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
}

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

/* ------------------------------------------------------------------ */
/*  Antet                                                              */
/* ------------------------------------------------------------------ */
.masthead {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 22px;
  text-align: center;
}
.brand {
  display: inline-block;
  margin-bottom: 18px;
}
.brand img {
  width: 210px;
  height: auto;
}
.masthead h1 {
  font-family: var(--font-head);
  margin: 0 0 8px;
  font-size: clamp(26px, 4.4vw, 38px);
  font-weight: 650;
  letter-spacing: -.015em;
}
.intro {
  margin: 0 auto;
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 15.5px;
}

/* ------------------------------------------------------------------ */
/*  Bannere                                                            */
/* ------------------------------------------------------------------ */
.banner {
  max-width: 640px;
  margin: 0 auto 28px;
  padding: 16px 20px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 550;
}
.banner-voted  { background: var(--accent-bg); color: var(--ok); border: 1px solid #cfdccf; }
.banner-closed { background: var(--cream); color: var(--ink-soft); border: 1px solid var(--line); }

/* ------------------------------------------------------------------ */
/*  Taburi                                                             */
/* ------------------------------------------------------------------ */
.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 6px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(var(--bg) 72%, transparent);
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.tab:hover { border-color: #d6cfc0; color: var(--ink); }
.tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.tab-count {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 650;
  text-align: center;
}
.tab.is-active .tab-count { background: rgba(255,255,255,.22); color: #fff; }
.tab-count.has { background: var(--accent); color: #fff; }

/* ------------------------------------------------------------------ */
/*  Panouri + grila                                                    */
/* ------------------------------------------------------------------ */
.panel { max-width: 1180px; margin: 0 auto; padding: 8px 20px 0; }

.panel-head { margin: 14px 0 22px; }
.panel-head h2 { font-family: var(--font-head); margin: 0 0 4px; font-size: 21px; font-weight: 600; }
.panel-head p  { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card { position: relative; }

.card-pick { display: block; cursor: pointer; }
.card-pick input { position: absolute; opacity: 0; width: 0; height: 0; }

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.card-pick:hover .card-media { transform: translateY(-2px); border-color: #d6cfc0; }

.card-pick input:focus-visible + .card-media {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* bifa */
.tick {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  transition: background .15s, border-color .15s, transform .15s;
}
.tick::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-1px) rotate(45deg);
  opacity: 0;
  transition: opacity .12s;
}
.card-pick input:checked + .card-media {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg), var(--shadow);
}
.card-pick input:checked + .card-media .tick {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}
.card-pick input:checked + .card-media .tick::after { opacity: 1; }

.card-title {
  display: block;
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}
.card-pick input:checked ~ .card-title { color: var(--ink); font-weight: 550; }

.zoom {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.card:hover .zoom, .zoom:focus-visible { opacity: 1; }
@media (hover: none) { .zoom { opacity: 1; } }

.panel-foot { padding: 30px 0 12px; text-align: center; }

/* ------------------------------------------------------------------ */
/*  Butoane                                                            */
/* ------------------------------------------------------------------ */
.btn {
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-family: var(--font-head);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: #d6cfc0; }

/* ------------------------------------------------------------------ */
/*  Bara de trimitere                                                  */
/* ------------------------------------------------------------------ */
.submitbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.submitbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  min-height: var(--bar-h);
}
.tally { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.tally strong { color: var(--ink); font-size: 18px; }

.err {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 12px;
  color: var(--err);
  font-size: 14px;
}

/* ------------------------------------------------------------------ */
/*  Multumire                                                          */
/* ------------------------------------------------------------------ */
.thanks {
  max-width: 520px;
  margin: 40px auto;
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.thanks h2 { font-family: var(--font-head); margin: 0 0 8px; font-size: 24px; }
.thanks p  { margin: 0 0 6px; color: var(--ink-soft); }
.thanks-share { margin-top: 20px !important; }
.thanks .btn { margin-top: 10px; }

/* ------------------------------------------------------------------ */
/*  Lightbox                                                           */
/* ------------------------------------------------------------------ */
/* `display:flex` bate regula implicita a browserului pentru [hidden],
   asa ca ascunderea trebuie declarata explicit. */
[hidden] { display: none !important; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(28,25,22,.88);
}
.lightbox figure { margin: 0; max-height: 100%; text-align: center; }
.lightbox img {
  max-height: 78vh;
  width: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
}
.lightbox figcaption {
  margin-top: 14px;
  color: #f2ece4;
  font-size: 14.5px;
}
.lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.26); }

/* ------------------------------------------------------------------ */
/*  Mobil                                                              */
/* ------------------------------------------------------------------ */
@media (max-width: 640px) {
  .masthead { padding: 26px 18px 16px; }
  .panel, .tabs, .submitbar-inner { padding-left: 16px; padding-right: 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .tab-label { max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
  .submitbar-inner { padding-top: 12px; padding-bottom: 12px; }
  .btn-primary { padding: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ------------------------------------------------------------------ */
/*  Indiciu in bara de trimitere (ce categorie mai lipseste)           */
/* ------------------------------------------------------------------ */
.tally-wrap { min-width: 0; }
.hint {
  margin: 2px 0 0;
  color: var(--accent-dk);
  font-size: 13.5px;
  line-height: 1.35;
}
