:root {
	font-size: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*
#layout {
	transform-origin: top center;
}

@media (min-width: 1200px) {
	#layout {
		transform: scale(1);
	}
}

@media (max-width: 1199px) and (min-width: 900px) {
	#layout {
		transform: scale(0.85);
	}
}

#layout {
  transform: scale(clamp(0.4, 80vw / 1000, 1));
  transform-origin: top center;
}

// Scale between 40 and 100% with base at 100px

*/

body {
  font-family: 'Georgia', serif;
  background: #000200;
  color: #f0f0f0;
  padding: 7.5rem 3.75rem 5rem; 
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a:link {
	color: pink;
}

a:visited {
	color: crimson;
}

.margin {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 3.75rem;
  background-repeat: repeat;
  background-size: 100% auto;
  z-index: -1;
}

.margin.left {
  left: 0;
  background-image: url("../img/margin-left.png");
}

.margin.right {
  right: 0;
  background-image: url("../img/margin-right.png");
}

header {
  padding: 3.75rem 0;
  text-align: center;
  position: relative;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 3.75rem;
  right: 3.75rem;
  height: 6.25rem;
  display: flex;
  align-items: center;
  background-color: #000200;
  z-index: 1000;
  box-shadow: 0 0.125rem 0.375rem rgba(0,0,0,0.3);
}

.header-inner {
  position: relative;
  max-width: 75.0rem;
  margin-left: auto;
  width: 100%;
  display: flex;
  align-items: center;
}

.logo {
  display: inline-block;
  max-height: 8rem;
  max-width: 32rem;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
}

.logo svg {
	display: block;
	height: 100%;
	width: auto;
	pointer-events: none;
}

.nav-wrapper {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
}

.socials {
  display: flex;
  gap: 0.5rem;
}

.socials a svg {
  width: 2.5rem;
  height: 2.5rem;
}

.menu-wrapper {
  margin-left: 1rem;
}

.hamburger {
  background: none;
  border: none;
  font-size: 4.0rem;
  cursor: pointer;
  color: white;
}

.nav-menu {
  display: none;
  flex-direction: column;
  background-color: #1a1a1a;
  min-width: 12.5rem;
  position: absolute;
  top: 100%;
  right: 0;
  padding: 1.25rem;
  border-radius: 0.3125rem;
}

.socials a img {
  height: 1.5rem;
  margin: 0 0.3125rem;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  padding: 0.3125rem 0;
}

.nav-menu.show {
  display: flex;
}

.announcements {
  margin-top: 2.5rem;
  max-width: 50.0rem;
  margin-left: auto;
  margin-right: auto;
}

.announcement {
  background: #1a1a1a;
  border-left: 0.25rem solid crimson;
  padding: 1.25rem;
  margin-top: 1.25rem;
  border-radius: 0.3125rem;
}

.socials a svg {
  transition: transform 0.2s ease, fill 0.2s ease;
}

.socials a:hover svg {
  transform: scale(1.3);
  fill: crimson;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 3.75rem;
  right: 3.75rem;
  text-align: center;
  padding: 0.625rem 0;
  z-index: 1000;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(25.0rem, 1fr));
  gap: 1.25rem;
  max-width: 125.0rem;
  margin: 2.5rem auto;
}

.category-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.5rem;
  width: 100%;
  max-width: 100%;
}

.category-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease-in-out;
}

.base-img {
  z-index: 1;
  opacity: 1;
}

.hover-img {
  z-index: 2;
  opacity: 0;
}

.category-card:hover .base-img {
  opacity: 0;
}

.category-card:hover .hover-img {
  opacity: 1;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 0.0625rem solid white;
  padding: 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
  background-color: transparent;
  color: white;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
}

a.result-item.full-link:link,
a.result-item.full-link:visited {
  color: white;
}

a.result-item.full-link:hover {
  background-color: #1a1a1a;
  color: crimson;
}

.result-item:hover {
  background-color: #1a1a1a;
  color: crimson;
}

.preview-img {
  width: 4.0rem;
  height: 4.0rem;
  object-fit: cover;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.preview-title {
  flex-grow: 1;
}

.result-item a {
  color: white;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.result-item a:hover {
  color: crimson;
}

ul.space-y-4 > li + li {
  margin-top: 1rem;
}

ul.space-y-4 {
  padding-left: 0;
  list-style-type: none;
}

.wiki-button {
  position: fixed;
  bottom: 3rem;
  right: 1.5rem;
  background-color: #f4f4f4;
  color: crimson;
  padding: 1rem 1rem;
  border-radius: 1.5rem;
  text-decoration: none;
  font-size: 1rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  box-shadow: 0 0.125rem 0.375rem rgba(0,0,0,0.1);
  z-index: 1000;
}

.wiki-button:hover {
  opacity: 1;
  background-color: #e0e0e0;
}

a.wiki-button:link {
	color: crimson;
}

.article-content p {
  margin-bottom: 1em;
  line-height: 1.6;
}

.socials a svg .fourthwall-icon {
  fill: white;
  stroke: white;
  stroke-width: 1;
  transition: transform 0.3s ease, fill 0.3s ease, stroke 0.3s ease, stroke-width 0.3s ease;
}

.socials a:hover svg .fourthwall-icon {
  fill: crimson;
  stroke: crimson;
}

.coatofarms {
  max-width: 50em;
  margin-left: 50%;
  transform: translateX(-50%);
}

.search-container {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.search-input {
  width: 100%;
  max-width: 37.5rem;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

.readable-text {
  color: #f1f1f1;               /* Soft white for reduced eye strain */
  background-color: #000000;    /* Pure black background */
  font-size: 1rem;              /* 16px based on your root */
  line-height: 1.6;             /* Good vertical rhythm */
  letter-spacing: 0.02em;       /* Improves clarity slightly */
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  max-width: 85ch;              /* Optimal line width for reading */
  padding: 1.25rem;             /* Comfortable internal spacing */
  margin: 0 auto;               /* Centering if inside a block element */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

.readable-text p {
  margin-bottom: 1rem;
}
.readable-text h1,
.readable-text h2,
.readable-text h3 {
  color: #ffffff;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.readable-text h1 {
	font-size: 2rem;
}

.readable-text h2 {
	font-size: 1.5rem;
}

.left-readable-text {
  color: #f1f1f1;               /* Soft white for reduced eye strain */
  background-color: #000000;    /* Pure black background */
  font-size: 1rem;              /* 16px based on your root */
  line-height: 1.6;             /* Good vertical rhythm */
  letter-spacing: 0.02em;       /* Improves clarity slightly */
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  max-width: 85ch;              /* Optimal line width for reading */
  padding: 1.25rem;             /* Comfortable internal spacing */
  margin: 0 3rem;             
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

.collection-banner {
  max-width: 50em;
  opacity: 0.9;
  margin-left: 50%;
  transform: translateX(-50%);
}

.collection-banner:hover {
  max-width: 52em;
  opacity: 1;
  transition: max-width 0.3s ease, opacity 0.3s ease;
}

.content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 20px;
}

.support-section {
  line-height: 1.6;
}

.support-title {
  font-size: 2em;
  margin-bottom: 1em;
}

.support-links {
  list-style-type: disc;
  margin-left: 1.5em;
  margin-top: 1em;
}

.support-links li {
  margin-bottom: 0.75em;
}

.support-links a {
  text-decoration: none;
}

.support-links a:hover {
  text-decoration: underline;
}

.wiki-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 2rem;
  text-align: center;
}


.wiki-map-container {
  margin-bottom: 0.5rem;
  text-align: center;
}

.wiki-map {
  max-width: 50%;
  height: auto;
  border-radius: 8px;
  margin-left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.map-note {
  font-size: 0.875rem;
  color: #aaa;
  font-style: italic;
  margin-bottom: 2.5rem;
  text-align: center;
}

.announcement-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
  list-style: none;
  margin-top: 1em;
}

.card-image-text {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.announcement-thumbnail {
  width: 100px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid #444;
}

.announcement-content {
  flex: 1;
}

.announcement-card {
  flex: 1 1 300px;
  background-color: #1e1e1e;
  border: 1px solid #444;
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  list-style: none;
}

.announcement-card a {
  color: inherit;
  text-decoration: none;
  display: block;
  height: 100%;
}

.announcement-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  border-color: #666;
}

.announcement-card h3 {
  margin-top: 0;
  font-size: 1.2em;
  color: #f5f5f5;
}

.announcement-card p {
  margin: 0.5em 0;
  color: #ccc;
  line-height: 1.4;
}

.announcement-card small {
  color: #888;
  font-size: 0.85em;
}


@media (max-width: 768px) {
  .team-member {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .team-member.right,
  .team-member.left {
    flex-direction: column;
  }
}



@media (max-width: 45rem) {
  header {
    padding: 2rem 0;
  }
  
  .hamburger {
	  font-size: 3rem;
  }

  .logo {
    max-height: 8rem;
	max-width: 24rem;
  }
  
  .coatofarms {
	  max-width: 25rem;
  }
  
  .category-grid {
	  grid-template-columns: 1fr;
  }
}



@media (max-width: 37.5rem) {
  header {
    padding: 1.875rem 0;
  }
  
  .hamburger {
	  font-size: 2rem;
  }

  .logo {
    max-height: 6.25rem;
	max-width: 19.5rem;
  }
  
  .coatofarms {
	  max-width: 15rem;
  }
  
  .category-grid {
	  grid-template-columns: 1fr;
  }
  
  .margin {
	width: 0px;  
  }
}

@media (hover: none) {
	.category-card:focus .base-img {
	  opacity: 0;
	}

	.category-card:focus .hover-img {
	  opacity: 1;
	}
}