:root{ --gap:14px; }

/* =========================
   GLOBAL RESET + FIX OVERFLOW
   ========================= */
*, *::before, *::after{ box-sizing:border-box; }

html, body{
  margin:0;
  padding:0;
  overflow-x:hidden;
}

body{
  font-family:system-ui;
  color:#111;
  background:#fff;
}

a{ color:inherit; text-decoration:none; }

/* =========================
   CONTAINER – FULL WIDTH
   ========================= */
.container{
  max-width:none;
  width:100%;
  margin:0 auto;
  padding:28px;
  overflow:visible;
}

@media (max-width:700px){
  .container{ padding:16px; }
}

/* =========================
   HEADER (TITLU + BUTON)
   ========================= */
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  width:100%;
  margin-bottom: 6px;
}

.top > div:first-child{
  min-width:0;
  flex:1 1 auto;
}

.top > a.btn,
.top .btn{
  flex:0 0 auto;
  white-space:nowrap;
}

.h1{
  font-size:28px;
  margin:0;
  line-height:1.15;
}

.meta{
  color:#666;
  font-size:14px;
  margin-top:6px;
}

.btn{
  display:inline-block;
  border:1px solid #eee;
  border-radius:10px;
  padding:10px 14px;
  background:#fff;
  max-width:100%;
}

@media (max-width:700px){
  .top{ flex-wrap:nowrap; gap:10px; }
  .h1{ font-size:22px; }
  .btn{ padding:9px 12px; }
}

@media (max-width:420px){
  .top{ flex-wrap:wrap; }
  .top > a.btn{ margin-top:8px; }
}

/* =========================
   JUSTIFIED GRID (stânga -> dreapta pe rânduri)
   ========================= */
.justified{ width:100%; margin-top:12px; }

.jrow{
  display:flex;
  gap:var(--gap);
  margin-bottom:var(--gap);
  align-items:stretch;
}

.jitem{
  flex:0 0 auto;
  border-radius:14px;
  overflow:hidden;
  background:#f3f3f3;
}

.jlink{
  display:block;
  width:100%;
  height:100%;
  cursor:zoom-in;
  position:relative;
}

.jitem img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  user-select:none;
  -webkit-user-drag:none;
}

.jitem picture{ display:block; width:100%; height:100%; }

.jbadge{
  position:absolute;
  right:10px;
  bottom:10px;
  background:rgba(0,0,0,.55);
  color:#fff;
  padding:4px 8px;
  border-radius:10px;
  font-size:12px;
  font-weight:700;
}

.loader{
  margin-top:14px;
  color:#666;
  font-size:13px;
}

/* =========================
   LISTA GALERII (cards)
   ========================= */
.cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}

@media (max-width:900px){
  .cards{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:520px){
  .cards{ grid-template-columns:1fr; }
}

.card{
  border:1px solid #eee;
  border-radius:14px;
  padding:16px;
}

.card .t{ font-weight:600; }
.card .s{ color:#666;font-size:14px;margin-top:6px; }

/* =========================
   COVER LIST (cards--cover)
   ========================= */
.cards--cover{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top:18px;
  align-items:flex-start;
}

.card--cover{
  display:inline-flex;
  flex-direction:column;
  align-items:stretch;

  border:1px solid #eee;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 6px 22px rgba(0,0,0,.06);

  width:auto;
  max-width:100%;
}

.card--cover .cover{
  height:220px;
  width:auto;
  background:#f1f1f1;

  display:flex;
  align-items:center;
  justify-content:center;
}

.card--cover .cover picture{
  height:100%;
  width:auto;
  max-width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.card--cover .cover img{
  height:100% !important;
  width:auto !important;

  max-width:100% !important;
  max-height:100% !important;

  object-fit:contain !important;
  object-position:center !important;

  display:block !important;
}

.card--cover .nocover{
  height:220px;
  width:320px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  color:#666;
}

.card--cover .t{
  padding:12px 12px 2px;
  font-weight:800;
  font-size:16px;
  text-align:center;
}

.card--cover .s{
  padding:0 12px 12px;
  font-size:13px;
  color:#666;
  text-align:center;
}

@media (max-width:900px){
  .card--cover .cover{ height:200px; }
  .card--cover .nocover{ height:200px; }
}
@media (max-width:540px){
  .card--cover .cover{ height:190px; }
  .card--cover .nocover{ height:190px; }
}

/* =========================
   VIDEO BLOCK
   ========================= */
.video-wrap{ margin:14px 0 18px; }
.video-box{
  border:1px solid #eee;
  border-radius:18px;
  overflow:hidden;
  background:#000;
}
.video-yt{ position:relative; padding-top:56.25%; }
.video-yt iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.video-hls video{ width:100%; height:auto; display:block; }
.video-note{ font-size:12px; opacity:.7; margin-top:8px; }

/* =========================
   BACK TO TOP
   ========================= */
.back-to-top{
  position:fixed;
  right:22px;
  bottom:22px;
  width:46px;
  height:46px;
  border-radius:50%;
  background:#111;
  color:#fff;
  border:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  opacity:0;
  visibility:hidden;
  transform:translateY(10px);
  transition:.25s;
  z-index:99999;
}

.back-to-top.show{
  opacity:.85;
  visibility:visible;
  transform:translateY(0);
}

.back-to-top:hover{ opacity:1; }

@media (max-width:600px){
  .back-to-top{
    width:40px;
    height:40px;
    font-size:18px;
    right:16px;
    bottom:16px;
  }
}

/* =========================
   FOOTER
   ========================= */
.footer{
  margin:30px 0 0;
  color:#777;
  font-size:13px;
}
