:root{
  --bg:#0b1624;
  --panel:#0f2238;
  --card:#112a45;
  --text:#e6f0fb;
  --muted:#90a7c0;
  --line:rgba(255,255,255,.08);
  --accent:#2ec4b6;
  --radius:14px;
  --shadow:0 10px 26px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  font-size:14px;
  line-height:1.45;
}
a{color:inherit}
.small{font-size:12px;color:var(--muted)}

.hero{
  background:
    radial-gradient(900px 420px at 15% 10%, rgba(46,196,182,.10), transparent 55%),
    radial-gradient(900px 520px at 85% 20%, rgba(56,189,248,.10), transparent 55%),
    linear-gradient(180deg,#0b1624,#0e1c2d);
  border-bottom:1px solid var(--line);
}

.container{width:min(1060px,92vw);margin:0 auto;padding:18px 0 30px}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
}

/* BRAND */
.brand{display:flex;align-items:center;gap:12px}
.brand-logo{
  width:48px;height:48px;border-radius:12px;border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  display:flex;align-items:center;justify-content:center;overflow:hidden;
  flex:0 0 auto;
}
.brand-logo img{width:34px;height:34px;object-fit:contain}

/* WIDE WORDMARK */
.brand-title{display:flex;flex-direction:column;gap:4px}
.hero-logo{height:62px;width:auto;display:block;object-fit:contain}
.brand-title p{margin:0;color:var(--muted);font-size:12px}

/* NAV */
.nav{display:flex;gap:8px;flex-wrap:wrap}
.pill{
  text-decoration:none;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:750;
}
.pill:hover{border-color:rgba(46,196,182,.55)}

/* FILTERS */
.filters{margin-top:10px}
.filters-form{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
select{
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  color:var(--text);
}

/* SECTION TITLE */
.section-title{font-size:16px;margin:12px 0 10px}

/* GRID */
.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:12px}

/* CARD / TILE */
.card{
  grid-column:span 6;
  background:linear-gradient(180deg, rgba(17,42,69,.96), rgba(12,30,50,.96));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}

/* Image area full-bleed with consistent height */
.card .img{padding:0}
.cover{
  width:100%;
  height:170px;
  object-fit:cover;
  display:block;
  border-bottom:1px solid rgba(255,255,255,.06);
}

/* ===== Sponsors page: make logos auto-fit without cropping ===== */
.sponsor-logo-wrap{
  height:170px; /* matches existing card image area */
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.03);
}
.sponsor-logo-wrap img{
  width:100%;
  height:100%;
  object-fit:contain; /* KEY: no cropping */
  display:block;
}
@media (max-width:900px){
  .sponsor-logo-wrap{height:150px;}
}


/* Placeholder (if image missing) */
.imgph{
  height:170px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  padding:16px;
  background:
    linear-gradient(135deg, rgba(46,196,182,.18), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.06));
  border-bottom:1px solid rgba(255,255,255,.06);
}
.imgph-title{font-weight:850;letter-spacing:.2px}
.imgph-sub{font-size:12px;color:var(--muted)}

.card .content{padding:12px 14px 14px;display:flex;flex-direction:column;gap:10px}
.card-top{display:flex;flex-direction:column;gap:6px}
.card h3{margin:0;font-size:15px;font-weight:800}
.desc{margin:0;color:var(--muted);font-size:12px;line-height:1.35}

.row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.row-top{align-items:flex-start}
.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

.badge{
  font-weight:900;
  font-size:11px;
  padding:6px 9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.18);
}
.badge.live{border-color:rgba(46,196,182,.55); background:rgba(46,196,182,.16)}
.badge.up{border-color:rgba(56,189,248,.45); background:rgba(56,189,248,.12)}
.badge.done{border-color:rgba(255,255,255,.16); opacity:.85}

.countdown{
  font-size:12px;
  padding:6px 9px;
  border-radius:10px;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.10);
  font-variant-numeric:tabular-nums;
}

.btn{
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 11px;
  font-size:12px;
  border-radius:10px;
  font-weight:800;
  border:1px solid rgba(46,196,182,.35);
  background:rgba(46,196,182,.14);
  color:var(--text);
}
.btn.primary{border-color:rgba(46,196,182,.55); background:rgba(46,196,182,.18)}
.btn:hover{border-color:rgba(46,196,182,.70);transform:translateY(-1px)}

.footer{margin-top:16px;color:var(--muted);font-size:12px;padding-bottom:24px}

@media (max-width:900px){
  .card{grid-column:span 12}
  .hero-logo{height:50px}
  .brand-logo{width:42px;height:42px}
}

/* --- Admin header logo sizing (does not affect landing hero logo) --- */
body.admin header.hero .page-logo{
  height:48px;
  width:auto;
  display:block;
}
body.admin header.hero .brand{
  display:flex;
  align-items:center;
  gap:12px;
}
body.admin header.hero .brand img{
  max-height:48px;
}

/* --- Page header logo sizing (Sponsors/Conditions/Admin pages) --- */
.page-logo{
  height:56px;
  width:auto;
  max-width:320px;
  display:block;
}

/* Keep the big hero logo (home page) controlled separately */
.hero-logo{
  max-height:120px;
  width:auto;
  display:block;
}
