/* Base resets and variables */
:root {
  --text-color: #111;
  --link-color: #0645ad;
  --link-visited: #0b0080;
  --bg-color: #fff;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.5;
}

body {
  margin: 0;
  color: var(--text-color);
  /* Soft, paper-like off-white background */
  background: #f7f5ef;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

a {
  color: var(--link-color);
}
a:visited {
  color: var(--link-visited);
}
a:focus {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

/* Layout */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
}
.skip-link:focus {
  top: 0;
}

header.site-header {
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
  background: rgba(255,255,255,0.92);
}

.container-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
}

.center { text-align: center; }
.right { text-align: right; }
.left { text-align: left; }

/* Typography */
h1, h2, h3 {
  line-height: 1.25;
}
h1 { font-size: 2rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.5rem; margin: 1.25rem 0 0.5rem; }
h3 { font-size: 1.125rem; margin: 1rem 0 0.5rem; }

p { margin: 0.5rem 0; }
ul { margin: 0.5rem 0 0.75rem 1.25rem; }

/* Media */
img { max-width: 100%; height: auto; }
.float-right { float: right; margin: 0 0 0.75rem 1rem; }
.float-left { float: left; margin: 0 1rem 0.75rem 0; }

.front-cover {
  text-align: center;
}

/* Nav */
nav.site-nav {
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

nav.site-nav .container-nav {
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
}

#main-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav.site-nav a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
}

nav.site-nav a:hover {
  background: #ddd;
  text-decoration: none;
}

/* Utility for visually hidden content */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Footer */
footer.site-footer {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: #333;
}

.subfooter {
  border-top: 1px solid rgb(29, 29, 29);
  color: rgb(255, 255, 255);
  background-color: #222;
  padding: 16px 0;
  font-family: sofia-pro, sans-serif;
}

.subfooter a {
  color: #fff;
}

.subfooter .list-unstyled {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.subfooter .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.subfooter .col-md-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  padding-right: 15px;
  padding-left: 15px;
}

.subfooter .copyright-text {
  text-align: center;
  margin: 0;
}

.subfooter .copyright {
  text-align: right;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
  }

  #main-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    flex-direction: column;
    align-items: center;
    padding-top: 3rem; /* Space for the button */
  }

  #main-nav.nav-open {
    max-height: 500px; /* Adjust as needed */
  }

  .float-right, .float-left { float: none; margin: 0 0 1rem 0; }
}

@media (min-width: 769px) {
  #main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: center;
  }
}
