/* Basic Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #004d40; /* Dark Teal */
  margin-bottom: 15px;
  font-weight: bold;
}

h1 {
  font-size: 2.5em;
}
h2 {
  font-size: 2em;
}
h3 {
  font-size: 1.5em;
}

p {
  margin-bottom: 15px;
}

a {
  color: #007bff; /* Blue */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background-color: #007bff; /* Blue */
  color: #fff;
  padding: 20px 0;
  border-bottom: 5px solid #004d40; /* Dark Teal */
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

header h1 {
  color: #fff;
  margin: 0;
  font-size: 1.8em;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: #fff;
  font-weight: bold;
  padding: 5px 10px;
  transition: background-color 0.3s ease;
  border-radius: 4px;
}

nav ul li a:hover,
nav ul li a.active {
  background-color: #004d40; /* Dark Teal */
  text-decoration: none;
}

/* Main Content Sections */
main {
  padding: 30px 0;
}

section {
  background-color: #fff;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.section-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Homepage Specifics */
.hero-section {
  text-align: center;
  background: linear-gradient(
    to right,
    #007bff,
    #004d40
  ); /* Blue to Dark Teal gradient */
  color: #fff;
  padding: 50px 0;
  border-radius: 0; /* Remove border-radius for full width */
  box-shadow: none; /* Remove shadow for hero */
}

.hero-section h2 {
  color: #fff;
  font-size: 2.8em;
  margin-bottom: 20px;
}

.hero-section .hero-text {
  max-width: 800px;
  margin: 0 auto 30px auto;
  font-size: 1.1em;
  line-height: 1.8;
}

.hero-section .hero-image {
  max-width: 100%; /* Ensure it fits within container */
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.latest-news .news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.news-item {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.news-item h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.news-item h3 a {
  color: #004d40;
}

.news-item p {
  font-size: 0.9em;
  color: #555;
  flex-grow: 1; /* Makes sure paragraphs take available space */
}

.news-item .read-more {
  display: inline-block;
  margin-top: 15px;
  background-color: #28a745; /* Green */
  color: #fff;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.news-item .read-more:hover {
  background-color: #218838;
  text-decoration: none;
}

.news-item .news-thumbnail {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover; /* Ensures image covers area */
  border-radius: 5px;
  margin-bottom: 15px;
}

.quick-facts .fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 20px;
  text-align: center;
}

.fact-item {
  background-color: #e0f2f7; /* Light Blue */
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.fact-item .fact-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.fact-item h3 {
  color: #004d40;
  font-size: 1.3em;
}

/* Overview Page Specifics */
.format-explanation h3,
.participating-teams h3,
.venues-section h3 {
  color: #007bff;
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 1.4em;
}

.participating-teams table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.participating-teams th,
.participating-teams td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.participating-teams th {
  background-color: #004d40;
  color: #fff;
  font-weight: bold;
}

.participating-teams tr:nth-child(even) {
  background-color: #f2f2f2;
}

/* Groups & Schedule Specifics */
.group-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.group {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.group h3 {
  color: #007bff;
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
  border-bottom: 2px solid #e0f2f7;
  padding-bottom: 10px;
}

.group table {
  width: 100%;
  border-collapse: collapse;
}

.group th,
.group td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  font-size: 0.9em;
}

.group th {
  background-color: #004d40;
  color: #fff;
}

.group tr:nth-child(even) {
  background-color: #f2f2f2;
}

.match-list {
  margin-top: 30px;
}

.match {
  background-color: #e0f2f7;
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.match .date {
  font-weight: bold;
  color: #004d40;
  flex-basis: 150px;
}

.match .teams {
  flex-grow: 1;
  font-weight: 600;
  color: #333;
}

.match .venue,
.match .group-info {
  font-size: 0.9em;
  color: #555;
}

.match-thumbnail {
  width: 80px; /* Smaller thumbnail for matches */
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  margin-left: auto; /* Pushes image to the right */
}

/* News Section Specifics */
.news-articles {
  display: grid;
  grid-template-columns: 1fr; /* Single column for news list */
  gap: 25px;
  margin-top: 25px;
}

.news-summary {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.news-summary h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.news-summary h3 a {
  color: #004d40;
}

.news-summary .article-date {
  font-size: 0.85em;
  color: #777;
  margin-bottom: 10px;
}

.news-summary .read-more {
  display: inline-block;
  margin-top: 15px;
  background-color: #28a745; /* Green */
  color: #fff;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.news-summary .read-more:hover {
  background-color: #218838;
  text-decoration: none;
}

.news-article .article-meta {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.news-article .article-image {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  margin: 25px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.news-article p {
  margin-bottom: 20px;
  line-height: 1.7;
  font-size: 1.05em;
}

.news-article a {
  font-weight: bold;
}

.pagination {
  text-align: center;
  margin-top: 30px;
}

.pagination a {
  display: inline-block;
  padding: 10px 15px;
  margin: 0 5px;
  border: 1px solid #007bff;
  color: #007bff;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
}

/* History & Records Specifics */
.winners-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.95em;
}

.winners-table th,
.winners-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.winners-table th {
  background-color: #004d40;
  color: #fff;
  font-weight: bold;
}

.winners-table tr:nth-child(even) {
  background-color: #f2f2f2;
}

.top-scorers-list,
.memorable-matches ul {
  list-style-type: disc;
  margin-left: 25px;
  margin-top: 15px;
}

.top-scorers-list li,
.memorable-matches li {
  margin-bottom: 8px;
}

/* Footer */
footer {
  background-color: #333;
  color: #f4f4f4;
  text-align: center;
  padding: 20px 0;
  margin-top: 30px;
  border-top: 5px solid #004d40;
  font-size: 0.9em;
}

footer p {
  margin: 0;
  padding: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    text-align: center;
  }

  header h1 {
    margin-bottom: 15px;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
  }

  nav ul li {
    margin: 5px 0;
  }

  .hero-section h2 {
    font-size: 2em;
  }

  .news-grid,
  .quick-facts .fact-grid,
  .group-tables {
    grid-template-columns: 1fr; /* Stack columns on small screens */
  }

  .match {
    flex-direction: column;
    align-items: flex-start;
  }

  .match .date,
  .match .teams,
  .match .venue,
  .match .group-info,
  .match-thumbnail {
    width: 100%;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }

  .match-thumbnail {
    height: 150px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2em;
  }
  h2 {
    font-size: 1.7em;
  }
  h3 {
    font-size: 1.3em;
  }

  header {
    padding: 15px 0;
  }

  nav ul li {
    margin: 3px 0;
  }

  section {
    padding: 20px;
  }

  .hero-section {
    padding: 30px 0;
  }
}
