/* ===== Theme Vars ===== */
:root {
  --brand: #8b1e1e;
  --brand-dark: #6f1717;
  --ink: #1a1a1a;
  --brand-050: #fff2f2;                 /* light tint for hovers */
  --brand-ring: rgba(139, 30, 30, .25); /* focus ring */
}

/* ===== Base ===== */
body {
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #f7f7f8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.brand-title,
.section-title {
  font-family: Oswald, Inter, sans-serif;
  letter-spacing: .3px;
}
.section-title { font-weight: 600; color: #2b353e; }

.navbar-dark { background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand) 70%); }

.card-clean {
  border: 0;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .06);
}

.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }

.ratio.img-placeholder { background: #eee; border-radius: .75rem; }

footer {
  margin-top: auto;
  background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand) 70%);
  border-top: 1px solid #eee;
  color: #fff;
}

/* ===== Navbar links ===== */
.navbar-nav .nav-link {
  color: #fff !important;
  font-size: 16px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: .5px;
  position: relative;
  transition: color .2s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus { color: #d9d9d9 !important; }

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background-color: #b22222;
  transition: width .2s ease;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after,
.navbar-nav .nav-link.active::after { width: 100%; }

.navbar-nav .nav-link.active { color: #fff !important; }

.border-top-red { border-top: 2px solid #b22222; }

.navbar .navbar-toggler { border: none !important; box-shadow: none !important; }

/* Brand background helper */
.bg-brand { background: #8b1e1e; transition: background-color .2s ease; }
.bg-brand:hover { background: #a12323; }

/* ===== Filter bar ===== */
.filter-bar .form-label { font-size: .85rem; margin-bottom: .25rem; }
.filter-bar .form-control-sm,
.filter-bar .form-select-sm { font-size: .875rem; padding: .25rem .5rem; }

/* allow focus ring to escape cards/cols */
.card-clean,
.filter-bar,
.filter-bar .row > [class*="col-"] { overflow: visible; }

/* lift focused control + (Bootstrap-ish) ring */
.filter-bar .form-control:focus,
.filter-bar .form-select:focus {
  position: relative;
  z-index: 3;
  box-shadow: 0 0 0 .15rem rgba(13,110,253,.25);
}

/* ===== Navbar dropdown ===== */

.navbar .dropdown-menu .dropdown-item {
  font-family: 'Oswald', sans-serif !important;
  font-weight: 500;
  font-size: .95rem;
}
.navbar .dropdown-menu .dropdown-item:active,
.navbar .dropdown-menu .dropdown-item.active {
  background-color: transparent !important;
  color: var(--ink) !important;
}
.navbar .dropdown-menu .dropdown-item:hover {
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-underline-offset: 3px;
  background: transparent;
}

/* ===== Pagination (modern pills, brand active / dark hover) ===== */
.pagination-modern { flex-wrap: wrap; gap: .1rem; }

.pagination-modern .page-link {
  border: 0;
  background: #fff;
  color: #374151;
  margin: 0 .2rem;
  min-width: 2.25rem;
  text-align: center;
  border-radius: 999px;
  padding: .35rem .75rem;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), inset 0 0 0 1px #e5e7eb;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.pagination-modern.pagination-sm .page-link { min-width: 2rem; padding: .3rem .6rem; }

/* Non-active hover */
.pagination-modern .page-item:not(.active) .page-link:hover {
  background: var(--brand-050);
  color: var(--brand-dark);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), inset 0 0 0 1px var(--brand);
}

/* Active page (brand) */
.pagination-modern .page-item.active .page-link {
  background: var(--brand) !important;
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), inset 0 0 0 1px var(--brand) !important;
}

/* Active hover/focus (darken) */
.pagination-modern .page-item.active .page-link:hover,
.pagination-modern .page-item.active .page-link:focus {
  background: var(--brand-dark) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), inset 0 0 0 1px var(--brand-dark) !important;
}

/* Disabled */
.pagination-modern .page-item.disabled .page-link {
  background: #f3f4f6;
  color: #9ca3af;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

/* Focus ring */
.pagination-modern .page-link:focus {
  outline: none;
  box-shadow:
    0 1px 0 rgba(0,0,0,.05),
    inset 0 0 0 1px var(--brand),
    0 0 0 .2rem var(--brand-ring);
}

/* ===== Tables & chips ===== */
.table-hover tbody tr:hover { background: #fcfcfd; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .5rem;
  border: 1px solid #e5e7eb;
  border-radius: 50rem;
  background: #fff;
  font-size: .85rem;
}
.filter-chip a { text-decoration: none; color: #6c757d; }
.filter-chip .x { font-weight: 700; }

/* Icon-only buttons */
.btn-icon { padding: .25rem .45rem; line-height: 1; }
.btn-icon svg { width: 16px; height: 16px; display: block; }

/* ===== Fixtures (desktop & mobile) ===== */
/* Desktop one-liner */
.fixture-one {
  position: relative;
  display: flex;
  align-items: center;
  padding: .75rem 0;
}
.fixture-one .half { flex: 0 0 50%; display: flex; align-items: center; gap: 1rem; min-width: 0; }
.fixture-one .half.left  { justify-content: space-between; padding-right: 5.5rem; } /* reserve center score space */
.fixture-one .half.right { justify-content: space-between; padding-left:  5.5rem; }
.fixture-one .centered {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
}
.fixture-one .date { white-space: nowrap; }
.fixture-one .venue .badge { white-space: nowrap; }
.fixture-one .home, .fixture-one .away {
  flex: 1 1 auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fixture-one .home { text-align: right; }
.fixture-one .away { text-align: left;  }

/* Score styling */
.score .pins { font-style: italic; }
.score .sep { color: #6c757d; }

/* Points colouring */
.pt-green { color: var(--bs-success); }
.pt-red   { color: var(--bs-danger); }
.pt-grey  { color: var(--bs-secondary); }

/* Mobile stacked */
.fixture-mobile { padding: .75rem 0; }
.fixture-mobile .date { text-align: center; white-space: nowrap; }
.fixture-mobile .teams { display: flex; justify-content: center; align-items: center; gap: .5rem; text-align: center; }
.fixture-mobile .venue { text-align: center; }
.fixture-mobile .venue .badge { white-space: nowrap; }
.fixture-mobile .teams .home,
.fixture-mobile .teams .away {
  max-width: 42vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== Forms & badges ===== */
.form-box {
  display: inline-block;
  min-width: 1.5rem;
  text-align: center;
  padding: .2rem .45rem;
  border-radius: .35rem;
  font-weight: 600;
  color: #fff;
  margin: 0 .1rem;
  font-size: .8rem;
  line-height: 1.1;
}
.form-W { background-color: #28a745; } /* green */
.form-L { background-color: #dc3545; } /* red */
.form-D { background-color: #6c757d; } /* dark grey */

/* slightly wider pill for numeric points */
.point-box { min-width: 2.1rem; padding: .2rem .55rem; }

.pin-box {
  display: block;
  margin-top: .2rem;
  padding: .15rem .4rem;
  border-radius: .35rem;
  font-size: .7rem;
  line-height: 1.1;
  background-color: #adb5bd; /* light grey */
  color: #fff;
  text-align: center;
  font-weight: 700;
}

/* Show short name on phones, full name from ≥576px up */
.team-label-short { display: inline; }   /* default for xs */
.team-label-full  { display: none; }

@media (min-width: 576px) {
  .team-label-short { display: none !important; }
  .team-label-full  { display: inline !important; }
}

/* Arrow rotation for your inline SVG */
.navbar .dropdown-toggle .dropdown-arrow {
  transition: transform .2s ease;
}
.navbar .dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

/* Red underline like navbar links */
.link-underline-red {
  position: relative;
  text-decoration: none; /* keep text clean */
}
.link-underline-red::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: #b22222; /* same red as navbar underline */
  transition: width .2s ease;
}
.link-underline-red:hover::after,
.link-underline-red:focus::after {
  width: 100%;
}