:root {
  --navy: #062d50;
  --blue: #087cc9;
  --green: #0d9764;
  --ink-muted: #5d7794;
  --line: #d8e6f2;
  --surface: rgba(255, 255, 255, 0.96);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #edf8ff; }
body { margin: 0; min-height: 100vh; color: var(--navy); font-family: "DM Sans", sans-serif; background: #edf8ff url("/assets/public-tournaments-bg.png") center top 76px / cover fixed no-repeat; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: 8px; background: #fff; }
.skip-link:focus { top: 12px; }

.portal-header { height: 80px; padding: 0 clamp(28px, 4vw, 76px); display: flex; align-items: center; justify-content: space-between; color: #fff; background: linear-gradient(105deg, #063456, #135c8b); box-shadow: 0 4px 22px rgba(2, 39, 70, .16); }
.portal-brand { display: flex; align-items: center; gap: 26px; min-width: 0; }
.portal-brand img { width: 245px; height: 62px; padding: 5px 9px; border-radius: 11px; background: rgba(255,255,255,.96); object-fit: contain; }
.brand-divider { width: 1px; height: 42px; background: rgba(255,255,255,.45); }
.portal-brand > span:last-child { display: grid; gap: 4px; }
.portal-brand strong { font-size: 20px; line-height: 1.1; }
.portal-brand small { color: #b9cfe1; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.portal-pill { display: inline-flex; align-items: center; gap: 11px; padding: 11px 22px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.06); font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }

main { width: min(1720px, calc(100% - 48px)); margin: 0 auto; padding: 40px 0 28px; }
.catalogue-hero { min-height: 145px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 0 82px 26px; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin: 0 0 8px; color: #476987; font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.eyebrow span { width: 21px; height: 3px; border-radius: 2px; background: var(--green); }
.hero-copy h1 { margin: 0; font-size: clamp(38px, 4vw, 58px); line-height: 1; letter-spacing: -2.3px; }
.hero-copy h1 em { color: var(--blue); font-style: normal; }
.hero-copy > p:last-child { margin: 13px 0 0; color: #486986; font-size: 18px; }
.catalogue-tools { display: grid; grid-template-columns: minmax(320px, 1fr) 235px; gap: 16px; width: min(610px, 48%); }
.search-control, .filter-control { height: 49px; display: flex; align-items: center; gap: 12px; padding: 0 17px; border: 1px solid rgba(103,132,157,.25); border-radius: 11px; background: rgba(255,255,255,.96); box-shadow: 0 8px 24px rgba(22,71,105,.1); }
.search-control > span:first-child, .filter-control > span:first-child { color: #315f86; font-size: 25px; line-height: 1; }
.search-control input, .filter-control select { width: 100%; border: 0; outline: 0; color: var(--navy); background: transparent; font: 600 14px "DM Sans", sans-serif; }
.search-control input::placeholder { color: #7890a9; font-weight: 500; }

.catalogue-content { min-height: 355px; }
.results-heading { display: none; }
.tournament-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.tournament-card { overflow: hidden; display: flex; flex-direction: column; min-height: 375px; border: 7px solid rgba(255,255,255,.92); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 30px rgba(24,78,112,.1); }
.card-image { position: relative; height: 174px; flex: 0 0 auto; overflow: hidden; background: #cde2ee; border-radius: 9px 9px 2px 2px; }
.card-image > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.date-badge { position: absolute; right: 15px; top: 15px; padding: 10px 17px; border-radius: 999px; color: #103f65; background: rgba(255,255,255,.94); box-shadow: 0 4px 14px rgba(4,38,65,.13); font-size: 13px; font-weight: 800; }
.mode-badge { position: absolute; left: 15px; bottom: 10px; max-width: calc(100% - 30px); padding: 5px 12px; overflow: hidden; border-radius: 8px; color: #05629d; background: #e7f5ff; font-size: 10px; font-weight: 800; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.tournament-card[data-status="active"] .mode-badge { color: #08734f; background: #ddf8eb; }
.tournament-card[data-status="completed"] .mode-badge { color: #6d4fb5; background: #eee8ff; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 10px 10px 4px; }
.card-body h3 { margin: 0 0 7px; overflow: hidden; font-size: 20px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.venue { min-height: 22px; margin: 0; overflow: hidden; color: #66809c; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; gap: 20px; margin-top: 20px; padding-bottom: 16px; color: #4e7190; font-size: 13px; border-bottom: 1px solid var(--line); }
.card-meta span { white-space: nowrap; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; color: #08734f; background: #dcf7eb; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #10a66e; }
.tournament-card[data-status="upcoming"] .status-pill { color: #a15b00; background: #fff0d7; }
.tournament-card[data-status="upcoming"] .status-pill::before { background: #d68009; }
.tournament-card[data-status="completed"] .status-pill { color: #694aac; background: #eee8ff; }
.tournament-card[data-status="completed"] .status-pill::before { background: #815bd0; }
.card-action { min-width: 145px; padding: 12px 18px; border: 1px solid #0878c7; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #0754a8, #058cca); text-align: center; font-size: 14px; font-weight: 800; }
.tournament-card[data-status="completed"] .card-action { color: #0966aa; background: transparent; }
.empty-state, .loading-state { grid-column: 1 / -1; padding: 90px 24px; border: 1px solid rgba(110,144,171,.23); border-radius: 18px; background: rgba(255,255,255,.8); color: #617e98; text-align: center; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--navy); font-size: 20px; }

.benefits { width: min(1450px, calc(100% - 90px)); display: grid; grid-template-columns: repeat(3, 1fr); margin: 35px auto 0; padding: 22px 42px; border-radius: 14px; background: rgba(255,255,255,.78); box-shadow: 0 8px 24px rgba(28,80,113,.06); }
.benefits article { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 34px; border-right: 1px solid #cbdce8; }
.benefits article:last-child { border-right: 0; }
.benefits article > span { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #0775c7; background: #e2f1ff; font-size: 25px; }
.benefits div { display: grid; gap: 3px; }
.benefits strong { font-size: 14px; }
.benefits small { color: #65819c; font-size: 11px; }
footer { display: grid; place-items: center; gap: 2px; padding: 21px; color: #75a0c2; text-align: center; }
footer > span { color: #3c78a5; font-size: 24px; }
footer strong { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; }
footer small { font-size: 11px; }

@media (max-width: 1250px) { .tournament-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .catalogue-hero { padding-inline: 22px; } .catalogue-tools { width: 52%; } }
@media (max-width: 760px) { body { background-attachment: scroll; } .portal-header { height: auto; padding: 15px 18px; } .portal-brand { gap: 12px; } .portal-brand img { width: 180px; height: 50px; } .portal-brand strong { font-size: 14px; } .portal-brand small, .brand-divider, .portal-pill { display: none; } main { width: min(100% - 24px, 620px); padding-top: 24px; } .catalogue-hero { display: block; padding: 0 0 24px; } .hero-copy h1 { font-size: 40px; } .hero-copy > p:last-child { font-size: 15px; } .catalogue-tools { width: 100%; grid-template-columns: 1fr; margin-top: 24px; } .tournament-grid { grid-template-columns: 1fr; } .benefits { width: 100%; grid-template-columns: 1fr; padding: 12px 22px; } .benefits article { justify-content: flex-start; padding: 16px 0; border-right: 0; border-bottom: 1px solid #cbdce8; } .benefits article:last-child { border-bottom: 0; } }
