/* style.css */

/* Global font and background */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #e6f0ff;
  color: #003366;
}

header {
  background-color: #003366;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  position: relative;
}

nav li {
  position: relative;
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  padding: 0.5rem;
  display: block;
}

nav li:hover > ul {
  display: block;
}

nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #003366;
  padding: 0.5rem 0;
  list-style: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 1000;
}

nav ul ul li a {
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

main h2 {
  text-align: center;
  color: #003366;
  font-size: 2rem;
  margin-bottom: 2rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  max-width: 600px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

th, td {
  border: 1px solid #99c2ff;
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: #cce0ff;
}

footer {
  background-color: #003366;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* ✅ Table grid layout — moved outside media query */
.table-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 equal-width columns */
  gap: 20px;
  margin: 20px auto;
  max-width: 1200px;
}

.table-grid table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #ccc;
}

.table-grid th, .table-grid td {
  padding: 8px;
  border: 1px solid #ccc;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  main {
    padding: 1rem;
  }

  .table-grid {
    grid-template-columns: repeat(1, 1fr); /* stack tables on mobile */
  }
}
