/* =========================
   ZÁKLAD
========================= */

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}

body {
  background-image: url("images/pozadi.jpg");
  background-repeat: repeat;
  background-color: black;

  overflow-x: hidden;
}


/* =========================
   DESKTOP
========================= */

body {
  overflow-y: hidden;
}

.page-wrap {
  position: fixed;
  left: 50%;
  top: 50%;

  width: min(100vw, calc((100dvh - 48px) * 4 / 3));
  aspect-ratio: 4 / 3;

  transform: translate(-50%, -50%);
}

.detail {
  position: relative;

  width: 100%;
  height: 100%;

  overflow: hidden;
  box-sizing: border-box;
  display: block;

  box-shadow:
    0 10px 28px rgba(0,0,0,0.55);
}

.scene-bg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.detail::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  box-shadow:
    inset 0 0 28px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(190,145,85,0.28);

  border-radius: 3px;
}

.home-button {
  position: absolute;
  left: calc(100% + 18px);
  bottom: 3%;
  width: clamp(58px, 5vw, 84px);
  z-index: 999;
}

.home-button-slot {
  display: contents;
}

.back-link-wrap {
  position: absolute;
  right: 3%;
  bottom: 3%;
  z-index: 50;
}

.back-link {
  display: block;
  width: clamp(58px, 5vw, 84px);

  transition:
    transform .18s ease,
    filter .18s ease;
}

.back-link img {
  width: 100%;
  display: block;
}

.back-link:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 12px rgba(255,230,120,.85));
}


/* =========================
   SPOLEČNÉ HOTSPOTY
========================= */

.hotspot {
  position: absolute;

  transform-origin: center center;

  will-change: transform, filter;
  backface-visibility: hidden;
}

.hotspot-group {
  position: static;
  display: contents;
}

.hotspot img {
  display: block;
  width: 100%;
  height: auto;

  transition:
    transform 0.18s ease,
    filter 0.18s ease;

  will-change: transform, filter;
  backface-visibility: hidden;
}

/* hover efekt */
.hotspot:hover img,
.hotspot-group:hover .hotspot img,
.detail:has(.vedeni-group:hover) .vedeni-group img {
  transform: scale(1.08);

  filter:
    drop-shadow(0 0 14px rgba(255, 230, 120, 0.9));
}


/* =========================
   OVERLAY ŽABKY
========================= */

.zabky-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;

  background: rgba(0, 0, 0, 0.75);
}

.zabky-overlay img {
  width: min(500px, 80vw);
  max-height: 95vh;
  height: auto;

  filter: drop-shadow(0 0 20px rgba(255, 230, 120, 0.7));
}


/* =========================
   ZLATÁ TLAČÍTKA
========================= */

.gold-plaque,
.gold-button {
  color: #5b0808;
  background: linear-gradient(135deg, #6f5622, #d8bd70, #fff0aa, #a98235, #4b3512);
  border: 2px ridge #e7cc78;
  border-radius: 5px;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-weight: bold;
  text-shadow: 0 1px 1px rgba(255,255,255,0.45);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.55),
    inset 0 0 5px rgba(255,255,210,0.65);
}

.gold-button {
  cursor: pointer;
}

.gold-button:hover:not(:disabled),
.gold-button.is-active {
  color: #ecd29c;
  background: #7a0c0c;
  border-color: #b48a2c;
}

.gold-button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* =========================
   SCROLL OBSAH UVNITŘ DETAILU
========================= */

.detail-scroll {
  position: absolute;
  inset: 0;

  z-index: 20;

  overflow-y: auto;
  overflow-x: hidden;

  box-sizing: border-box;

  padding:
	0
    clamp(14px, 4vw, 42px)
    clamp(90px, 10vw, 130px);

  text-align: center;
}

h1 {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: clamp(18px, 3.2vw, 38px);
  color: #ecd29c;
  font-weight: bold;
  text-align: center;

  letter-spacing: 0.12em;

  text-shadow:
    1px 1px 2px #4a0000,
    0 0 4px #d8b65c;

  margin: 0 0 clamp(14px, 3vw, 28px);
}

.section-title {
  margin-top: clamp(26px, 5vw, 46px);
}


.role-profesor {
    color: #8c3db1;
    font-weight: 500;
}

.role-duch {
    color: #888888;
    font-weight: 500;
}

.role-student {
    color: #c90000;
    font-weight: 500;
}

/* =========================
   DLAŽDICE / KARTY
========================= */

.dlazdice-row {
  display: flex;
  flex-wrap: wrap;

  gap: clamp(10px, 2vw, 18px);

  justify-content: center;
  align-items: center;

  margin: clamp(14px, 3vw, 28px) 0;
}

.dlazdice,
.obsolete {
  position: relative;

  width: clamp(90px, 15vw, 250px);

  cursor: pointer;

  transform-origin: center center;

  transition:
    transform 0.18s ease,
    filter 0.18s ease;

  will-change: transform, filter;
}

.dlazdice img,
.obsolete img {
  display: block;

  width: 100%;
  height: auto;
}

.dlazdice:hover,
.obsolete:hover {
  transform: scale(1.05);

  filter:
    drop-shadow(0 0 14px rgba(255, 230, 120, 0.9));
}

.obsolete {
  filter: grayscale(100%);
}

.obsolete:hover {
  filter:
    grayscale(100%)
    drop-shadow(0 0 14px rgba(255, 230, 120, 0.9));
}


/* =========================
   GRID DLAŽDIC
========================= */

.dlazdice-grid {
  position: absolute;
  inset: 0;

  z-index: 10;

  display: grid;

  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);

  gap: clamp(8px, 1.5vw, 16px);

  width: 88%;
  height: 84%;

  margin: auto;

  box-sizing: border-box;
}

.dlazdice-grid .dlazdice,
.dlazdice-grid .obsolete {
  position: relative;

  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.dlazdice-grid .dlazdice img,
.dlazdice-grid .obsolete img {
  width: 100%;
  height: 100%;

  object-fit: contain;
}

/* =========================
   MOBIL
========================= */

@media (max-width: 768px) {

	#overlay,
	.zabky-overlay {
		position: fixed !important;
		inset: 0 !important;

		width: 100vw !important;
		height: 100dvh !important;

		z-index: 999999 !important;
	}

	#modal {
		width: min(92vw, 530px) !important;
		height: min(88dvh, 560px) !important;
	}

	#modalFrame {
		width: 100% !important;
		height: 100% !important;
	}

	.zabky-overlay img {
		width: min(500px, 80vw) !important;
		max-height: 90dvh !important;
	}

	.home-button {
		position: fixed !important;

		right: 12px !important;
		top: calc(75vw + 12px) !important;

		bottom: auto !important;
		left: auto !important;

		display: block !important;

		width: 64px !important;
		height: 64px !important;

		margin: 0 !important;
		padding: 0 !important;

		background: none !important;
		border: none !important;

		z-index: 999999 !important;
	}

	.home-button img {
		display: block !important;

		width: 100% !important;
		height: 100% !important;

		object-fit: contain;
	}
}