/* =========================
   Central bar • style.css
   Clean + responsive
   ========================= */

/* ---- Theme ---- */
:root{
  --bg: #070b12;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.12);
  --border2: rgba(255,255,255,.18);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);

  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --radius: 22px;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(99,102,241,.22), transparent 60%),
    radial-gradient(900px 520px at 95% 10%, rgba(34,211,238,.18), transparent 55%),
    radial-gradient(900px 520px at 40% 110%, rgba(16,185,129,.12), transparent 60%),
    var(--bg);
  color: var(--text);
}

.wrap{
  max-width:1100px;
  margin:0 auto;
  padding:18px;
}

.hidden{ display:none; }
.page.hidden{ display:none; }

h1{ margin:0 0 6px; font-size:28px; }
h2{ margin:0; font-size:18px; }
.muted{ color: var(--muted); }
.hint{ margin:10px 2px 0; font-size:13px; }

/* ---- Header top ---- */
.top{
  display:flex;
  gap:14px;
  align-items:flex-end;
  justify-content:space-between;
  flex-wrap:wrap;
}

.pill{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  font-size:13px;
  color: var(--muted);
}

/* ---- Tabs ---- */
.tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
}
.tab{
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius:999px;
  padding:10px 14px;
  cursor:pointer;
  font-size:13px;
  transition: transform .08s ease, background .2s ease, border-color .2s ease;
}
.tab:hover{
  background: rgba(255,255,255,.10);
  border-color: var(--border2);
}
.tab:active{ transform: translateY(1px); }
.tab.active{
  background: linear-gradient(90deg, rgba(99,102,241,.35), rgba(34,211,238,.25));
  border-color: rgba(99,102,241,.55);
}

/* ---- Card ---- */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  margin-top:14px;
}

.cardHead{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-bottom:10px;
}

/* ---- Inputs ---- */
.search{
  width:260px;
  max-width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(10,14,22,.55);
  color: var(--text);
  outline:none;
  transition: border-color .2s ease, background .2s ease;
}
.search::placeholder{ color: rgba(255,255,255,.35); }
.search:focus{
  border-color: rgba(34,211,238,.55);
  background: rgba(10,14,22,.72);
}
select.search{ appearance:auto; }

/* ---- Table ---- */
.tableWrap{
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:14px;
  min-width: 720px;
  table-layout: fixed; /* če ti reže vsebino na mobile, spodaj v media query damo auto */
}

.table thead th{
  position: sticky;
  top:0;
  z-index:2;
  text-align:left;
  padding:12px 12px;
  background: rgba(8,12,20,.92);
  color: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  letter-spacing:.02em;
  white-space:nowrap;
}

.table tbody td{
  padding:11px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
  white-space:nowrap;
}

.table tbody tr:nth-child(odd){ background: rgba(255,255,255,.03); }
.table tbody tr:nth-child(even){ background: rgba(255,255,255,.02); }
.table tbody tr:hover{ background: rgba(34,211,238,.08); }

.num{
  text-align:right;
  font-variant-numeric: tabular-nums;
}

/* Highlight row (your team) */
.row-highlight{
  background: linear-gradient(90deg, rgba(99,102,241,.18), rgba(34,211,238,.10)) !important;
  box-shadow: inset 3px 0 0 rgba(34,211,238,.55);
}

/* ---- Chips / badges ---- */
.chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  padding:4px 10px;
  border-radius:999px;
  background: rgba(99,102,241,.18);
  border: 1px solid rgba(99,102,241,.35);
  color: rgba(255,255,255,.92);
  font-weight:700;
  font-variant-numeric: tabular-nums;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:999px;
  background: rgba(16,185,129,.14);
  border: 1px solid rgba(16,185,129,.32);
  color: rgba(255,255,255,.92);
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
}

/* ---- Cover header ---- */
.cover{
  position:relative;
  border-radius:22px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);

  width: min(1064px, calc(100% - 36px));
  margin: 12px auto 18px;
  min-height: 180px;
}

/* FAILSAFE: da slika nikoli ni “inline” čudna na nekaterih browserjih */
.coverImg{
  display:block;
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transform: scale(1.04);
  filter: saturate(1.1) contrast(1.05);
}

.coverShade{
  position:absolute;
  inset:0;
  background: linear-gradient(90deg,
    rgba(0,0,0,.70) 0%,
    rgba(0,0,0,.35) 55%,
    rgba(0,0,0,.55) 100%);
}

.coverInner{
  position:relative;
  display:flex;
  align-items:center;
  gap:16px;
  padding: 18px;
}

.coverLogo{
  width:124px;
  height:124px;
  flex:0 0 124px;
  border-radius:26px;
  object-fit:contain;
  background: rgba(0,0,0,.30);
  border:1px solid rgba(255,255,255,.20);
  padding:16px;
  box-shadow:
    0 10px 30px rgba(0,0,0,.35),
    inset 0 0 0 1px rgba(255,255,255,.08);
}

.coverTitle{
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .2px;
}
.coverSub{
  margin-top:4px;
  opacity:.88;
  font-size: 14px;
}

/* ---- Home hero card (sponsor) ---- */
.hero{
  position: relative;
  overflow: hidden;
  min-height: 240px;
  height: clamp(220px, 35vw, 420px);
  background: linear-gradient(135deg, rgba(34,211,238,.22), rgba(99,102,241,.18));
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("gallery/hero.jpg");
  background-size: cover;
  background-position: center;
  opacity: .28;
  transform: scale(1.04);
}
.heroInner{
  position: relative;
  padding: 22px;
  display:flex;
  gap:16px;
  align-items:flex-start;
  justify-content:flex-start;
}

/* ---- Buttons ---- */
.rowActions{
  display:flex;
  gap:10px;
  margin-top:12px;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  padding: 10px 16px;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 800;
  letter-spacing: .2px;
  text-decoration: none;

  color: rgba(255,255,255,.92);
  border: 1px solid rgba(120,180,255,.35);
  background: rgba(120,180,255,.14);

  box-shadow:
    0 10px 22px rgba(0,0,0,.22),
    inset 0 0 0 1px rgba(255,255,255,.06);

  transition: transform .12s ease, background .2s ease, border-color .2s ease, filter .2s ease;
}
.btn:hover{
  background: rgba(120,180,255,.20);
  border-color: rgba(120,180,255,.55);
  transform: translateY(-1px);
}
.btn:active{
  transform: translateY(0px);
  filter: brightness(.96);
}
.btn.ghost{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
}
.btn.ghost:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.22);
}

/* ---- Home grid ---- */
.grid2home{
  display:grid;
  grid-template-columns: repeat(2,minmax(260px,1fr));
  gap:12px;
}

.box{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  border-radius: 18px;
  padding: 14px;
}
.box h3{
  margin:0 0 8px;
  font-size:14px;
  color: rgba(214,227,255,.95);
}
.big{
  font-size:28px;
  font-weight:800;
  letter-spacing:.3px;
  margin-top:6px;
}

/* ---- Gallery ---- */
.gallery{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:10px;
}
.gallery img{
  width:100%;
  height:180px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}

/* ---- Team roster ---- */
.playerCell{ display:flex; gap:12px; align-items:center; }
.avatar{
  width:100px;
  height:100px;
  border-radius:25px;
  border:1px solid rgba(255,255,255,.16);
  object-fit:cover;
  background: rgba(255,255,255,.08);
  flex:0 0 100px;
}
.avatar.placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  color: rgba(255,255,255,.9);
}
.playerName{ font-weight:700; }
.playerDesc{ margin-top:2px; font-size:13px; }

/* ---- Map ---- */
.mapWrap{
  margin-top:12px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  height:260px;
}
.mapWrap iframe{ width:100%; height:100%; border:0; }

/* ---- Sponsors grid (footer section) ---- */
.sponsors{
  width: min(1064px, calc(100% - 36px));
  margin: 12px auto 18px;
}
.sponsors .cardHead{ margin-bottom: 12px; }

.sponsorGrid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
}
.sponsorItem{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  border-radius:16px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  min-height: 92px;
}
.sponsorItem img{
  max-width: 100%;
  max-height: 64px;
  object-fit: contain;
  filter: grayscale(1) brightness(.95);
  opacity: .9;
  transition: filter .15s ease, opacity .15s ease, transform .15s ease;
}
.sponsorItem:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
}
.sponsorItem:hover img{
  filter:none;
  transform: scale(1.08);
  opacity:1;
}

/* ---- Lightbox ---- */
.lightbox.hidden { display:none; }
.lightbox{ position: fixed; inset:0; z-index:9999; }

.lightboxBackdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,0.65);
}
.lightboxPanel{
  position: relative;
  max-width: min(920px, 92vw);
  max-height: 88vh;
  margin: 6vh auto 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(20,24,30,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  touch-action: pan-y; /* swipe feel */
}
.lightboxPanel img{
  width:100%;
  height:auto;
  max-height:70vh;
  object-fit: contain;
  border-radius: 12px;
  display:block;
}
.lightboxCaption{
  margin-top:10px;
  color: rgba(255,255,255,0.85);
  font-size:14px;
}
.lightboxClose{
  position:absolute;
  top:10px; right:10px;
  border:1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.35);
  color: white;
  border-radius: 10px;
  padding: 6px 10px;
  cursor:pointer;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px){
  .grid2home{ grid-template-columns: 1fr; }
  .gallery{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sponsorGrid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .table{ min-width: 860px; }
}

@media (max-width: 640px){
  /* tighter page padding */
  .wrap{ padding:14px; }

  /* remove duplicate title under cover (cover already shows it) */
  header.wrap h1,
  header.wrap .muted{ display:none; }

  /* header top */
  .top{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }
  .pill{
    width:100%;
    text-align:center;
  }

  /* COVER: ensure it is visible and "hero" sized */
  .cover{
    display:block;
    width: calc(100% - 28px);
    margin: 10px auto 12px;

    height: min(52vh, 320px);
    min-height: 220px;
  }
  .coverInner{
    align-items:flex-end;
    padding:14px;
    gap:12px;
  }
  .coverLogo{
    width:64px;
    height:64px;
    flex:0 0 64px;
    padding:10px;
    border-radius:16px;
  }
  .coverTitle{ font-size:20px; }
  .coverSub{ font-size:12px; }

  /* hero sponsor buttons: full width */
  .rowActions{
    width:100%;
    flex-direction:column;
    gap:10px;
  }
  .rowActions .btn{
    width:100%;
    justify-content:center;
  }

  /* map a bit taller */
  .mapWrap{ height:240px; }

  /* sponsors keep 2 columns, nicer sizing */
  .sponsorItem{ min-height:84px; padding:12px; }
  .sponsorItem img{ max-height:56px; }

  /* tables: horizontal scroll stable */
  .table{ min-width: 860px; table-layout:auto; }
}
/* === FIX: cover must be visible on mobile === */
@media (max-width: 640px){
  .cover{
    display:block !important;
    height: min(52vh, 320px) !important;
    min-height: 220px !important;
  }
  .coverImg{
    display:block !important;
  }
}
