/* --- Basic reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f3ef;
  color: #222;
  line-height: 1.5;
}

a {
  color: #1a5fd0;          /* classic readable blue */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: #1248a3;         /* slightly darker on hover */
}

/* normal links (blue like users expect) */
a { color: #1a0dab; }
a:visited { color: #681da8; }
a:hover { text-decoration: underline; }

/* top nav dropdown “tabs” */
.nav-link.tab {
  color: #000;
  background: #fff;
  border: 1px solid #000;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
}
.nav-link.tab:hover { background: #f3f3f3; }


/* Top navigation boxed links */
.nav-link {
  color: #111;
  text-decoration: none;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fafafa;
  font-weight: 500;
}

.nav-link:hover,
.nav-link:focus {
  background: #f0f0f0;
  border-color: #bbb;
  color: #111;
  text-decoration: none; /* keep nav clean */
}



/* --- Page frame --- */
.page-wrapper {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1.5rem 2rem 3rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* --- Header --- */
header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.site-title {
  font-size: 1.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.site-subtitle {
  font-size: 0.95rem;
  color: #666;
}

/* --- Navigation --- */
nav {
  margin-top: 0.75rem;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  font-size: 0.98rem;
  border-top: 1px solid #eee;
  padding-top: 0.6rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  padding: 0.2rem 0;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link:focus {
  border-color: #b33a2f;
  outline: none;
}

/* --- Dropdown menu --- */
.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 0;
  min-width: 220px;
  padding: 0.5rem 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  border: 1px solid #e2e2e2;
  display: none;
  z-index: 10;
}

.dropdown-menu a {
  display: block;
  padding: 0.4rem 0.9rem;
  font-size: 0.93rem;
  white-space: nowrap;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background: #f5f3ef;
  outline: none;
}

/* Show dropdown on hover or focus */
.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  display: block;
}

/* --- Main layout --- */
main {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 1.5rem;
}

/* Quiz of the Day card */
.quiz-of-day {
  border-radius: 12px;
  border: 1px solid #ddd;
  padding: 1.5rem;
  background: #faf7f2;
}

.quiz-of-day h1 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.quiz-of-day p {
  margin-bottom: 0.9rem;
  font-size: 0.98rem;
}

.quiz-of-day .meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.8rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid #b33a2f;
  background: #b33a2f;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

/* --- Right column --- */
.side-panel {
  font-size: 0.93rem;
}

.side-panel h2 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.side-panel section {
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #eee;
}

.side-panel ul {
  list-style: none;
  padding-left: 0;
}

.side-panel li + li {
  margin-top: 0.25rem;
}

/* --- Responsive --- */
@media (max-width: 800px) {
  .page-wrapper {
    margin: 0.75rem;
    padding: 1rem 1.1rem 2rem;
  }

  main {
    grid-template-columns: 1fr;
  }

  .nav-list {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}
