:root {
  --bg: #f6f1e7;
  --panel: rgba(255, 251, 244, 0.84);
  --panel-solid: #fffaf2;
  --text: #2f2a24;
  --muted: #6f675d;
  --gold: #b38a4a;
  --gold-soft: rgba(179, 138, 74, 0.18);
  --line: rgba(179, 138, 74, 0.22);
  --shadow: 0 20px 50px rgba(94, 72, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(214, 186, 132, 0.14), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(170, 191, 214, 0.10), transparent 22%),
    linear-gradient(rgba(255, 251, 244, 0.22), rgba(255, 251, 244, 0.22));
  z-index: 0;
}

a {
  color: inherit;
}

nav {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 16px 20px;
  background: rgba(255, 248, 238, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(179, 138, 74, 0.12);
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.25s ease, opacity 0.25s ease;
  opacity: 0.86;
}

nav a:hover {
  color: var(--gold);
  opacity: 1;
}

.content {
  position: relative;
  min-height: 100vh;
  padding: 120px 24px 64px;
  background:
    linear-gradient(rgba(246, 241, 231, 0.68), rgba(246, 241, 231, 0.88)),
    url("Images/A Jóakarat Királysága.avif");
  background-size: cover;
  background-position: center;
  overflow: hidden;
  isolation: isolate;
}

.mainTitle {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mainTitleInner {
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.82), rgba(248, 241, 230, 0.72));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 32px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
}

h1 {
  margin: 0 0 16px;
  font-family: "Cinzel", serif;
  font-weight: lighter;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.06;
  color: #5c4325;
}

h1Book {
  margin: 0 0 16px;
  font-family: "Cinzel Decorative", serif;
  font-weight: lighter;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.06;
  color: #5c4325;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  text-align: justify;
  font-size: 1.02rem;
}

.title-actions {
  margin-top: 26px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.40);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: 0 10px 25px rgba(94, 72, 38, 0.12);
}

.button.primary {
  background: linear-gradient(180deg, rgba(179, 138, 74, 0.22), rgba(179, 138, 74, 0.10));
  border-color: rgba(179, 138, 74, 0.42);
  color: #4a3720;
}

.mapInner {
  position: relative;
  width: 100%;
  min-width: 0;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.88), rgba(244, 236, 223, 0.78));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 18px;
  min-height: clamp(420px, 82dvh, 980px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mapHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 4px 4px 0;
}

.mapHeader h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-weight: lighter;
  font-size: 1.35rem;
  color: var(--gold);
}

.mapNote {
  color: var(--muted);
  font-size: 0.92rem;
}

.mapBoard {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;

  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 248, 239, 0.10), rgba(238, 228, 212, 0.20)),
    url("Images/A Jóakarat Királysága.avif");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border: 1px solid rgba(179, 138, 74, 0.16);
}

.mapOverlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 0 44%, rgba(140, 113, 72, 0.08) 72%, rgba(140, 113, 72, 0.18) 100%),
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.mapGrid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 98, 70, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 98, 70, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.22;
  pointer-events: none;
}

.mapPoint {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.mapPoint button {
  all: unset;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fffaf2;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(179, 138, 74, 0.12), 0 0 22px rgba(179, 138, 74, 0.20);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mapPoint button:hover,
.mapPoint button:focus-visible {
  transform: scale(1.12);
  box-shadow: 0 0 0 10px rgba(179, 138, 74, 0.16), 0 0 28px rgba(179, 138, 74, 0.26);
}

.mapPoint .pulse {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(179, 138, 74, 0.32);
  animation: pulse 2.8s infinite;
  pointer-events: none;
}

.mapPoint .label {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.88);
  border: 1px solid rgba(179, 138, 74, 0.20);
  color: #5a4630;
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.infoPanel {
  position: absolute;
  z-index: 5;
  display: none;
  top: 18px;
  left: 18px;
  width: min(420px, calc(100% - 36px));
  max-width: 420px;
  max-height: calc(100% - 36px);
  overflow: auto;
  background: rgba(255, 251, 244, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(179, 138, 74, 0.20);
  border-radius: 22px;
  padding: 20px 20px 18px;
  box-shadow: 0 24px 46px rgba(94, 72, 38, 0.18);
  min-height: 240px;
  pointer-events: auto;
}

.infoPanel.visible {
  display: block;
}

.infoPanel.hidden {
  display: none;
}

.infoKicker {
  color: var(--gold);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  margin-bottom: 8px;
}

.infoPanel h3 {
  margin: 0 0 8px;
  font-family: "Cinzel", serif;
  font-size: 1.5rem;
}

.infoLayout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.infoMedia {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(179, 138, 74, 0.22);
  background: rgba(255, 255, 255, 0.35);
}

.infoMedia img {
  width: 100%;
  height: auto;
  display: block;
}

.infoContent {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.infoText h3 {
  margin: 0 0 8px;
}

.infoText p {
  margin: 0;
}

.infoPanel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.infoMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border-radius: 999px;
  border: 1px solid rgba(179, 138, 74, 0.18);
  padding: 6px 10px;
  font-size: 0.78rem;
  color: #6a5337;
  background: rgba(255, 255, 255, 0.45);
}

.section {
  position: relative;
  z-index: 1;
  padding: 88px 24px;
  width: min(1400px, 100%);
  max-width: 1400px;
  margin: auto;
}

.sectionHeader {
  max-width: 760px;
  margin-bottom: 28px;
}

.sectionHeader h2 {
  margin: 0 0 10px;
  font-family: "Cinzel", serif;
  font-weight: lighter;
  color: var(--gold);
  font-size: 2rem;
}

.sectionHeader p {
  margin: 0;
  color: var(--muted);
}

.cards {
  display: grid;
  /* grid-template-columns: repeat(3, 1fr); */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: rgba(255, 251, 244, 0.94);
  border: 1px solid rgba(179, 138, 74, 0.16);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  box-shadow: 0 8px 24px rgba(94, 72, 38, 0.10);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(179, 138, 74, 0.42);
  box-shadow: 0 18px 32px rgba(94, 72, 38, 0.14);
}

.card img {
  width: 100%;
  /* height: clamp(220px, 30vw, 540px); */
  object-fit: cover;
  display: block;
  object-position: top;
}

.cardImage {
  position: relative;
}

.cardContent {
  padding: 16px;
  flex: 1;
}

.cardTitle {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  /* right: 16px; */

  font-family: "Cinzel Decorative", serif;
  font-weight: lighter;
  color: var(--gold);
  margin-bottom: 8px;
  font-size: 3rem;
  text-wrap: nowrap;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.cardSpoiler {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  text-align: right;
}

.flipCard {
  perspective: 1200px;
  cursor: pointer;
  min-height: 750px;
}

.flipCardInner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 750px;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}

.flipCard.isFlipped .flipCardInner {
  transform: rotateY(180deg);
}

.flipCardFront,
.flipCardBack {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 18px;
  overflow: hidden;
}

.flipCardFront {
  background: rgba(255, 251, 244, 0.94);
}

.flipCardFront .cardTitle {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  /* right: 16px; */

  font-family: "Cinzel Decorative", serif;
  font-weight: lighter;
  color: var(--gold);
  margin-bottom: 8px;
  font-size: 3rem;
  text-wrap: nowrap;
}

.flipCardFront img {
  width: 100%;
  height: 100%;
  min-height: 750px;
  object-fit: cover;
  display: block;
}

.flipCardFront::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.05) 55%, rgba(0,0,0,0));
}

.flipCardFront .card-title {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 1.4rem;
  color: #fffaf2;
  text-shadow: 0 3px 10px rgba(0,0,0,0.65);
}

.flipCardBack {
  transform: rotateY(180deg);
  background: rgba(255, 251, 244, 0.96);
  border: 1px solid rgba(179, 138, 74, 0.16);
  box-shadow: 0 8px 24px rgba(94, 72, 38, 0.10);
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.flipCardBack .cardContent {
  padding: 20px;
  text-align: justify;
  text-justify: inter-word;
}

.flipCardBack .cardTitle {
  position: static;
  transform: none;
  margin: 0 0 12px;
  font-family: "Cinzel", serif;
  font-size: 1.35rem;
  color: var(--gold);
  text-wrap: wrap;
  text-align: justify;
}

.flipCardBack .card-content {
  padding: 20px;
}

.flipCardBack .card-title {
  margin: 0 0 12px;
  font-family: "Cinzel", serif;
  color: var(--gold);
  font-size: 1.2rem;
}

.flipCardBack p {
  margin: 0;
  color: var(--muted);
}

.flipCardBack .cardContent p {
  text-align: justify !important;
  text-align-last: left;
  hyphens: auto;
}

.justified {
  white-space: normal;
  text-indent: 5%;
  text-align: justify;
}

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px 60px;
  font-size: 0.84rem;
  opacity: 0.7;
  color: var(--muted);
}

@keyframes pulse {
  0% {
    transform: scale(0.72);
    opacity: 0.88;
  }
  70% {
    transform: scale(1.45);
    opacity: 0;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@media (max-width: 1200px) {
  .mainTitle {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .infoPanel {
    grid-column: 1 / -1;
  }

  .mapInner {
    min-height: auto;
    justify-content: flex-start;
    gap: 16px;
  }

  .mapBoard {
    min-height: 0;
  }
}

@media (max-width: 900px) {
  .mainTitle {
    grid-template-columns: 1fr;
  }

  .mapInner,
  .infoPanel,
  .mainTitleInner {
    width: 100%;
  }

  .mapInner {
    min-height: auto;
    justify-content: flex-start;
    gap: 16px;
  }

  .mapBoard {
    min-height: 0;
  }

  .mapPoint button {
    width: 16px;
    height: 16px;
    box-shadow: 0 0 0 6px rgba(179, 138, 74, 0.10), 0 0 16px rgba(179, 138, 74, 0.18);
  }

  .mapPoint .pulse {
    width: 26px;
    height: 26px;
  }

  .mapPoint .label {
    font-size: 0.72rem;
    padding: 4px 7px;
    max-width: 72px;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .infoPanel {
    position: static;
    width: 100%;
    max-width: none;
    max-height: none;
    min-height: 0;
    margin-top: 16px;
    overflow: visible;
    background: rgba(255, 251, 244, 0.96);
  }

  .infoLayout {
    gap: 14px;
  }
}

@media (max-width: 720px) {
  nav {
    gap: 16px;
    padding: 14px 10px;
    overflow-x: auto;
    justify-content: center;
  }

  .content {
    padding-top: 96px;
  }

  .mainTitleInner {
    padding: 24px;
  }

  .mapInner {
    padding: 14px;
    min-height: auto;
    justify-content: flex-start;
    gap: 12px;
  }

  .mapBoard {
    min-height: 0;
  }

  .infoPanel {
    margin-top: 12px;
    padding: 16px;
  }

  .infoLayout {
    gap: 12px;
  }

  .infoMedia img {
    width: 100%;
    height: auto;
    max-height: none;
  }

  .mapPoint .pulse {
    display: none;
  }

  .mapPoint .label {
    display: block;
    top: auto;
    bottom: calc(100% + 6px);
    font-size: 0.64rem;
    padding: 3px 6px;
    max-width: 64px;
  }
}

.mapRoutes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.route {
  fill: none;
  stroke: rgba(74, 90, 179, 0.9);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 10 8;
  filter:
    drop-shadow(0 0 6px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 2px rgba(164, 138, 21, 0.5));
}

html[data-theme="dark"] {
  --bg: #0b0d12;
  --panel: rgba(10, 13, 19, 0.84);
  --panel-solid: #12151c;
  --text: #e8e6e3;
  --muted: #b9b5ae;
  --gold: #c8a96a;
  --gold-soft: rgba(200, 169, 106, 0.28);
  --line: rgba(200, 169, 106, 0.18);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(200, 169, 106, 0.08), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(120, 155, 210, 0.08), transparent 22%),
    linear-gradient(rgba(11, 13, 18, 0.22), rgba(11, 13, 18, 0.22));
}

html[data-theme="dark"] nav {
  background: rgba(9, 12, 17, 0.72);
  border-bottom: 1px solid rgba(200, 169, 106, 0.08);
}

html[data-theme="dark"] .content {
  background:
    linear-gradient(rgba(11, 13, 18, 0.72), rgba(11, 13, 18, 0.93)),
    url("Images/A Jóakarat Királysága.avif");
  background-size: cover;
  background-position: center;
}

html[data-theme="dark"] .mainTitleInner {
  background: linear-gradient(180deg, rgba(14, 17, 24, 0.82), rgba(14, 17, 24, 0.66));
}

html[data-theme="dark"] h1 {
  color: #f3ead8;
}

html[data-theme="dark"] .button {
  background: rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .button:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .button.primary {
  background: linear-gradient(180deg, rgba(200, 169, 106, 0.18), rgba(200, 169, 106, 0.08));
  border-color: rgba(200, 169, 106, 0.45);
  color: #f5ecdc;
}

html[data-theme="dark"] .mapInner {
  background: linear-gradient(180deg, rgba(14, 17, 24, 0.88), rgba(14, 17, 24, 0.76));
}

html[data-theme="dark"] .mapBoard {
  background:
    linear-gradient(rgba(8, 10, 15, 0.18), rgba(8, 10, 15, 0.28)),
    url("Images/A Jóakarat Királysága.avif");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border: 1px solid rgba(200, 169, 106, 0.14);
}

html[data-theme="dark"] .mapOverlay {
  background:
    radial-gradient(circle at center, transparent 0 44%, rgba(10, 12, 16, 0.14) 72%, rgba(10, 12, 16, 0.32) 100%),
    linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

html[data-theme="dark"] .mapGrid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  opacity: 0.18;
}

html[data-theme="dark"] .mapPoint button {
  background: #f4ead7;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(200, 169, 106, 0.12), 0 0 22px rgba(200, 169, 106, 0.26);
}

html[data-theme="dark"] .mapPoint button:hover,
html[data-theme="dark"] .mapPoint button:focus-visible {
  box-shadow: 0 0 0 10px rgba(200, 169, 106, 0.16), 0 0 28px rgba(200, 169, 106, 0.34);
}

html[data-theme="dark"] .mapPoint .pulse {
  border: 1px solid rgba(200, 169, 106, 0.32);
}

html[data-theme="dark"] .mapPoint .label {
  background: rgba(7, 10, 14, 0.72);
  border: 1px solid rgba(200, 169, 106, 0.14);
  color: #f1ebdf;
}

html[data-theme="dark"] .infoPanel {
  background: rgba(10, 13, 19, 0.55);
  border: 1px solid rgba(200, 169, 106, 0.18);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .tag {
  border: 1px solid rgba(200, 169, 106, 0.16);
  color: #e6ddcf;
  background: rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .card {
  background: rgba(18, 21, 28, 0.92);
  border: 1px solid rgba(200, 169, 106, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .card:hover {
  border-color: rgba(200, 169, 106, 0.42);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .flipCardBack {
  background: rgba(18, 21, 28, 0.96);
  border: 1px solid rgba(200, 169, 106, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.themeToggle {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1rem;
  font: inherit;
}

.langToggle {
  min-width: 42px;
  padding: 8px 10px;
  line-height: 1;
  text-align: center;
}

.flagIcon {
  position: relative;
  display: block;
  width: 28px;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(47, 42, 36, 0.22);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(47, 42, 36, 0.14);
}

.flagHu {
  background: linear-gradient(
    to bottom,
    #ce2939 0 33.333%,
    #ffffff 33.333% 66.666%,
    #477050 66.666% 100%
  );
}

.flagUs {
  background: repeating-linear-gradient(
    to bottom,
    #b22234 0 1.38px,
    #ffffff 1.38px 2.76px
  );
}

.flagUs::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 9.7px;
  background:
    radial-gradient(circle, #ffffff 0 0.7px, transparent 0.8px) 1px 1px / 3px 2.4px,
    #3c3b6e;
}

.themeToggle:hover,
.themeToggle:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(179, 138, 74, 0.25);
}

html[data-theme="dark"] .themeToggle:hover {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(200, 169, 106, 0.25);
}


/* ===== BOOK PAGE ===== */

.bookHero {
  position: relative;
  z-index: 1;
  width: min(2200px, 100%);
  margin: 0 auto;
  padding: 72px 32px 30px;
}

.bookHeroInner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;

  background: linear-gradient(180deg, rgba(255, 251, 244, 0.82), rgba(248, 241, 230, 0.72));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 32px;
}

.bookCover {
  flex: 2 1 380px;
  max-width: 1024px;
  min-width: 280px;
}

.bookCover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(94, 72, 38, 0.14);
}

.bookIntro {
  flex: 1 1 520px;
  min-width: 320px;
  max-width: 980px;

  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bookLayout {
  position: relative;
  z-index: 1;
  width: min(2200px, 100%);
  margin: 0 auto;
  padding: 12px 32px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.bookLayout + .aboutSection {
  width: min(2200px, 100%);
  margin: 0 auto;
  padding: 0 32px 80px;
}

.bookLayout + .aboutSection .aboutInner {
  width: 100%;
}

.bookMain {
  min-width: 0;
}

.bookAside {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.asideCard {
  background: rgba(255, 251, 244, 0.94);
  border: 1px solid rgba(179, 138, 74, 0.16);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(94, 72, 38, 0.10);
}

.asideCard h3 {
  margin: 0 0 12px;
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.2rem;
}

.asideCard a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.25s ease, letter-spacing 0.25s ease;
}

.asideCard a:last-child {
  margin-bottom: 0;
}

.asideCard a:hover {
  color: var(--gold);
  letter-spacing: 0.02em;
}

.bookSection + .bookSection {
  margin-top: 28px;
}

.bookSection {
  background: rgba(255, 251, 244, 0.94);
  border: 1px solid rgba(179, 138, 74, 0.16);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 24px rgba(94, 72, 38, 0.10);
}

.bookSection h2 {
  margin: 0 0 14px;
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.6rem;
}

.bookSection p,
.bookQuote {
  /* max-width: 82ch; */
  text-align: justify;
}

.characterGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.characterGroup + .characterGroup {
  margin-top: 30px;
}

.characterGroupTitle {
  margin: 0 0 14px;
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  color: var(--gold);
}

.characterCard {
  position: relative;
  background:
    linear-gradient(180deg, var(--group-tint, transparent), transparent 42%),
    rgba(255, 251, 244, 0.94);
  border: 1px solid rgba(179, 138, 74, 0.16);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(94, 72, 38, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.characterCard::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--group-bar, transparent);
  pointer-events: none;
  z-index: 1;
}

.characterCard:hover {
  transform: translateY(-3px);
  border-color: rgba(179, 138, 74, 0.34);
  box-shadow: 0 16px 30px rgba(94, 72, 38, 0.16);
}

.characterImage {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e6dccf;
}

.characterImage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.characterName {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 12px 14px;
  font-family: 'Cinzel', serif;
  font-size: 1.08rem;
  color: #f5ecdd;
  background: linear-gradient(180deg, rgba(14, 11, 8, 0), rgba(14, 11, 8, 0.82));
}

.characterBody {
  padding: 14px 14px 16px;
}

.characterBody p {
  margin: 0;
  text-align: justify;
  color: var(--muted);
}

.metaTags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metaTags span {
  border: 1px solid rgba(179, 138, 74, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.83rem;
  color: #6d5434;
  background: rgba(255, 251, 244, 0.82);
}

.bookQuote {
  margin: 0;
  padding: 16px 18px;
  border-left: 4px solid rgba(179, 138, 74, 0.35);
  background: rgba(255, 251, 244, 0.88);
  border-radius: 10px;
  /* font-style: italic; */
}

.lead {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.lead p {
  margin: 0 0 1em;
}

.lead p:last-child {
  margin-bottom: 0;
}

/* Extra széles monitorokra */
@media (min-width: 2200px) {
  .characterGrid {
    grid-template-columns: repeat(4, minmax(280px, 1fr));
  }
}

/* Közepes szélesség alatt visszaáll kényelmesebbre */
@media (max-width: 900px) {
  .bookLayout {
    grid-template-columns: 1fr;
  }

  .bookAside {
    position: static;
  }

  .bookHeroInner {
    flex-direction: column;
    gap: 18px;
  }

  .bookCover {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .bookIntro {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .bookHero {
    padding-top: 42px;
  }

  .bookHeroInner {
    padding: 22px;
  }

  .bookLayout {
    padding: 10px 20px 60px;
  }

  .bookLayout + .aboutSection {
    padding: 0 20px 60px;
  }

  .bookSection {
    padding: 20px;
  }
}

/* ===== GROUP COLORS ===== */

.groupHeritage {
  --group-tint: rgba(179, 138, 74, 0.16);
  --group-bar: rgba(179, 138, 74, 0.65);
}

.groupAllies {
  --group-tint: rgba(108, 132, 168, 0.14);
  --group-bar: rgba(108, 132, 168, 0.62);
}

.groupElves {
  --group-tint: rgba(128, 113, 150, 0.14);
  --group-bar: rgba(128, 113, 150, 0.58);
}

.groupEnemy {
  --group-tint: rgba(156, 86, 76, 0.14);
  --group-bar: rgba(156, 86, 76, 0.62);
}

.groupSacred {
  --group-tint: rgba(100, 134, 98, 0.14);
  --group-bar: rgba(100, 134, 98, 0.62);
}

.spoilerSection {
  border-color: rgba(156, 86, 76, 0.20);
}

/* ===== DARK THEME: AZ OROKOS PAGE ===== */

html[data-theme="dark"] {
  --bg: #0b0d12;
  --panel: rgba(10, 13, 19, 0.84);
  --panel-solid: #12151c;
  --text: #e8e6e3;
  --muted: #b9b5ae;
  --gold: #c8a96a;
  --gold-soft: rgba(200, 169, 106, 0.28);
  --line: rgba(200, 169, 106, 0.18);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 20% 20%, rgba(200, 169, 106, 0.08), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(120, 155, 210, 0.08), transparent 22%),
    linear-gradient(rgba(11, 13, 18, 0.22), rgba(11, 13, 18, 0.22));
}

html[data-theme="dark"] nav {
  background: rgba(9, 12, 17, 0.72);
  border-bottom: 1px solid rgba(200, 169, 106, 0.08);
}

html[data-theme="dark"] .bookHeroInner {
  background: linear-gradient(180deg, rgba(14, 17, 24, 0.82), rgba(14, 17, 24, 0.66));
}

html[data-theme="dark"] h1 {
  color: #f3ead8;
}

html[data-theme="dark"] .bookMeta span {
  border: 1px solid rgba(200, 169, 106, 0.16);
  color: #e6ddcf;
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .bookSection {
  background: rgba(18, 21, 28, 0.92);
  border: 1px solid rgba(200, 169, 106, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .bookQuote {
  border-left: 4px solid rgba(200, 169, 106, 0.28);
  background: rgba(255, 255, 255, 0.03);
  color: #ddd2c0;
}

html[data-theme="dark"] .characterCard {
  background:
    linear-gradient(180deg, var(--group-tint, transparent), transparent 42%),
    rgba(33, 39, 51, 0.845);
  border: 1px solid rgba(200, 169, 106, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .characterCard:hover {
  border-color: rgba(200, 169, 106, 0.34);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .metaTags span {
  border: 1px solid rgba(200, 169, 106, 0.16);
  color: #e6ddcf;
  background: rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .spoilerSection {
  border-color: rgba(156, 86, 76, 0.28);
}

html[data-theme="dark"] .button {
  background: rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .button:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .button.primary {
  background: linear-gradient(180deg, rgba(200, 169, 106, 0.18), rgba(200, 169, 106, 0.08));
  border-color: rgba(200, 169, 106, 0.45);
  color: #f5ecdc;
}

html[data-theme="dark"] .asideCard {
  background: rgba(18, 21, 28, 0.92);
  border: 1px solid rgba(200, 169, 106, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .asideCard a {
  color: var(--muted);
}

html[data-theme="dark"] .asideCard a:hover {
  color: var(--gold);
}

/* ===== DARK GROUP COLORS ===== */

html[data-theme="dark"] .groupHeritage {
  --group-tint: rgba(200, 169, 106, 0.10);
  --group-bar: rgba(200, 169, 106, 0.55);
}

html[data-theme="dark"] .groupAllies {
  --group-tint: rgba(108, 132, 168, 0.10);
  --group-bar: rgba(108, 132, 168, 0.52);
}

html[data-theme="dark"] .groupElves {
  --group-tint: rgba(128, 113, 150, 0.10);
  --group-bar: rgba(128, 113, 150, 0.50);
}

html[data-theme="dark"] .groupEnemy {
  --group-tint: rgba(156, 86, 76, 0.10);
  --group-bar: rgba(156, 86, 76, 0.54);
}

html[data-theme="dark"] .groupSacred {
  --group-tint: rgba(100, 134, 98, 0.10);
  --group-bar: rgba(100, 134, 98, 0.52);
}

/* ===== TRAILER SECTION ===== */

.trailerSection {
  position: relative;
  z-index: 1;
  width: min(2000px, 100%);
  margin: 0 auto;
  padding: 10px 32px 28px;
}

.trailerInner {
  max-width: 1700px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.88), rgba(248, 241, 230, 0.78));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.trailerText {
  max-width: auto;
}

.trailerText h2 {
  margin: 0 0 10px;
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.9rem;
}

.trailerText p {
  margin: 0;
  color: var(--muted);
}

/* ===== VIDEO POSTER ===== */

.videoWrapper {
  position: relative;
  width: min(1500px, 100%);
  margin: 0 auto;
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(179, 138, 74, 0.18);
  box-shadow: 0 18px 36px rgba(94, 72, 38, 0.14);
  background: rgba(0, 0, 0, 0.08);
}

.videoPoster {
  cursor: pointer;
}

.videoPoster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform 0.45s ease;
}

.videoPoster:hover img {
  transform: scale(1.04);
}

.videoOverlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.38)),
    radial-gradient(circle at center, rgba(0, 0, 0, 0.00) 30%, rgba(0, 0, 0, 0.22) 100%);
  transition: opacity 0.3s ease;
}

.videoPoster:hover .videoOverlay {
  opacity: 0.85;
}

/* ===== PLAY BUTTON ===== */

.playButton {
  position: absolute;
  right: 20px;
  bottom: 20px;
  transform: none;
  z-index: 2;

  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid rgba(200, 169, 106, 0.52);
  background: rgba(16, 16, 16, 0.55);
  color: #f3ead8;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.playButton:hover,
.videoPoster:hover .playButton {
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(200, 169, 106, 0.40);
  background: rgba(20, 20, 20, 0.68);
  border-color: rgba(200, 169, 106, 0.72);
}

.playTriangle {
  font-size: 30px;
  line-height: 1;
  transform: translateX(2px);
}

/* ===== CAPTION ===== */

.videoCaption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fffaf2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.videoCaptionLabel {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.88;
}

.videoCaptionTitle {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
}

/* ===== IFRAME ===== */

.videoWrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ===== DARK MODE ===== */

html[data-theme="dark"] .trailerInner {
  background: linear-gradient(180deg, rgba(14, 17, 24, 0.82), rgba(14, 17, 24, 0.70));
}

html[data-theme="dark"] .videoWrapper {
  border: 1px solid rgba(200, 169, 106, 0.16);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  background: rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .playButton {
  background: rgba(10, 10, 10, 0.72);
  border: 1px solid rgba(200, 169, 106, 0.38);
}

/* ===== PLAY BUTTON PULSE ===== */

.playButton {
  position: absolute;
  right: 20px;
  bottom: 20px;
  transform: none;
  z-index: 2;

  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid rgba(200, 169, 106, 0.52);
  background: rgba(16, 16, 16, 0.55);
  color: #f3ead8;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.playButton::before,
.playButton::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(200, 169, 106, 0.7);
  pointer-events: none;
}

.playButton::before {
  animation: playPulse 2.2s ease-out infinite;
}

.playButton::after {
  animation: playPulse 2.2s ease-out infinite 1.1s;
}

.playButton:hover,
.videoPoster:hover .playButton {
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(200, 169, 106, 0.40);
  background: rgba(20, 20, 20, 0.68);
  border-color: rgba(200, 169, 106, 0.72);
}

.playTriangle {
  font-size: 30px;
  line-height: 1;
  transform: translateX(2px);
  position: relative;
  z-index: 1;
}

@keyframes playPulse {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }
  70% {
    transform: scale(1.55);
    opacity: 0;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

/* DARK MODE */
html[data-theme="dark"] .playButton {
  background: rgba(10, 10, 10, 0.72);
  border: 2px solid rgba(200, 169, 106, 0.7);
}

html[data-theme="dark"] .playButton::before,
html[data-theme="dark"] .playButton::after {
  border: 2px solid rgba(200, 169, 106, 0.7);
}

/* MOBIL */
@media (max-width: 720px) {
  .playButton {
    width: 76px;
    height: 76px;
  }

  .playTriangle {
    font-size: 24px;
  }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 720px) {
  .trailerSection {
    padding: 10px 20px 28px;
  }

  .trailerInner {
    padding: 22px;
  }

  .trailerText h2 {
    font-size: 1.55rem;
  }

  .playButton {
    width: 76px;
    height: 76px;
  }

  .playTriangle {
    font-size: 24px;
  }
}

/* ===== ABOUT SECTION ===== */

.aboutSection {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 80px auto 0;
  padding: 0;
}

.aboutInner {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.92), rgba(250, 243, 230, 0.85));
  border: 1px solid rgba(179, 138, 74, 0.18);
  border-radius: 22px;
  padding: 32px 36px;
  box-shadow: 0 18px 40px rgba(94, 72, 38, 0.12);
}

.aboutText {
  max-width: 100%;
}

.aboutText h2 {
  margin: 6px 0 18px;
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.8rem;
}

.aboutText p {
  margin: 0 0 1.1em;
  color: var(--muted);
  line-height: 1.6;
  text-align: justify;
}

.aboutText p:last-child {
  margin-bottom: 0;
}

html[data-theme="dark"] .aboutInner {
  background: linear-gradient(180deg, rgba(14, 17, 24, 0.85), rgba(14, 17, 24, 0.72));
  border: 1px solid rgba(200, 169, 106, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
