* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0px;
  padding: 0px;
  overflow-x: hidden;
}

html {
  --primary-color: #d4af37; /* Gold for accents */
  --secondary-color: #de4429; /* Dark red for headings */
  --tertiary-color: #4b0082; /* Indigo for secondary elements */
  --background-color: #121212; /* Dark background */
  --background-color-light: #27282b; /* Lighter dark for variations */
  --grey: #747579; /* Neutral grey */
  --medium-grey: #cccccc; /* Medium grey */
  --dark-grey: #3a3f47; /* Darker grey */
  --app-section-even-color: #232528;
  --app-section-odd-color: #2f3037;
  --app-section-odd-color-rgb: 47, 48, 55;
  --border-radius: 10px;
  --content-width: 750px;
  --box-shadow: 7px 7px 20px 0px rgba(0, 0, 0, 0.4);
  --box-shadow-active: 10px 10px 30px 0px rgba(0, 0, 0, 0.6);
  font-size: 20px;
  line-height: 1.6rem;
  color: var(--medium-grey);
  letter-spacing: 1px;
  background-color: var(--background-color-light);
  font-family: "Times New Roman", Times, serif;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0 0 10rem 0;
}

h1 {
  font-size: 2.5rem;
  line-height: 1;
  font-weight: 500;
  color: var(--primary-color);
  margin: 3rem 0 0 0;
}

h2 {
  font-size: 2rem;
  line-height: 1;
  font-weight: 400;
  color: var(--primary-color);
  margin: 2rem 0 0 0;
}

h3 {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--primary-color);
  margin: 1rem 0 0.5rem 0;
}

h4 {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 300;
  letter-spacing: 1px;
  color: var(--primary-color);
  margin: 1.5rem 0 0.5rem 0;
}

h5 {
  font-size: 1rem;
  line-height: 1;
  font-style: italic;
  font-weight: 300;
  margin: 1rem 0 0.5rem 0;
}

h6 {
  font-size: 1rem;
  line-height: 1;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--tertiary-color);
  margin: 1rem 0 0.5rem 0;
}

p {
  font-size: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a.disabled {
  pointer-events: none;
  color: var(--grey);
}

a.active {
  color: var(--secondary-color);
}

a:not(.disabled):hover {
  color: var(--secondary-color);
}

small {
  font-size: 0.75em;
}

section {
  background-color: var(--background-color-light);
}

section > *, footer > *, header > *, nav > * {
  max-width: var(--content-width);
  margin-right: auto;
  margin-left: auto;
}

header {
  padding: 1rem;
  text-align: center;
}

footer {
  padding: 1rem;
  background: var(--tertiary-color);
}

nav {
  background: var(--dark-grey);
  position: fixed;
  bottom: 0;
  width: 100vw;
  box-shadow: var(--box-shadow);
}

nav > div {
  display: flex;
  width: 100%;
  overflow-x: scroll;
}

nav a {
  flex-grow: 1;
  flex-basis: 0;
  padding: 0.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--medium-grey);
  border-bottom: 3px solid var(--dark-grey);
  transition: all 0.3s ease;
}

nav a:hover {
  color: var(--primary-color);
  border-bottom: 3px dashed var(--primary-color);
}

nav a.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

img {
  max-width: 100%;
  border-radius: var(--border-radius);
}

ul.breadcrumb {
  padding: 0;
  list-style: none;
}

ul.breadcrumb li {
  display: inline;
}

ul.breadcrumb li+li:before {
  padding: 8px;
  content: "/\00a0";
}

a.item {
  text-decoration: none;
  transition: all 250ms ease;
  color: var(--tertiary-color);
}

a.item {
  padding: 0;
  margin: 0;
}

a.item:hover, a.item:focus {
  text-decoration: none;
  box-shadow: var(--box-shadow);
  background-color: var(--grey);
}

.date {
  font-style: italic;
  color: var(--grey);
  margin: 0.25rem auto 0 auto;
}

.number-suffix {
  vertical-align: super;
  font-size: 0.75rem;
  line-height: 0;
  position: relative;
  left: -4px;
}

.title-section {
  margin-top: 2rem;
  text-align: center;
  padding: 0;
}

.rich-text p, .rich-text h1, .rich-text h2, .rich-text h3, .rich-text h4, .rich-text h5, .rich-text h6 {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.rich-text h3 {
  margin-top: 1rem;
}

.img-two-column:first-of-type {
  margin-left: auto;
}

.img-columns {
  max-width: var(--content-width);
  margin: 1rem auto 1rem auto;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.img-columns a {
  width: 40%;
}

.map {
  max-width: 300px;
  margin: auto;
}

.search-entry .richtext-img {
  max-width: 100%;
  margin: 0;
  border-radius: var(--border-radius);
}

.search-entry {
  clear: right;
  margin-top: 2rem;
  background-color: var(--app-section-odd-color);
  padding: 2rem;
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  transition: all 350ms ease;
}

.search-entry h4 {
  margin-top: 0;
}

.search-entry:hover {
    box-shadow: var(--box-shadow-active);
}

.fullscreen-img {
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.8);
  position: fixed;
  top: 0;
  right: 0;
}

.fullscreen-img > img {
  max-width: 100vw;
  max-height: 100vh;
  display: block;
  margin: auto;
}

.character-list {
  columns: 239px 3;
}

.character-from-list:first-of-type {
  margin-top: 0;
}

.character-from-list {
  text-align: center;
  break-inside: avoid;
  padding: 1rem 0.5rem;
  background-color: var(--dark-grey);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.character-from-list h4 {
  margin-top: 0;
}

.img-fullscreen {
  width: 100vw;
  max-width: 100vw;
  border-radius: 0;
  margin: 1rem 0;
}

dnd-search-box {
  margin-bottom: 1rem;
  display: block;
  background-color: var(--background-color-light);
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

.sound-icon {
  all: unset;
  display: inline-block;
  cursor: pointer;
}

.sound-icon svg {
  color: var(--grey);
  height: 30px;
  width: 30px;
  position: relative;
  top: 6px;
  transition: color 350ms ease;
}

.sound-icon:hover svg {
  color: var(--secondary-color);
}

.card {
  background-color: var(--app-section-odd-color);
  border-radius: var(--border-radius);
  margin: 2rem auto 2rem auto;
  position: relative;
  box-shadow: var(--box-shadow);
  transition: all 350ms ease;
}

.card:hover {
  box-shadow: var(--box-shadow-active);
}

.card .card-content {
  padding: 1.5rem;
}

.card .card-hero {
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: 0;
  margin: 0;
  display: block;
}

.card .sound-icon {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
}

.card .sound-icon svg {
  color: var(--medium-grey);
}

.card h3 {
  display: block;
  width: 100%;
  margin: 0 0 1rem 0;
  text-align: center;
  margin: 0;
}

.card h3 a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 350ms ease;
}

.card h3 a:hover {
  color: var(--secondary-color);
}

.song-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  display: none;
}

.song-content {
  background: var(--background-color-light);
  box-shadow: var(--box-shadow);
  max-height: 80vh;
  overflow-y: scroll;
  margin: 100px auto;
  position: relative;
  opacity: 0;
  transform: translateY(-20vh);
}

.song-backdrop.visible,
.song-backdrop.opening {
  display: flex;
}

.song-backdrop.visible .song-content {
  opacity: 1;
  transform: translateY(0);
}

.song-backdrop.opening .song-content {
  animation: slideDown 350ms forwards;
}

.song-backdrop.closing .song-content {
  animation: slideDown 350ms reverse;
}


a:hover .richtext-img {
  box-shadow: var(--box-shadow);
  transition: all 350ms ease;
}

a:hover .richtext-img {
  box-shadow: var(--box-shadow-active);
}

.page-hero {
  text-align: center;
  margin: 0rem 0 1rem 0;
  position: relative;
}

.page-hero h2 {
  max-width: none;
  margin: 0;
  width: 100%;
  position: absolute;
  top: 0;
}

.page-hero h2 span {
  display: inline-block;
  padding: 2rem 1rem 1rem 1rem;
  background-color: rgba(var(--app-section-odd-color-rgb), calc(0.8));
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.page-hero img {
  border-radius: 0;
}

.shift-section {
  background-color: transparent;
  position: relative;
  top: -15rem;
}

.timeline-page-title h6 {
  color: var(--grey);
}

.timeline-page-title .date {
  display: inline-block;
}

.pagination-links {
  text-align: center;
}

@keyframes slideDown {
  from {
    transform: translateY(-20vh);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.song-backdrop.opening {
  animation: fadeInBackdrop 350ms forwards;
}

.song-backdrop.closing {
  animation: fadeInBackdrop 350ms reverse;
}

@keyframes fadeInBackdrop {
  from {
    background: rgba(0, 0, 0, 0);
  }
  to {
    background: rgba(0, 0, 0, 0.5);
  }
}

@media (max-width: 1000px) {
  html {
    font-size: 18px;
  }

  section > *, footer > *, header > *, nav > * {
    max-width: none;
  }

  main > .rich-text p, main > .rich-text h1, main > .rich-text h2, main > .rich-text h3, main > .rich-text h4, main > .rich-text h5, main > .rich-text h6 {
    max-width: none;
    padding: 0 1rem;
  }

  .search-entry .richtext-img {
    max-width: 100%;
  }

  .search-entry {
    float: none;
  }
}
