@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

h1, h2, h3 {
  font-family: 'Pacifico', cursive;
  color: #00796b; /* keep your original shade */
  text-align: center;
  font-size: x-large;
}

section {
  background-image: url('images/feathers.png');
  background-repeat: no-repeat;
  background-position: top right;
  background-size: 60px;
}

.home-box:hover {
  background-color: #45a049;
}

/* === Base Layout & Global Styles === */

#intro-text {
  text-align: center;
  margin: 2rem auto;
  max-width: 600px;
  font-size: 1.5rem;
  line-height: 1.6;
  color: #00695c;
}

#welcome-section {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  font-family: 'Segoe UI', sans-serif;
  color: #00695c;
  border: 2px solid #ceda46;
}

#welcome-section h2 {
  text-align: center;
  color: #00796b;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  margin-bottom: 1rem;
}

#welcome-section a {
  color: #00695c;
  text-decoration: underline;
}

#start-section {
  background-color: rgba(255, 255, 255, 0.7);
}

#quiz-section {
  background-color: rgba(255, 255, 255, 0.8);
}


#start-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 30vh;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(253,246,227,0.7), rgba(230,230,250,0.7));
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  width: 85%;
  max-width: 400px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  line-height: 1.6;
  padding: 20px;
  background-image: url('images/world_map.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

a {
  color: #0288d1;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* === Header & Navigation === */
header {
  display: flex;
  justify-content: center;      /* centers items horizontally */
  align-items: center;          /* centers items vertically */
  flex-wrap: wrap;              /* allows title and nav to stack if needed */
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  text-align: center; /* Center contents inside header */
  margin-bottom: 20px;
  max-width: 800px;
  margin: 12px auto;
}

.btn .a {
  display: inline-block;
  padding: 12px 24px;
  background-color: #007acc;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #005fa3;
}

.instructions {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.7);
  border: 2px solid #ceda46;
  border-radius: 10px;
  text-align: center;
  font-family: Arial, sans-serif;
}

.instructions h2 {
  margin-top: 0;
  color: #00796b;
}

.instructions p {
  font-size: 2rem;
  line-height: 1.6;
  color: #00796b;
}

.hamburger {
  background-color: #00796b;
  color: white;
  font-size: 28px;
  padding: 0.3em;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
.hamburger:hover {
  color: #ffd700;
}

.menu {
  z-index: 999;
  position: absolute;
  top: 60px;
  right: 10px;
  background-color: #b3be6a;
  padding: 1em;
  border-radius: 5px;
  display: none;
  flex-direction: column;
  gap: 0.5em;
  min-width: 150px;
}

.menu.show {
  display: flex;
}
.menu li a {
  color: rgb(41, 159, 102);
  font-weight: bold;
}

.menu li a:hover {
  background: #f0f0f0;
  color: #0077cc;
  font-size: 1rem; /* or try 16px, 1.2em, etc. */
}

nav.menu li {
  list-style-type: none;
}

/* === Main Layout & Sections === */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1em;
}

section {
  background-color: rgba(16, 184, 50, 0.7);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 2em;
  margin: 1em;
  max-width: 600px;
  width: 90%;
}

/* === Quiz Section === */
#quiz-section {
  max-width: 100%;
  padding: 1em;
}

#quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

#timer-text {
  color: black;
  font-weight: normal;
}

.timer-text {
  font-weight: bold;
  color: #ff5555;
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 15px;
}

#progress-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

#progressBar {
  width: 100%;
  height: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background-color: #eee;
  overflow: hidden;
}
#progressBar::-webkit-progress-value,
#progressBar::-moz-progress-bar {
  background-color: #4caf50;
  transition: width 0.3s ease;
}

.progress-bar {
  background-color: #ddd;
  height: 16px;
  border-radius: 10px;
  overflow: hidden;
  flex-grow: 1;
  margin-left: 10px;
}

.progress-fill {
  background-color: #5da7f9;
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

/* === Buttons & Interactivity === */
button {
  padding: 0.7em 1.2em;
  margin: 0.5em;
  border-radius: 8px;
  border: none;
  background-color: #0077cc;
  color: white;
  font-size: 1rem;
  width: auto;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
button:hover {
  background-color: #005fa3;
}

/* === Images === */
#bird-image {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1em auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* === Feedback Messages === */
.feedback {
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 1em;
  padding: 0.5em;
  position: centered;
  border-radius: 6px;
}
.correct {
  background-color: #c8e6c9;
  color: #2e7d32;
}
.incorrect {
  background-color: #ffcdd2;
  color: #c62828;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* two columns of equal width */
  gap: 10px; /* space between buttons */
}

.choices button {
  width: 100%; /* fill the grid cell */
  padding: 12px;
  font-size: 1em;
  border: none;
  border-radius: 8px;
  background-color: #85c09a;
  cursor: pointer;
  transition: background-color 0.3s;
}

.choices button:hover { background-color: #d1d1d1; }
.choices button.correct { background-color: #a3e3aa; }
.choices button.incorrect { background-color: #f7b5b5; }

/* === Responsive Design === */
@media (max-width: 768px) {
  section {
    padding: 1em;
  }

  #quiz-header {
    flex-direction: column;
    align-items: flex-start;
  }
  #progress-container {
    max-width: 100%;
  }

  #progressFill {
  transition: width 0.9s linear;
  }

}

/* === Desktop Navigation === */
/* Show hamburger only on small screens */
@media (max-width: 768px) {}
    .hamburger {
    display: block;
}

@media screen and (min-width: 1024px) {
  nav.menu a {
    font-size: 0.8rem; /* or any smaller size you prefer */
  }
}

@media (min-width: 769px) {
  .menu {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    gap: 1em;
  }

  .menu {
    display: none;
    flex-direction: column;
  }

  .menu.open {
    display: flex;
  }
}

/* On wider screens, menu is always visible */
@media (min-width: 769px) {
  .menu {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    gap: 1em;
  }

  .hamburger {
    display: none;
  
button {
  transition: background-color 0.3s ease, transform 0.2s ease;
}
button:hover {
  transform: scale(1.05);
   }
}
/* === Base Layout & Global Styles === */

#intro-text {
  text-align: center;
  margin: 2rem auto;
  max-width: 600px;
  font-size: 1.5rem;
  line-height: 1.6;
  color: #333;
}

#quiz-section {
  background-color: rgba(255, 255, 255, 0.8);
}

#results-summary {
  text-align: center;
  border: 2px solid black; /* Example border */
  padding: 20px; /* Example padding */
  margin: 20px auto; /* Example margin and centering the block element */
  text-align: center;
}

#results-summary p {
  font-size: 1.2em; /* Example font size for general paragraphs */
  text-align: center;
}

#final-message {
  font-size: 1.5em; /* Example font size for the final message */
  font-weight: bold; /* Example bolding */
  text-align: center;
}

a {
  color: #0288d1;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

#result {
  font-size: 1.5em;
  font-weight: bold;
  background-color: #e0f7fa;
  color: #00796b;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  text-align: center
}

/* === Main Layout & Sections === */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1em;
}


/* === Quiz Section === */
#quiz-section {
  max-width: 100%;
  padding: 1em;
}

#quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

#timer-text {
  color: black;
  font-weight: normal;
}

.timer-text {
  font-weight: bold;
  color: #ff5555;
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 15px;
}

#progress-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

#progressBar {
  width: 100%;
  height: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background-color: #eee;
  overflow: hidden;
}
#progressBar::-webkit-progress-value,
#progressBar::-moz-progress-bar {
  background-color: #4caf50;
  transition: width 0.3s ease;
}

.progress-bar {
  background-color: #ddd;
  height: 16px;
  border-radius: 10px;
  overflow: hidden;
  flex-grow: 1;
  margin-left: 10px;
}

.progress-fill {
  background-color: #5da7f9;
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.correct {
  background-color: #c8e6c9;
  color: #2e7d32;
}
.incorrect {
  background-color: #ffcdd2;
  color: #c62828;
}

/* === End of Quiz === */
#end-screen {
  text-align: center;
  padding: 2em;
}
#end-screen h2 {
  font-size: 1.5rem;
  margin-bottom: 1em;
  color: #333;
  }
}

#restart-btn {
  background-color: #4caf50;
  color: white;
}
/* === Responsive Design === */

  #quiz-header {
    flex-direction: column;
    align-items: flex-start;
  }
  #progress-container {
    max-width: 100%;
  }

  #progressFill {
  transition: width 0.9s linear;
}

 /* === Desktop Navigation === */

  .hamburger {
    display: none;
  }

.result-item {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 10px;
  border-left: 8px solid;
  background-color: #f9f9f9;
}
.result-item.correct {
  border-color: #4CAF50;
  background-color: #e7fce7;
}
.result-item.incorrect {
  border-color: #f44336;
  background-color: #ffecec;
}
.result-item a {
  display: inline-block;
  margin-top: 0.5em;
  color: #0077cc;
}

.final-score {
  text-align: center;
  background-color: #0077cc;
  border: 2px solid #a2bcd6;
  padding: 20px;
  border-radius: 10px;
  margin: 30px auto;
  max-width: 400px;
  font-family: 'Segoe UI', sans-serif;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  margin-bottom: 1em;
}

#restart-btn {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #4e9af1;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#restart-btn:hover {
  background-color: #357ddf;
}


.info-button {
  background-color: #0077cc;       /* match main quiz button blue */
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  margin-top: 8px;
}

.info-button:hover {
  background-color: #005fa3;       /* darker hover */
  transform: scale(1.05);          /* subtle grow on hover */
}

.info-button:hover {
  color: #005fa3;
}

#results-summary #view-answers {
  font-weight: 700 !important;
  background-color: #0078d4; /* optional */
  color: #fff;               /* optional */
}
#results-summary #view-answers:hover {
  background-color: #0063ad; /* optional */
}


@media (max-width: 600px) {
  #go-home {
    padding: 4px 8px;
    font-size: 0.8rem;
  }
}

@keyframes popUp {
  0% { transform: scale(0.8); opacity: 0; }
  80% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

#go-home {
  display: inline-block;
  padding: 4px 8px;      /* smaller height/width */
  font-size: 0.80rem;     /* slightly smaller text */
  background-color: #0078d4;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  border: none;
  transition: background-color 0.3s ease;
}

/* add to style.css */
#go-home { 
  margin-left: 12px;   /* bump it a bit from the title */
}

#go-home:hover { background-color: #005ea2;
}

#go-home:hover {
  background-color: #45a049;
}

/* Keep review images contained */
#answer-review img,
#answer-review .question-image {
  width: 100%;
  height: auto;
  max-height: 320px;      /* tweak as you like */
  object-fit: contain;    /* no cropping, letterbox if needed */
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 6px;
  box-sizing: border-box;
}

/* Remove busy background on the results page */
body.results-mode {
  background-image: none !important;
  background-color: #a1c9ac !important; /* or #EDF7F1 or #FFF8F0 */
}
/* Make welcome + instructions text bold */
#welcome-section p,
#welcome-section li,
#instructions p,
#instructions li {
  font-weight: 700;  /* try 600 if 700 feels too heavy */
}

/* Keep headings tidy (optional, in case your h1/h2 weren’t bold) */
#welcome-section h1,
#instructions h2 {
  font-weight: 700;
}

/* unify color + weight for Welcome + How to play */
:root { --deep-green: #284737; }

/* Welcome */
#welcome-section,
section.welcome {
  color: var(--deep-green);
}
#welcome-section h1,
section.welcome h1,
#welcome-section p,
section.welcome p,
#welcome-section li,
section.welcome li {
  font-weight: 700;
}

/* How to play — match a few possibilities */
#instructions,
section.instructions,
#how-to-play,
section#how-to-play,
section[data-section="instructions"] {
  color: var(--deep-green);
}

#instructions h2,
section.instructions h2,
#how-to-play h2,
section#how-to-play h2,
section[data-section="instructions"] h2,
#instructions p,
section.instructions p,
#how-to-play p,
section#how-to-play p,
section[data-section="instructions"] p,
#instructions li,
section.instructions li,
#how-to-play li,
section#how-to-play li,
section[data-section="instructions"] li {
  font-weight: 700;
}

/* Match How to play styling to Welcome */
:root { --deep-green: #284737; }  /* same color we used for Welcome */

body #instructions {
  color: var(--deep-green);
}

/* Bold the content inside How to play */
body #instructions h2,
body #instructions p,
body #instructions li {
  font-weight: 700;
}

/* (Optional) If your list items still look muted, tighten spacing a bit */
body #instructions ol,
body #instructions ul {
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

/* Force-bold How to play (id="instructions") */
body #instructions,
body #instructions h2,
body #instructions p,
body #instructions li {
  font-weight: 700 !important;
}

/* Make sure links/buttons inside inherit the same color/weight nicely */
body #instructions a {
  color: inherit;
  font-weight: 700 !important;
}

/* Make 'View Answers' and 'Back to Home' match on the results screen */
#results-summary #view-answers,
#results-summary a.btn,
#results-summary a#back-home,
#results-summary a[href="index.html"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;     /* same size */
  font-size: 0.95rem;    /* same text size */
  line-height: 1;        /* compact height */
  font-weight: 700;      /* bold to match */
  border-radius: 6px;
  text-decoration: none;
}

/* If you want them to share the same color too */
#results-summary #view-answers,
#results-summary a.btn,
#results-summary a#back-home,
#results-summary a[href="index.html"] {
  background-color: #0078d4;
  color: #fff;
}
#results-summary #view-answers:hover,
#results-summary a.btn:hover,
#results-summary a#back-home:hover,
#results-summary a[href="index.html"]:hover {
  background-color: #0063ad;
}

/* Make results and review align exactly with the quiz card */
#quiz-wrapper,
#results-summary,
#answer-review {
  max-width: 520px;       /* match your #quiz-wrapper width */
  margin: 0 auto;         /* center horizontally */
  box-sizing: border-box;
}

/* Keep consistent spacing above/below */
#results-summary,
#quiz-wrapper {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Make Home look exactly like Play Again on the View Answers page */
#answer-review .review-actions button,
#answer-review .review-actions a {
  all: unset;                 /* reset any inherited junk */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 14px !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  border: 0 !important;
  background: #4e9af1 !important;
  color: #fff !important;
  box-shadow: 0 2px 4px rgba(0,0,0,.2) !important;
  cursor: pointer !important;
}
#answer-review .review-actions button:hover,
#answer-review .review-actions a:hover {
  background: #357ddf !important;
}

#answer-review .result-item {
  border: 2px solid #cfcfcf;  /* base */
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
  background: #fff;
}

/* Simple card look to match your quiz container */
.card {
  background: rgba(255, 255, 255, 0.7);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  max-width: 800px;         /* align with quiz/results width */
  margin: 20px auto;
  box-sizing: border-box;
  border: 2px solid #ceda46;
  font-weight: 700;
}

/* Pledge emphasis */
#conservation .pledge {
  margin-top: 10px;
  padding: 10px 14px;
  border-left: 4px solid #2e7d32;   /* your green */
  background: rgba(255, 255, 255, 0.7);
}

/* Quotes styling */
#quotes blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 4px solid #2e7d32;
  background: #f7fbf8;
  font-style: italic;
}
#quotes .attribution {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-weight: 800;
  color: #2e7d32;
}

/* Sources list */
#sources .sources-list {
  margin: 10px 0 6px;
  padding-left: 18px;
}
#sources .sources-list li {
  margin: 6px 0;
}
#sources .note {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #333;
}

.card {
  background:rgba(255, 255, 255, 0.7); padding:20px; border-radius:12px;
  box-shadow:0 4px 10px rgba(0,0,0,0.08);
  max-width: 1000px; margin:20px auto; box-sizing:border-box;
}
#conservation .pledge {
  margin-top:10px; padding:10px 14px;
  border-left:4px solid #2e7d32; background:#f3faf4;
}
#quotes blockquote {
  margin:12px 0; padding:10px 14px;
  border-left:4px solid #2e7d32; background:#f7fbf8; font-style:italic;
}
#quotes .attribution {
  display:block; margin-top:6px; font-style:normal; font-weight:600; color:#2e7d32;
}
#sources .sources-list { margin:10px 0 6px; padding-left:18px; }
#sources .sources-list li { margin:6px 0; }
#sources .note { margin-top:8px; font-size:0.95rem; color:#333; }

/* compact Home-style button */
.btn-home {
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 14px; font-size:0.95rem; line-height:1;
  font-weight:700; border-radius:6px; text-decoration:none;
  border:0; background:#0078d4; color:#fff;
  box-shadow:0 2px 4px rgba(0,0,0,.2);
}
.btn-home:hover { background:#0063ad; }

/* Header brand */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 100px;          /* adjust to taste: 32–56px works well */
  height: 100px;
  object-fit: contain;
  border-radius: 8px;    /* remove if your logo shouldn’t be rounded */
}

.brand-name {
  font-weight: 700;
  font-size: 1.2rem;     /* bump up or down as needed */
  color: #00796b;       /* dark gray; or inherit */
}

/* Wider cards on the home page only */
body.home .card {
  max-width: 1000px;      /* was ~600px */
  margin-left: auto;
  margin-right: auto;
}

/* If your home sections aren't using .card, widen those too */
body.home #welcome-section,
body.home #instructions,
body.home .instructions {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* Top header bar with logo + title + nav */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

/* Logo + name cluster */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}
.brand-logo {
  width: 175px;     /* tweak to taste: 32–56px works well */
  height: 120px;
  object-fit: contain;
  border-radius: 8px; /* remove if your logo is circular/square and you want no rounding */
  margin-right: 20px;
}
.brand-name {
  font-weight: 700;
  font-size: 1.2rem;  /* adjust as needed */
}

/* Right-side nav links */
.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.main-nav .nav-link {
  display: inline-block;
  padding: 6px 10px;
  font-size: 0.95rem;
  background: #0078d4;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  transition: background-color .2s ease;
}
.main-nav .nav-link:hover,
.main-nav .nav-link:focus {
  background: #005ea2;
  outline: none;
}

/* Small screens: let items wrap neatly */
@media (max-width: 460px) {
  .top-bar { flex-wrap: wrap; }
  .main-nav { width: 100%; justify-content: flex-start; }
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;   /* no underline */
  line-height: 0;          /* removes tiny gap around inline images */
}

.brand-logo-link:focus {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
  border-radius: 10px;     /* matches your rounded logo corners */
  /* optional: add a soft focus shadow */
  box-shadow: 0 0 0 2px rgba(26,115,232,0.15);
}

/* Mobile-friendly header layout */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;           /* <-- let it wrap on small widths */
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;              /* prevent overflow */
}

.brand-logo { width: 36px; height: 36px; } /* slightly smaller on mobile */
.brand-name { font-size: 1.1rem; }

/* Nav always visible; drops below brand on wrap */
.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  overflow: visible;         /* ensure not clipped */
}

.main-nav .nav-link {
  padding: 6px 10px;
  font-size: 0.95rem;
}

/* Tighten further for very small screens */
@media (max-width: 430px) {
  .top-bar { align-items: flex-start; }
  .brand-logo { width: 32px; height: 32px; }
  .brand-name { font-size: 1rem; }
  .main-nav { width: 100%; margin-top: 6px; } /* forces nav onto next line */
}

/* Base header layout */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hamburger button */
.menu-toggle {
  display: none;                /* hidden by default (desktop) */
  width: 40px; height: 40px;
  border: none; border-radius: 6px;
  background: #0078d4;
  position: relative;
  cursor: pointer;
}
.menu-toggle:hover { background:#005ea2; }
.menu-toggle span {
  position: absolute; left: 8px; right: 8px;
  height: 2px; background: #fff; border-radius: 2px;
}
.menu-toggle span:nth-child(1) { top: 12px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 26px; }

/* Nav (desktop default) */
.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Mobile behavior */
@media (max-width: 640px) {
  .menu-toggle { display: inline-block; }     /* show hamburger */
  /* collapse nav by default on phones */
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
  }
  /* when open, show it */
  .main-nav.open { display: flex; }

  /* tighten logo/title a bit */
  .brand-logo { width: 32px; height: 32px; }
  .brand-name { font-size: 1rem; }
}

/* Layout */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;            /* more space between logo and title */
  min-width: 0;
}
.brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.brand-name { margin: 0; font-size: 1.25rem; font-weight: 700; }

/* Nav (desktop) */
.menu ul {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu a {
  display: inline-block;
  padding: 6px 10px;
  font-size: 0.95rem;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color .2s ease;
}
.menu a:hover, .menu a:focus { background:#005ea2; outline: none; }

/* Hamburger button */
.hamburger {
  display: none;           /* hidden on desktop */
  font-size: 1.4rem;
  line-height: 1;
  width: 42px; height: 42px;
  border: none; border-radius: 6px;
  background: #0078d4; color: #fff;
  cursor: pointer;
}
.hamburger:hover, .hamburger:focus { background:#005ea2; }

/* Mobile behavior */
@media (max-width: 640px) {
  .brand-logo { width: 32px; height: 32px; }
  .brand-name { font-size: 1.1rem; }

  .hamburger { display: inline-block; }

  /* collapse nav by default on phones */
  .menu {
    display: none;
    width: 100%;
  }
  .menu.open { display: block; }

  .menu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
  }
  .menu a { width: auto; }
}

/* Make the header a vertical stack and center brand */
.top-bar {
  position: relative;           /* so we can place the hamburger on mobile */
  display: flex;
  flex-direction: column;       /* brand on top, nav below */
  align-items: center;          /* center brand horizontally */
  gap: 10px;
  padding: 12px 16px;
}

/* Center the brand cluster and enlarge the logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;                    /* space between logo and title */
  text-align: center;
}
.brand-logo {
  width: 100px;                  /* ⬅️ bigger logo (adjust to taste) */
  height: 100px;
  object-fit: contain;
  border-radius: 10px;
}
.brand-name {
  margin: 0;
  font-size: 1.4rem;            /* slightly larger title */
  font-weight: 800;
}

/* Center the desktop nav under the brand */
.menu ul {
  justify-content: center;      /* center nav row */
}

/* Hamburger placement on phones */
.hamburger {
  position: absolute;
  right: 12px;                  /* keep it reachable with thumb */
  top: 12px;
}

/* Phone tweaks */
@media (max-width: 640px) {
  .brand-logo { width: 56px; height: 56px; }    /* still large but a touch smaller on tiny screens */
  .brand-name { font-size: 1.25rem; }
  .menu { width: 100%; }                        /* menu spans width when open */
  .menu ul { align-items: center; }             /* center links in column layout */
}

/* Reusable green pill link (like your home tiles) */
.pill-green {
  display: inline-block;
  padding: 6px 12px;
  background: #2e7d32;        /* green */
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;

  .highlight-card {
  border-left: 6px solid #2e7d32;  /* your green accent */
  background: #f5fbf6;             /* subtle green-tinted background */
}
#current-quiz h2 { margin-top: 0; }
#current-quiz-title {
  font-weight: 700;
  font-size: 1.05rem;
}

/* Center text inside the "This Week’s Quiz" card */
#current-quiz {
  text-align: center;
}

/* Optional alt style */
.highlight-card {
  border-left: none;
  border-top: 6px solid #2e7d32;
  background: #f5fbf6;
}

}

/* Center text inside the "This Week’s Quiz" card */
section#current-quiz,
.card.highlight-card#current-quiz {
  text-align: center !important;
}

/* Plain green text links for pages that don't want pill/button styles */
.text-link {
  color: #2e7d32;
  text-decoration: none;
  font-weight: 600;
}
.text-link:hover {
  text-decoration: underline;
}

/* --- Unified header layout --- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0; /* prevent overflow */
}

.brand-logo {
  width: clamp(40px, 8vw, 70px);  /* responsive size */
  height: auto;
  display: block;
}

.brand-name {
  margin: 0;
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hamburger */
.hamburger {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

/* Nav */
.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: clamp(10px, 2.5vw, 18px);
}
.menu a {
  text-decoration: none;
  color: #2e7d32;          /* green text links, consistent with your choice */
  font-weight: 600;
}
.menu a:hover { text-decoration: underline; }

/* Mobile: collapse to hamburger */
@media (max-width: 720px) {
  .menu { display: none; }
  .menu.open { display: block; }
  .menu.open ul {
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 10px;
    margin-top: 8px;
  }
}

/* ——— Bigger header brand/logo/text ——— */
.brand-logo {
  /* was: clamp(40px, 8vw, 70px) */
  width: clamp(56px, 9vw, 96px);
}

.brand-name {
  /* was: clamp(1.1rem, 3.5vw, 1.6rem) */
  font-size: clamp(1.35rem, 4.2vw, 2rem);
  letter-spacing: 0.3px;
}

/* Slightly larger nav links */
.menu a {
  font-size: clamp(0.98rem, 2.6vw, 1.1rem);
}

/* Larger hamburger icon for mobile */
.hamburger {
  font-size: 1.8rem; /* was 1.4rem */
  padding: 4px 8px;  /* a bit more hit area */
}

/* Add a touch more breathing room in the header */
.top-bar {
  padding: 12px 16px; /* was 10px 14px */
  gap: 14px;          /* was 12px */
}

.hamburger { position: relative; z-index: 10; }
.menu { position: relative; z-index: 9; }

/* On very small screens, allow logo to scale a bit more */
@media (max-width: 420px) {
  .brand-logo { width: clamp(52px, 12vw, 88px); }
  .brand-name { font-size: clamp(1.25rem, 5vw, 1.7rem); }
}

/* Desktop: keep menu INSIDE the header card */
@media (min-width: 721px) {
  .top-bar { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 14px;
  }
  .top-bar .menu {
    display: block !important;
    position: static !important;   /* kill any leftover absolute positioning */
    margin: 0;
  }
  .top-bar .menu ul {
    display: flex;
    flex-direction: row;
    gap: clamp(10px, 2.5vw, 18px);
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;                     /* ensure no outside spacing */
    box-shadow: none;
  }
  .top-bar .hamburger { display: none; } /* desktop doesn't need it */
}

/* Mobile: menu toggles INSIDE header (for completeness) */
@media (max-width: 720px) {
  .menu { display: none !important; }
  .top-bar.menu-open { 
    flex-direction: column; 
    align-items: stretch; 
    gap: 8px; 
  }
  .top-bar.menu-open .menu { display: block !important; }
}


.pill-green:hover { background: #1b5e20; }

.credits-list { padding-left: 18px; line-height: 1.5; }
.credits-list a { text-decoration: underline; }

.photo-credit { font-size: 0.85rem; color: #566; margin-top: 6px; }
.photo-credit a { color: inherit; text-decoration: underline; }



#answer-review .result-item.correct   { border-color: #2e7d32 !important; background: #edf7ee; }
#answer-review .result-item.incorrect { border-color: #c62828 !important; background: #fbeaea; }

/* ——— Mobile-only header behavior ——— */
@media (max-width: 720px) {
  /* Always show the hamburger on mobile */
  .hamburger {
    display: inline-block !important;
    font-size: 1.8rem;
    color: #2e7d32;           /* visible on light background */
    background: transparent;
    border: 0;
    line-height: 1;
    padding: 6px 10px;
  }

  /* Hide menu by default on mobile */
  .top-bar .menu {
    display: none !important;
    position: static !important; /* keep it inside the header card */
    margin: 0;
  }

  /* When header has .menu-open (toggled), stack links inside the card */
  .top-bar.menu-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .top-bar.menu-open .menu { display: block !important; }
  .top-bar.menu-open .menu ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
  }
}

/* ——— Desktop keeps inline nav and hides hamburger ——— */
@media (min-width: 721px) {
  .top-bar .menu { display: block !important; position: static !important; }
  .top-bar .hamburger { display: none !important; }
}

/* --- Force reliable mobile header behavior (<721px) --- */
@media (max-width: 720px) {
  header.top-bar { position: relative; z-index: 5; }

  /* FORCE the hamburger to be visible/clickable on mobile */
  header.top-bar .hamburger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: transparent !important;
    border: 0 !important;
    cursor: pointer;
    z-index: 10;
  }
  /* ensure the SVG bars are visible (dark green) */
  header.top-bar .hamburger svg rect {
    fill: #2e7d32 !important;
  }

  /* Hide menu by default; show only when header has .menu-open */
  header.top-bar .menu { display: none !important; position: static !important; margin: 0; }
  header.top-bar.menu-open { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  header.top-bar.menu-open .menu { display: block !important; }
  header.top-bar.menu-open .menu ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
  }
}

/* --- Desktop keeps inline nav and hides hamburger --- */
@media (min-width: 721px) {
  header.top-bar .menu { display: block !important; position: static !important; }
  header.top-bar .hamburger { display: none !important; }
}

/* --- Force reliable mobile header behavior (<721px) --- */
@media (max-width: 720px) {
  header.top-bar { position: relative; z-index: 5; }

  /* FORCE the hamburger to be visible/clickable on mobile */
  header.top-bar .hamburger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: transparent !important;
    border: 0 !important;
    cursor: pointer;
    z-index: 10;
  }
  /* ensure the SVG bars are visible (dark green) */
  header.top-bar .hamburger svg rect {
    fill: #2e7d32 !important;
  }

  /* Hide menu by default; show only when header has .menu-open */
  header.top-bar .menu { display: none !important; position: static !important; margin: 0; }
  header.top-bar.menu-open { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  header.top-bar.menu-open .menu { display: block !important; }
  header.top-bar.menu-open .menu ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
  }
}

/* --- Desktop keeps inline nav and hides hamburger --- */
@media (min-width: 721px) {
  header.top-bar .menu { display: block !important; position: static !important; }
  header.top-bar .hamburger { display: none !important; }
}

/* Keep the header on top on the quiz page */
header.top-bar { position: relative; z-index: 1000; }

/* Make sure quiz elements don't overlay the header */
#quiz-wrapper,
.quiz-container,
#quiz-section,
#question-img {
  position: relative;
  z-index: 1;
}

/* On mobile, menu opens inside header as a column */
@media (max-width: 720px) {
  header.top-bar .menu { display: none !important; }
  header.top-bar.menu-open { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  header.top-bar.menu-open .menu { display: block !important; }
  header.top-bar.menu-open .menu ul {
    display: flex; flex-direction: column; gap: 10px;
    background: transparent; border: 0; padding: 0; margin: 0; box-shadow: none;
  }
}

/* Remove map + use a soft green on results/review screens */
body.results-mode,
body.review-mode {
  background-image: none !important;
  background-color: #eef8ee;        /* light, calm green */
  /* optional hard resets if your base sets these */
  background-size: auto !important;
  background-position: initial !important;
  background-repeat: no-repeat !important;
}

/* Temporary: hide legacy bottom buttons now that we have a footer */
.hide-legacy-bottom {
  display: none !important;
}

/* ---------- Global footer ---------- */
.site-footer {
  margin-top: 24px;
  background: #f6f7fb;        /* soft light background */
  border-top: 1px solid #e6e6e6;
}

.site-footer .footer-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 20px;
  display: grid;
  gap: 10px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.footer-nav a {
  color: #0f6c3f;             /* same green as your site links */
  text-decoration: none;
  font-weight: 600;
}

.footer-nav a:hover,
.footer-nav a:focus {
  text-decoration: underline;
}

.footer-copy {
  color: #666;
  font-size: 0.95rem;
}

/* tighten on very small screens */
@media (max-width: 420px) {
  .site-footer .footer-inner {
    padding: 14px 16px;
  }
  .footer-nav a {
    font-size: 0.95rem;
  }
}

/* Boxed footer variant: use this on pages where you don't want a full-width bar */
.site-footer.boxed {
  background: transparent;        /* remove the full-width background strip */
  border-top: 0;                  /* no full-width top border */
}

.site-footer.boxed .footer-inner {
  max-width: 980px;               /* keep consistent page width */
  margin: 16px auto 0;
  background: #f6f7fb;            /* same soft panel look as cards */
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  padding: 16px 20px;
}

/* ===== Transparent footers (both full-width and boxed) ===== */

/* Remove bar background on the default footer */
.site-footer {
  background: transparent;
  border-top: 0;               /* no hard line across the page */
}

/* Make the boxed footer panel transparent too */
.site-footer.boxed .footer-inner {
  background: transparent;     /* kill the white panel */
  border: 0;                   /* remove thin gray border */
  box-shadow: none;            /* remove card shadow */
  padding: 16px 20px;          /* keep spacing */
}

/* Keep content centered (from earlier step) */
.site-footer .footer-inner {
  justify-items: center;
  text-align: center;
}

.site-footer .footer-nav {
  justify-content: center;
}

.site-footer.boxed .footer-inner { justify-items: center; text-align: center; }
.site-footer.boxed .footer-nav { justify-content: center; }
.site-footer.boxed .footer-copy { text-align: center; }
