/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styling */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fff8f6;
  color: #222;
}

/* Subheader */
.subheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #eee;
  color: #333;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-style: italic;
  border-bottom: 1px solid #ccc;
  font-weight: 500;
}

.subheader-left {
  flex: 1;
}

.subheader-right {
  flex: 1;
  text-align: right;
}

/* Header */
header {
  position: relative;
  background: url('images/slavetrade-map.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
  z-index: 1;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(173, 216, 230, 0.5);
  z-index: -1;
}

header h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

header p {
  font-size: 1.2rem;
  font-weight: 400;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
}

/* Main Content */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

main section {
  margin-bottom: 2rem;
  scroll-margin-top: 80px; /* ensures anchor links are visible below nav */
}

section p {
  margin-bottom: 1.2em;
  line-height: 1.7;
}

/* Headings */
h1, h2, h3 {
  color: #800000;
  margin-bottom: 1rem;
  text-align: center;
}

/* Paragraphs */
p {
  margin-bottom: 1.2em;
  line-height: 1.6;
}

/* Buttons */
.cta-button,
.button {
  display: inline-block;
  background-color: #800000;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  margin: 0.5rem auto;
}

.cta-button:hover,
.button:hover {
  background-color: #a30000;
}

/* Mission Box */
.mission-box {
  background: url('images/paper-texture.png') center/cover repeat;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 750px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-left: 6px solid #800000;
  animation: fadeIn 1.2s ease-in-out;
  opacity: 0;
  transform: translateY(20px);
  animation-fill-mode: forwards;
}

.mission-box::before {
  content: "\1F56F";
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-align: center;
  color: #800000;
}

.mission-box h2 {
  margin-bottom: 1rem;
  color: #800000;
  font-size: 2rem;
}

.mission-box p {
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: center;
  color: #333;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Timeline */
.timeline-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: #fff;
  border-radius: 10px;
}

.timeline-entry {
  border-left: 4px solid #800000;
  margin: 2rem 0;
  padding-left: 1rem;
}

.timeline-entry h3 {
  color: #800000;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.timeline-entry figure {
  margin: 1rem 0;
  text-align: center;
}

.timeline-block img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.timeline-entry figcaption {
  font-size: 0.85rem;
  font-style: italic;
  color: #555;
  margin-top: 0.5rem;
  text-align: center;
}

/* Utilities */
ul {
  list-style-position: outside;
  padding-left: 1.2rem;
  margin: 1rem auto;
  max-width: 700px;
  text-align: left;
}

.intro {
  text-align: center;
  font-style: italic;
  margin-bottom: 2rem;
}

footer {
  text-align: center;
  padding: 1rem;
  background-color: #222;
  color: #ccc;
  font-size: 0.9rem;
  margin-top: 2rem;
}

/* ===== NAVIGATION STYLES ===== */

/* Nav container */
.nav-container {
  display: flex;
  align-items: left;
  position: relative;
}

/* Nav bar background and padding */
nav {
  background: #333;
  color: white;
  padding: 0.5em;
}

/* Nav links - hidden by default */
  .nav-links {
    display: none;
    flex-direction: column;
    background: #333;
    top: 100%;
    left: 0;
    width: 220px;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 999;
  }

/* Nav links styling */
.nav-links li {
   text-align: left;
}
  
.nav-links li a {
  color: white;
  text-decoration: none;
  padding: 0.75em 1em;
  display: block;
  text-align: left;
  width: 100%;
  margin: 0;
  white-space: normal;
}

/* Hamburger always visible */
.hamburger {
  display: block;
  font-size: 1.5em;
  cursor: pointer;
  padding: 0.5em;
}

/* Nav shown when active */
.nav-links.active {
  display: flex;
}
