/* =========================================================
   SportTeam — tournament engine styles (themeable per section)
   ========================================================= */
body[data-section="garage"] { --accent: #22b85a; --accent-ink: #04280f; --accent-dark: #0a4d25; }
body[data-section="thoukydideio"] { --accent: #2f7df0; --accent-ink: #ffffff; --accent-dark: #12346e; }

.tourn-page {
  background: var(--cream);
  min-height: 100vh;
  color: var(--text);
}

/* ---- Chrome header ---- */
.tourn-top { background: var(--ink-900); color: #fff; position: sticky; top: 0; z-index: 50; }
.tourn-top__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.tourn-top__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 900; font-size: 1.2rem; color: #fff; }
.tourn-top__logo { height: 34px; width: auto; display: block; }
.tourn-top__nav { display: flex; gap: 18px; font-family: var(--font-head); font-weight: 700; font-size: .92rem; }
.tourn-top__nav a { color: #cdd9d2; transition: color .2s; }
.tourn-top__nav a:hover { color: #fff; }
.tourn-top__nav a.is-accent { color: var(--accent); }

/* ---- Layout ---- */
.tourn-main { padding: clamp(28px, 5vw, 56px) 0 80px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 700; font-size: .88rem; color: var(--accent-dark); margin-bottom: 18px; }
.back:hover { text-decoration: underline; }

.tourn-head { margin-bottom: 30px; }
.tourn-eyebrow { display: inline-block; font-family: var(--font-head); font-weight: 800; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.tourn-head h1 { font-family: var(--font-head); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1; }
.tourn-head p { color: var(--muted); margin-top: 12px; max-width: 60ch; }
.tourn-sub { color: var(--muted); margin-top: 8px; }
.tourn-badges { display: flex; gap: 8px; margin-bottom: 14px; }

/* ---- Day tabs ---- */
.day-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--border); margin-bottom: 22px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: none; font-family: var(--font-head); font-weight: 800; font-size: .95rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); padding: 12px 18px; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color .2s, border-color .2s; white-space: nowrap; }
.day-tab:hover { color: var(--heading); }
.day-tab.is-active { color: var(--accent-dark); border-color: var(--accent); }

/* ---- Results ticker ---- */
.rticker { display: flex; align-items: stretch; background: var(--ink-900); border-radius: 14px; overflow: hidden; margin-bottom: 26px; box-shadow: var(--shadow-sm); }
.rticker__label { flex: none; display: flex; align-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--font-head); font-weight: 800; font-size: .78rem; letter-spacing: .06em; padding: 0 18px; }
.rticker__win { position: relative; overflow: hidden; flex: 1; }
.rticker__win::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 40px; background: linear-gradient(to right, transparent, var(--ink-900)); pointer-events: none; }
.rticker__track { display: inline-flex; align-items: center; white-space: nowrap; padding: 14px 0; animation: ticker 45s linear infinite; }
.rticker__win:hover .rticker__track { animation-play-state: paused; }
.rt { display: inline-flex; align-items: center; gap: 10px; color: #cdd9d2; font-size: .92rem; padding: 0 16px; }
.rt b { color: #fff; font-weight: 600; }
.rt em { font-style: normal; font-family: var(--font-head); font-weight: 800; background: var(--accent); color: var(--accent-ink); border-radius: 6px; padding: 2px 8px; }
.rt__sep { color: rgba(255,255,255,.22); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .rticker__track { animation: none; } }

.chip { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; background: #e7eee6; color: var(--heading); }
.chip--accent { background: var(--accent); color: var(--accent-ink); }

.tourn-h2 { font-family: var(--font-head); font-weight: 800; text-transform: uppercase; font-size: 1.3rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 3px solid var(--accent); display: inline-block; }
.tourn-subhead { font-family: var(--font-head); font-weight: 800; text-transform: uppercase; font-size: 1rem; color: var(--accent-dark); margin: 20px 0 10px; }
.tourn-empty { color: var(--muted); background: #fff; border: 1px dashed var(--border); border-radius: 14px; padding: 26px; text-align: center; }
.tourn-note { color: var(--muted); font-size: .9rem; margin-top: 22px; text-align: center; }

/* ---- Tournaments list ---- */
.t-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.t-card { position: relative; display: block; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 26px; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.t-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.t-card__status { position: absolute; top: 18px; right: 18px; font-family: var(--font-head); font-weight: 800; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.t-card__status--active { background: rgba(34,184,90,.15); color: #157a3b; }
.t-card__status--upcoming { background: rgba(255,178,0,.18); color: #946200; }
.t-card__status--finished { background: #eceff1; color: #5b6b63; }
.t-card h3 { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; margin: 6px 40px 14px 0; line-height: 1.1; }
.t-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.t-card__go { font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--accent-dark); }

/* ---- Tournament detail grid ---- */
.tourn-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(26px, 4vw, 48px); align-items: start; }
@media (max-width: 900px) { .tourn-grid { grid-template-columns: 1fr; } }

/* ---- Standings table ---- */
.st-wrap { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.st { width: 100%; border-collapse: collapse; font-size: .92rem; }
.st thead th { background: var(--ink-900); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; padding: 12px 8px; text-align: center; }
.st thead th.st__team { text-align: left; padding-left: 14px; }
.st tbody td { padding: 11px 8px; text-align: center; border-top: 1px solid var(--border); }
.st tbody tr:nth-child(odd) td { background: #fafcf9; }
.st__pos { width: 34px; color: var(--muted); font-weight: 700; }
.st__team { text-align: left !important; padding-left: 14px !important; }
.st__team a { font-weight: 700; color: var(--heading); }
.st__team a:hover { color: var(--accent-dark); text-decoration: underline; }
.st__pts { font-family: var(--font-head); font-weight: 800; color: var(--accent-dark); font-size: 1rem; }
.st tbody tr:nth-child(1) .st__pos { color: var(--accent-dark); }
.st tbody tr:nth-child(-n+3) td { box-shadow: inset 3px 0 0 transparent; }
.st tbody tr:nth-child(1) td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.st tbody tr:nth-child(2) td:first-child { box-shadow: inset 4px 0 0 rgba(34,184,90,.5); }
.st tbody tr:nth-child(3) td:first-child { box-shadow: inset 4px 0 0 rgba(34,184,90,.5); }

/* Form dots */
.form { display: inline-flex; gap: 3px; vertical-align: middle; }
.form__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.form__dot--w { background: #22b85a; }
.form__dot--d { background: #f0a500; }
.form__dot--l { background: #e0281d; }
.form__none { color: var(--slate-400); }

/* ---- Fixtures ---- */
.md { background: #fff; border: 1px solid var(--border); border-radius: 16px; margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.md__head { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; background: #f1f5ef; border-bottom: 1px solid var(--border); }
.md__title { font-family: var(--font-head); font-weight: 800; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-dark); }
.md__date { font-size: .8rem; color: var(--muted); }
.md__list { padding: 6px 0; }
.mt { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 9px 16px; }
.mt + .mt { border-top: 1px solid #f0f3ee; }
.mt__side { display: flex; align-items: center; }
.mt__side--home { justify-content: flex-end; text-align: right; }
.mt__side--away { justify-content: flex-start; text-align: left; }
.mt__team { font-weight: 600; color: var(--heading); }
.mt__team:hover { color: var(--accent-dark); text-decoration: underline; }
.mt__side.is-win .mt__team { font-weight: 800; }
.mt__score { font-family: var(--font-head); font-weight: 800; min-width: 58px; text-align: center; }
.mt__score--done { background: var(--ink-900); color: #fff; border-radius: 8px; padding: 4px 8px; font-size: .95rem; }
.mt__score--done i { font-style: normal; opacity: .5; margin: 0 2px; }
.mt__score--vs { color: var(--slate-400); font-size: .8rem; font-weight: 700; }

/* ---- Team profile (dark hero) ---- */
body[data-page="team"] .tourn-main { padding-top: 0; }
.team-top { background:
  radial-gradient(800px 320px at 85% -20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%),
  var(--ink-900); color: #fff; padding: 24px 0 32px; }
.back--light { color: rgba(255,255,255,.82); }
.back--light:hover { color: #fff; }
.team-top__row { display: flex; align-items: center; gap: 20px; margin: 16px 0 24px; }
.team-top__sub { font-size: .82rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px; }
.team-top h1 { font-family: var(--font-head); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(1.8rem, 5.5vw, 2.9rem); line-height: 1; color: #fff; }
.team-top .team-form { margin-top: 12px; }
.team-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ttile { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 15px 10px; text-align: center; }
.ttile__k { display: block; font-size: .72rem; color: #9fb3a8; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 7px; }
.ttile strong { font-family: var(--font-head); font-weight: 900; font-size: 1.5rem; color: #fff; line-height: 1; }
.team-body { padding-top: 32px; }

/* ---- Team profile (legacy light hero, unused) ---- */
.team-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.team-crest { width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, var(--accent), var(--accent-dark)); color: #fff; font-family: var(--font-head); font-weight: 900; font-size: 1.7rem; flex: none; box-shadow: var(--shadow-md); }
.team-hero__sub { font-size: .86rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.team-hero h1 { font-family: var(--font-head); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1; }
.team-pos { display: inline-block; margin-top: 8px; font-family: var(--font-head); font-weight: 800; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; background: var(--accent); color: var(--accent-ink); padding: 4px 12px; border-radius: 999px; }

.team-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 10px; text-align: center; box-shadow: var(--shadow-sm); }
.stat strong { display: block; font-family: var(--font-head); font-weight: 900; font-size: 1.6rem; color: var(--accent-dark); line-height: 1; }
.stat span { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; display: block; }

.team-form { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.team-form > span { font-family: var(--font-head); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.team-form .form__dot { width: 14px; height: 14px; }

.mh-list { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.mh { display: grid; grid-template-columns: 56px 64px 1fr auto 34px; align-items: center; gap: 12px; padding: 13px 16px; }
.mh + .mh { border-top: 1px solid var(--border); }
.mh__md { font-family: var(--font-head); font-weight: 700; font-size: .76rem; color: var(--muted); }
.mh__ha { font-size: .78rem; color: var(--slate-400); }
.mh__opp { font-weight: 700; color: var(--heading); }
.mh__opp:hover { color: var(--accent-dark); text-decoration: underline; }
.mh__score { font-family: var(--font-head); font-weight: 800; }
.mh__score--vs { font-weight: 600; color: var(--slate-400); font-size: .82rem; }
.mh__res { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: .82rem; color: #fff; }
.mh__res--w { background: #22b85a; }
.mh__res--d { background: #f0a500; }
.mh__res--l { background: #e0281d; }
.mh__res--upcoming { background: #cfd8d2; color: #5b6b63; }

@media (max-width: 620px) {
  .st--hide-sm { display: none; }
  .team-stats { grid-template-columns: repeat(3, 1fr); }
  .mh { grid-template-columns: 46px 1fr auto 30px; }
  .mh__ha { display: none; }
  .team-tiles { gap: 7px; }
  .ttile { padding: 11px 5px; border-radius: 11px; }
  .ttile strong { font-size: 1.15rem; }
  .ttile__k { font-size: .62rem; }
}
@media (max-width: 400px) {
  .st--hide-xs { display: none; }
}

/* =========================================================
   Section landing (Θουκυδίδειο etc.)
   ========================================================= */
.btn--accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.btn--accent:hover { filter: brightness(1.06); }
.btn--accent-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); padding: 11px 24px; }
.btn--accent-outline:hover { background: #fff; color: var(--accent-dark); }

.sec-hero { position: relative; color: #fff; overflow: hidden; background: linear-gradient(135deg, var(--accent-dark) 0%, #081226 100%); }
.sec-hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%),
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Ccircle cx='24' cy='24' r='20' fill='none' stroke='white' stroke-opacity='.05' stroke-width='2'/%3E%3C/svg%3E"); }
.sec-hero__inner { position: relative; padding: clamp(60px, 10vw, 120px) 0; max-width: 760px; }
.sec-hero__eyebrow { display: inline-block; font-family: var(--font-head); font-weight: 800; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.sec-hero h1 { font-family: var(--font-head); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(2.6rem, 8vw, 5rem); line-height: .95; }
.sec-hero__logo { line-height: 0; margin-bottom: 4px; }
.sec-hero__logo img { height: clamp(150px, 26vw, 250px); width: auto; display: inline-block; }
.sec-hero p { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #cfdcf4; margin: 18px 0 30px; max-width: 580px; }
.sec-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.sec-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sec-feat { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; transition: transform .25s var(--ease), box-shadow .25s; }
.sec-feat:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.sec-feat svg { width: 42px; height: 42px; fill: var(--accent-dark); background: color-mix(in srgb, var(--accent) 16%, #fff); padding: 9px; border-radius: 12px; margin-bottom: 14px; }
.sec-feat h3 { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; margin-bottom: 6px; }
.sec-feat p { color: var(--muted); font-size: .95rem; }

.sec-cta { background: var(--ink-900); color: #fff; border-radius: 20px; padding: clamp(32px, 5vw, 54px); text-align: center; }
.sec-cta h2 { font-family: var(--font-head); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 10px; }
.sec-cta p { color: #a9bcb2; margin-bottom: 24px; }

@media (max-width: 760px) { .sec-feats { grid-template-columns: 1fr; } }
