html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Constrain page width to match nav button row */
.site-nav .container,
.container.mt-4 {
  max-width: 1200px;
}

.cursor-pointer {
  cursor: pointer;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* ===== Site Banner ===== */
.site-banner {
  background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
  color: #fff;
}

.banner-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}

@media (max-width: 575px) {
  .banner-title {
    font-size: 1.4rem;
  }
}

/* ===== Navigation Buttons ===== */
.site-nav {
  background: #f8f9fa;
}

.btn-nav {
  background: #fff;
  border: 2px solid #1a237e;
  color: #1a237e;
  font-weight: 600;
  padding: 0.4rem 1.2rem;
  border-radius: 2rem;
  transition: all 0.2s;
}

.btn-nav:hover:not(.disabled) {
  background: #1a237e;
  color: #fff;
}

.btn-nav.active {
  background: #1a237e;
  color: #fff;
  border-color: #1a237e;
}

.btn-nav.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #9e9e9e;
  color: #9e9e9e;
}

/* Dropdown toggle matching pill style */
.btn-nav.dropdown-toggle::after {
  margin-left: 0.4em;
  vertical-align: 0.15em;
}

.site-nav .dropdown-menu {
  border-radius: 0.75rem;
  padding: 0.5rem 0;
  min-width: 14rem;
}

.site-nav .dropdown-menu .dropdown-item {
  padding: 0.45rem 1.2rem;
  font-weight: 500;
}

.site-nav .dropdown-menu .dropdown-item:hover:not(.disabled) {
  background: #1a237e;
  color: #fff;
}

.site-nav .dropdown-menu .dropdown-item.disabled {
  opacity: 0.55;
}

/* ===== Round Navigation Arrows ===== */
.round-arrow {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s;
}

.round-arrow:hover {
  background: #fff;
  color: #212529;
}

/* ===== Standings Table ===== */
.standings-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.standings-table td {
  vertical-align: middle;
  font-size: 0.9rem;
}

/* ===== Match Cards ===== */
.match-card {
  transition: background 0.15s;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.match-team {
  font-size: 0.9rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-team-home {
  text-align: right;
}

.match-team-away {
  text-align: left;
}

.match-score {
  text-align: center;
  flex-shrink: 0;
}

.match-card:hover {
  background: #f8f9fa;
}

.match-card-link {
  color: inherit;
  cursor: pointer;
}

.match-card-link:hover {
  background: #e9ecef !important;
}

/* Scheduled (upcoming) match styling */
.match-scheduled {
  background: #f8f9fa;
}

/* ===== Match Detail Page ===== */
.match-header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.match-header-team-home {
  text-align: right;
}

.match-header-team-away {
  text-align: left;
}

.match-header-score {
  text-align: center;
}

.display-score {
  font-size: 1.6rem;
  letter-spacing: 2px;
}

/* Event timeline */
.event-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.event-minute {
  font-weight: 700;
  font-size: 0.85rem;
  color: #6c757d;
}

.goal-icon {
  font-size: 1.15rem;
  vertical-align: middle;
}

/* Card icons (yellow/red) */
.card-icon {
  display: inline-block;
  width: 12px;
  height: 16px;
  border-radius: 2px;
  vertical-align: middle;
}

.card-yellow {
  background: #ffc107;
}

.card-red {
  background: #dc3545;
}

/* Lineup table */
.lineup-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lineup-table td {
  font-size: 0.88rem;
  vertical-align: middle;
}

.team-name {
  min-width: 0;
  font-size: 0.9rem;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== 3-Column Home Layout ===== */
.sidebar-left,
.sidebar-right {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.sidebar-widget .card {
  border-radius: 0.5rem;
  overflow: hidden;
}

.sidebar-widget .card-header {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

.standings-mini th,
.standings-mini td {
  padding: 0.25rem 0.4rem;
  vertical-align: middle;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-article-title {
  color: #1a237e;
}

/* ===== News Cards ===== */
.news-card {
  transition: box-shadow 0.2s, transform 0.15s;
  border-radius: 0.5rem;
  overflow: hidden;
}

.news-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.news-card .card-img-top {
  max-height: 280px;
  object-fit: cover;
}

.news-card .card-title {
  font-weight: 700;
  color: #1a237e;
}