/* =========================
   ROOT VARIABLES
   ========================= */

:root {
  --primary: #1E3A8A;
  --accent: orange;
  --bg: #f4f4f4;
  --text: #111;
  --white: #ffffff;
  --dark: #333;
}

/* =========================
   GENERAL PAGE STYLE
   ========================= */

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  line-height: 1.6;
  color: var(--text);
}

/* =========================
   HEADER
   ========================= */

header {
  background: var(--primary);
  color: var(--white);
  padding: 20px;
  text-align: center;
}

/* =========================
   FLEXBOX NAVIGATION
   ========================= */

nav ul {
  display: flex;
  justify-content: center;
  gap: 25px;
  list-style: none;
  padding: 10px;
  background: var(--dark);
  margin: 0;
  flex-wrap: wrap;
}

nav ul li a {
  color: var(--white);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: var(--accent);
}

/* =========================
   GRID LAYOUT (HOME PAGE)
   ========================= */

.sports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
}

/* =========================
   FLEXBOX (SECOND USAGE)
   Card layout improvement
   ========================= */

.card {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);

  /* required interaction improvement */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* =========================
   IMAGES
   ========================= */

img {
  max-width: 100%;
  border-radius: 5px;
}

/* =========================
   TABLES
   ========================= */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
}

th {
  background: var(--primary);
  color: var(--white);
}

/* =========================
   FORM
   ========================= */

form {
  background: var(--white);
  padding: 20px;
  max-width: 500px;
  margin: auto;
  border-radius: 8px;
}

input, textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
}

button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: #0f2a66;
}

/* =========================
   FOOTER
   ========================= */

footer {
  text-align: center;
  padding: 20px;
  background: var(--dark);
  color: var(--white);
  margin-top: 20px;
}

/* =========================
   RESPONSIVE DESIGN
   ========================= */

@media (max-width: 768px) {

  nav ul {
    flex-direction: column;
    align-items: center;
  }

  .sports-grid {
    grid-template-columns: 1fr;
  }
}
