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

body {
  background-color: #0d0d0d;
  color: #e0e0e0;
  font-family: 'Georgia', serif;
  line-height: 1.6;
}

/* Links */
a {
  color: #9dd1ff;
  text-decoration: none;
}

a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  background-color: #111;
  border-bottom: 2px solid #222;
}

.logo {
  height: 60px;
}

nav {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

nav a {
  font-weight: bold;
  font-size: 15px;
  color: #e0e0e0;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ff6b6b;
}

/* Intro Section */
main {
  padding: 80px 20px 40px 20px;
  text-align: center;
  color: #ffffff;
  min-height: calc(100vh - 200px); /* Ensures footer stays at bottom */
}

.intro {
  max-width: 800px;
  margin: auto;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.intro h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.intro p {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #ddd;
}

.intro img.sigil {
  width: 180px;
  margin-top: 30px;
  filter: brightness(1.5) drop-shadow(0 0 6px #fff);
}
/* Divider */
.section-divider {
  font-size: 2rem;
  margin: 30px 0;
  color: #555;
}

/* Stark Logo */
.intro img.sigil {
  width: 500px;
  margin: 30px auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2)) invert(1) brightness(1.6);
}

/* Winterfell Banner */
.banner img {
  width: 80vw;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  border: 2px solid #444;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.background-overlay {
  background-image: url("../images/winterfell.jpg");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: brightness(0.7);
}

/* Footer */
footer {
  margin-top: 60px;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: #888;
  border-top: 1px solid #333;
}
.weirwood-bg {
  background: url('../images/weirwood.jpg') no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.law-card {
  background-color: rgba(0, 0, 0, 0.75);
  border: 1px solid #444;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.law-card:hover {
  transform: scale(1.03);
  background-color: rgba(60, 60, 60, 0.85);
}

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

.modal {
  background: #111;
  border-radius: 8px;
  width: 80%;
  max-width: 900px;
  height: 80%;
  padding: 1rem;
  position: relative;
}

.modal iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  background: none;
  color: #fff;
  border: none;
  cursor: pointer;
}

/* Winter Court Row Layout */
.court-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.court-card {
  background-color: #1a1a1a;
  padding: 1rem;
  border: 1px solid #444;
  border-radius: 8px;
  text-align: center;
  width: 220px;
  transition: transform 0.2s ease;
}

.court-card:hover {
  transform: scale(1.03);
}

.court-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.court-card h3 {
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
}

/* Background Image for Winter Court Page */
.wintercourt-page {
  background-image: url('../images/councilart.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.laws-page {
  background-image: url('../images/letter3.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.pinned-guide {
  max-width: 800px;
  margin: 1rem auto 2rem auto;
  padding: 0.75rem 1.5rem;
  background-color: rgba(0, 0, 0, 0.65);
  border: 1px solid #555;
  border-radius: 8px;
  text-align: center;
  font-size: 0.95rem;
  color: #ccc;
}

.pinned-guide a {
  color: #9dd1ff;
}

.pinned-guide a:hover {
  color: #fff;
  text-decoration: underline;
}

.discord-bg {
  background: url('../images/joindiscord.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #fff;
}

.discord-bg {
  background: url('../images/joindiscord.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #fff;
}

.discord-btn {
  display: inline-block;
  background-color: #7289da;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  margin-top: 30px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.discord-btn:hover {
  background-color: #5b6eae;
}

/* ===== MAP OVERLAY — force parchment-only modal ===== */
#mapOverlay{
  position: fixed; inset: 0;
  display: none;                 /* JS sets to grid when open */
  place-items: center;
  background: rgba(0,0,0,.74);
  z-index: 3000;
  padding: 1rem;
}

#mapOverlay .parchment {
  position: relative;
  width: min(980px, 92vw);
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;  /* remove any shadow/border box look */
  border-radius: 0 !important;  /* no rounding */
}

/* the parchment image itself */
#mapOverlay .parchment .paper{
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

/* text that sits ON TOP of the image, inside the scroll area */
#mapOverlay .parchment .paper-copy{
  position: absolute;
  z-index: 2;
  left: 11.5%;          /* tune these 4 insets to your PNG */
  right: 17.5%;
  top: 17%;
  bottom: 21%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  /* kill any inherited “white on dark” styles */
  background: transparent !important;
  color: #2a1f12 !important;
  text-shadow: none !important;
}

#mapOverlay .parchment .paper-copy h2{
  margin: 0 0 .45rem 0;
  font-family: Georgia, serif;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  color: #1f1307 !important;
  letter-spacing: .4px;
}

#mapOverlay .parchment .paper-copy small{
  margin: 0 0 1rem 0;
  color: #5a4030 !important;
  letter-spacing: .3px;
}

#mapOverlay .parchment .paper-copy p{
  margin: 0;
  max-width: 62ch;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.7;
  color: #2a1f12 !important;
}

#mapOverlay .parchment .close{
  position: absolute;
  top: 10px; right: 14px;
  font-size: 1.8rem; line-height: 1;
  color: #3a2a1a;
  background: none; border: none; cursor: pointer;
  z-index: 3;
}
