/* ================================================
   TICINO ATHLETICS — Public CSS
   Design system 2026
   ================================================ */

/* ─── TOKENS ─── */
:root {
  --n:    #0a1a4e;
  --n2:   #122270;
  --r:    #cc1230;
  --rd:   #a50e26;
  --rb:   #fff0f2;
  --w:    #ffffff;
  --g:    #f2f4f8;
  --g2:   #e4e8f2;
  --tx:   #111827;
  --mu:   #5a6478;
  --bo:   #e4e8f2;
  --wrc:  #f59e0b;
  --wrcb: #fffbeb;
  --wrcd: #92400e;
  --gold: #b8860b;
  --goldb:#fffdf0;
  --goldd:#7a5800;
  --mn:   'DM Mono', monospace;
  --bb:   'Bebas Neue', sans-serif;
  --sf:   'DM Sans', system-ui, sans-serif;
  --br:   12px;
  --sh:   0 2px 12px rgba(10,26,78,.07);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sf);
  background: var(--g);
  color: var(--tx);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── NAV ─── */
.pub-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--n);
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 56px;
}
.pub-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.pub-nav-mark {
  width: 32px;
  height: 32px;
  background: var(--r);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bb);
  font-size: 15px;
  color: var(--w);
  letter-spacing: .5px;
}
.pub-nav-name {
  font-family: var(--bb);
  font-size: 20px;
  color: var(--w);
  letter-spacing: 1px;
  display: none;
}
.pub-nav-links {
  display: none;
  gap: 2px;
  margin-left: 16px;
}
.pub-nav-lnk {
  color: rgba(255,255,255,.6);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.pub-nav-lnk:hover,
.pub-nav-lnk.on {
  color: var(--w);
  background: rgba(255,255,255,.1);
}
.pub-nav-search {
  margin-left: auto;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 7px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  transition: background .15s;
}
.pub-nav-search:hover { background: rgba(255,255,255,.12); }
.pub-nav-sc {
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  color: rgba(255,255,255,.3);
  display: none;
}

/* ─── SEARCH OVERLAY ─── */
.sov {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10,26,78,.55);
  backdrop-filter: blur(4px);
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px 0;
}
.sov.open { display: flex; }
.sbox {
  background: var(--w);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 24px 48px rgba(0,0,0,.2);
  overflow: hidden;
}
.sinp-w {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bo);
}
.sinp {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--sf);
  font-size: 16px;
  color: var(--tx);
  background: transparent;
}
.sinp::placeholder { color: var(--mu); }
.sres { max-height: 360px; overflow-y: auto; }
.sri {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--bo);
  cursor: pointer;
  transition: background .1s;
}
.sri:hover { background: var(--g); }
.sri:last-child { border-bottom: none; }
.sri-name { font-weight: 600; font-size: 14px; }
.sri-sub  { font-size: 12px; color: var(--mu); }
.shit     { padding: 16px 20px; font-size: 13px; color: var(--mu); text-align: center; }

/* ─── HERO ─── */
.pub-hero {
  background: var(--n);
  position: relative;
  overflow: hidden;
}
.pub-hero-bg {
  position: absolute;
  right: -10px;
  bottom: -30px;
  font-family: var(--bb);
  font-size: 200px;
  color: rgba(255,255,255,.03);
  line-height: 1;
  pointer-events: none;
  letter-spacing: -8px;
  white-space: nowrap;
}
.pub-hero-in { padding: 28px 20px 0; position: relative; z-index: 1; }
.pub-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--r);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 12px;
}
.pub-hero-tag-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.6); }
.pub-hero-tag-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--w); }
.pub-hero-h1 {
  font-family: var(--bb);
  font-size: clamp(48px, 14vw, 80px);
  color: var(--w);
  line-height: .9;
  letter-spacing: .5px;
  margin-bottom: 14px;
}
.pub-hero-h1 em { color: var(--r); font-style: normal; }
.pub-hero-sub { font-size: 13px; color: rgba(255,255,255,.5); padding-bottom: 24px; }

/* ─── STAT BAR MOBILE ─── */
.sbar { background: var(--r); display: flex; }
.sbar-i {
  flex: 1;
  padding: 12px 16px;
  border-right: 1px solid rgba(255,255,255,.15);
}
.sbar-i:last-child { border-right: none; }
.sbar-n { font-family: var(--bb); font-size: 26px; color: var(--w); line-height: 1; }
.sbar-l { font-size: 9px; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: 1px; }

/* ─── SECTION HEADER ─── */
.pub-sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}
.pub-sh-t { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--n); }
.pub-sh-l { font-size: 12px; font-weight: 600; color: var(--rd); }
.pub-sh-l:hover { text-decoration: underline; }

/* ─── CARD ─── */
.pub-card {
  background: var(--w);
  border-radius: var(--br);
  overflow: hidden;
  border: 1px solid var(--bo);
  box-shadow: var(--sh);
  margin-bottom: 12px;
  transition: box-shadow .15s, transform .15s;
}
.pub-card:hover { box-shadow: 0 6px 24px rgba(10,26,78,.12); transform: translateY(-1px); }
.pub-card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--bo);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pub-card-head-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--n); }
.pub-card-head-l { font-size: 11px; font-weight: 600; color: var(--rd); }

/* ─── BADGE ─── */
.pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.pub-badge-red   { background: var(--rb);   color: var(--rd); }
.pub-badge-navy  { background: #e8f0ff;     color: var(--n); }
.pub-badge-green { background: #e8f7ee;     color: #1a6b3a; }
.pub-badge-gold  { background: var(--goldb);color: var(--goldd); }
.pub-badge-wrc   { background: var(--wrcb); color: var(--wrcd); }
.pub-badge-gray  { background: #f1f3f6;     color: #8a94a6; }

/* ─── TABLE ─── */
.pub-tbl-wrap { overflow-x: auto; }
.pub-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.pub-tbl th {
  padding: 8px 10px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--mu);
  font-weight: 600;
  background: var(--g);
  border-bottom: 1px solid var(--bo);
  white-space: nowrap;
}
.pub-tbl th.r { text-align: right; }
.pub-tbl td {
  padding: 9px 10px;
  border-bottom: 1px solid #f5f6fa;
  vertical-align: middle;
}
.pub-tbl tr:last-child td { border-bottom: none; }
.pub-tbl tr:hover td { background: #fafbfd; }
.pub-tbl .tn { font-weight: 600; color: var(--n); font-size: 13px; white-space: nowrap; }
.pub-tbl .td { color: var(--mu); font-size: 11px; white-space: nowrap; }
.pub-tbl .tv { font-family: var(--mn); font-weight: 500; color: var(--n); text-align: right; font-size: 13px; }

/* ─── MODAL ─── */
.pub-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,26,78,.5);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(3px);
}
.pub-modal-overlay.open { display: flex; }
.pub-modal {
  background: var(--w);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
}
.pub-modal-handle {
  width: 40px;
  height: 4px;
  background: var(--bo);
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* ─── BOTTOM NAV ─── */
.pub-botnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--w);
  border-top: 1px solid var(--bo);
  display: flex;
  padding: 8px 0 max(14px, env(safe-area-inset-bottom));
  z-index: 100;
}
.pub-bni {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--sf);
  text-decoration: none;
}
.pub-bni svg    { width: 22px; height: 22px; stroke: var(--mu); }
.pub-bni-l      { font-size: 10px; font-weight: 500; color: var(--mu); }
.pub-bni.on svg { stroke: var(--n); }
.pub-bni.on .pub-bni-l { color: var(--n); font-weight: 700; }

/* ─── EMPTY STATE ─── */
.pub-empty      { text-align: center; padding: 60px 20px; color: var(--mu); }
.pub-empty-icon { font-size: 48px; margin-bottom: 12px; }
.pub-empty-t    { font-size: 16px; font-weight: 600; color: var(--n); margin-bottom: 6px; }

/* ─── UTILITY ─── */
.pub-wrap      { max-width: 900px; margin: 0 auto; padding: 16px 12px 90px; }
.pub-wrap-wide { max-width: 1280px; margin: 0 auto; padding: 16px 12px 90px; }
.pub-muted     { color: var(--mu); }
.pub-mono      { font-family: var(--mn); }

/* ─── TOOLBAR / FILTRI ─── */
.pub-toolbar {
  background: var(--w);
  border-bottom: 2px solid var(--bo);
  position: sticky;
  top: 56px;
  z-index: 90;
}
.pub-toolbar-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 16px;
}
.pub-toolbar-tabs::-webkit-scrollbar { display: none; }
.pub-ftab {
  padding: 13px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mu);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  font-family: var(--sf);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  transition: color .12s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}
.pub-ftab:hover { color: var(--n); }
.pub-ftab.on    { color: var(--n); border-bottom-color: var(--r); }
.pub-ftab .cnt {
  background: var(--g);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  color: var(--mu);
}
.pub-ftab.on .cnt { background: var(--rb); color: var(--rd); }

.pub-vista-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid var(--bo);
  background: var(--g);
}
.pub-vista-label { font-size: 11px; color: var(--mu); font-weight: 600; }
.pub-vista-btns  {
  display: flex;
  gap: 4px;
  background: var(--g2);
  border-radius: 8px;
  padding: 3px;
}
.pub-vbtn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mu);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--sf);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all .12s;
  text-decoration: none;
}
.pub-vbtn:hover { color: var(--n); }
.pub-vbtn.on    { background: var(--w); color: var(--n); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.pub-vbtn svg   { width: 14px; height: 14px; }
.pub-vbtn-cta   { background: var(--n); color: var(--w) !important; border-radius: 6px; }
.pub-vbtn-cta:hover { background: var(--n2); }

/* ─── RESULT ROW ─── */
.pub-rrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--g);
  transition: background .1s;
}
.pub-rrow:hover         { background: #fafbfd; }
.pub-rrow:last-child    { border-bottom: none; }
.pub-rrow-ic {
  width: 38px; height: 38px;
  flex-shrink: 0;
  background: var(--g);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--n);
  text-align: center;
  line-height: 1.2;
}
.pub-rrow-inf  { flex: 1; min-width: 0; }
.pub-rrow-name { font-size: 13px; font-weight: 600; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-rrow-sub  { font-size: 11px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.pub-rrow-r    { text-align: right; flex-shrink: 0; }
.pub-rrow-val  { font-family: var(--mn); font-size: 14px; font-weight: 500; color: var(--n); }
.pub-rrow-meta { font-size: 10px; color: var(--mu); margin-top: 2px; }

/* ─── TAG ─── */
.pub-tag   { display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.pub-tag-r { background: var(--rb); color: var(--rd); }
.pub-tag-i { background: #e8f0ff; color: var(--n); }

/* ─── DESKTOP ─── */
@media (min-width: 768px) {
  .pub-nav         { padding: 0 24px; }
  .pub-nav-name    { display: block; }
  .pub-nav-links   { display: flex; }
  .pub-nav-sc      { display: block; }
  .pub-botnav      { display: none; }
  .pub-wrap        { padding: 20px 24px 40px; }
  .pub-wrap-wide   { padding: 24px 24px 40px; }
  .pub-toolbar-tabs{ padding: 0 24px; }
  .pub-vista-bar   { padding: 8px 24px; }
  .pub-hero-in     { padding: 44px 40px 0; }
  .pub-hero-h1     { font-size: clamp(60px, 8vw, 100px); }

  .pub-dwrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
  }
  .pub-dmain { display: flex; flex-direction: column; gap: 20px; }
  .pub-dside { display: flex; flex-direction: column; gap: 20px; }
  .pub-dmain .pub-card,
  .pub-dside .pub-card { margin: 0; }

  .pub-hero          { display: grid; grid-template-columns: 1fr 1fr; }
  .sbar              { display: none; }
  .pub-hero-stats    { background: var(--r); display: grid; grid-template-columns: 1fr 1fr; }
  .pub-hstat {
    padding: 28px 32px;
    border-right: 1px solid rgba(255,255,255,.15);
    border-bottom: 1px solid rgba(255,255,255,.15);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .pub-hstat:nth-child(2) { border-right: none; }
  .pub-hstat:nth-child(3) { border-bottom: none; }
  .pub-hstat:nth-child(4) { border-right: none; border-bottom: none; }
  .pub-hstat-n { font-family: var(--bb); font-size: 52px; color: var(--w); line-height: 1; }
  .pub-hstat-l { font-size: 11px; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }
  .pub-hstat-s { font-size: 10px; color: rgba(255,255,255,.4); margin-top: 1px; }

  .pub-modal-overlay { align-items: center; }
  .pub-modal         { border-radius: 16px; max-height: 70vh; }
}

@media (max-width: 767px) {
  .pub-desk        { display: none !important; }
  .pub-hero-stats  { display: none; }
}


.pub-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pub-nav-login {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.25);
    padding: 5px 14px;
    border-radius: 5px;
    letter-spacing: .5px;
    transition: all .15s;
}
.pub-nav-login:hover {
    color: #fff;
    border-color: rgba(255,255,255,.6);
}
/* ── Nav login button ─────────────────────────── */
.pub-nav-right { display:flex; align-items:center; gap:10px; }
.pub-nav-login { font-size:12px; font-weight:600; color:rgba(255,255,255,.75); text-decoration:none; border:1px solid rgba(255,255,255,.25); padding:5px 14px; border-radius:5px; letter-spacing:.5px; transition:all .15s; }
.pub-nav-login:hover { color:#fff; border-color:rgba(255,255,255,.6); }

/* Nav bilanciato */
.pub-nav { justify-content: space-between; }
.pub-nav-links { flex: 1; justify-content: center; }

/* ── MOBILE: bottom nav + responsive ───────────────────────── */
@media (max-width: 767px) {
    body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
    .pub-botnav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: #0a1a4e;
        height: 56px;
        padding-bottom: env(safe-area-inset-bottom, 0);
        z-index: 200;
        border-top: 1px solid rgba(255,255,255,.1);
    }
    .pub-bni {
        flex: 1; display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        color: rgba(255,255,255,.45); text-decoration: none;
        gap: 2px; transition: color .15s; padding: 6px 0;
    }
    .pub-bni.on     { color: #fff; }
    .pub-bni:active { color: rgba(255,255,255,.8); }
    .pub-bni svg    { width: 22px; height: 22px; }
    .pub-bni-l      { font-size: 9px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
    .home-central-grid  { grid-template-columns: 1fr !important; }
    .home-central-right { border-left: none !important; border-top: 1px solid #ebebeb; }
    .home-hero-year { font-size: 64px !important; }
    .home-hero h1   { font-size: 36px !important; }
    .home-stats     { grid-template-columns: repeat(2,1fr) !important; }
    .home-records   { grid-template-columns: 1fr !important; }
    .home-stat      { padding: 18px 16px !important; }
    .home-stat-num  { font-size: 30px !important; }
}
