/* =========================
   BASIC OVERLAY / GUESTBOOK
   ========================= */

#lajitoveri-overlay,
#guestbook-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;

  background: rgba(0, 0, 0, 0.55);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#lajitoveri-overlay {
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.3s ease-in-out;
}

#lajitoveri-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#guestbook-overlay {
  display: none;
  place-items: center;
  padding: 20px 14px;
}

#guestbook-overlay.active {
  display: grid;
}

.lajitoveri-article {
  position: relative;

  width: 40rem;
  max-width: 90%;
  padding: 4.5rem 2.5rem 2rem;

  border-radius: 4px;

  color: #fff;
  font-family: var(--font-dimension);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.02em;

  background-color: rgba(27, 31, 34, 0.85);

  opacity: 0;
  transform: translateY(0.5rem);

  transition:
    opacity 0.45s ease-in-out,
    transform 0.45s ease-in-out;
}

#lajitoveri-overlay.active .lajitoveri-article,
#guestbook-overlay.active .lajitoveri-article {
  opacity: 1;
  transform: translateY(0);
}

.lajitoveri-article .close {
  position: absolute;
  top: 0;
  right: 0;

  width: 4rem;
  height: 4rem;

  overflow: hidden;
  text-indent: -9999px;

  cursor: pointer;
}

.lajitoveri-article .close::before {
  content: "";

  position: absolute;
  top: 0.75rem;
  left: 0.75rem;

  width: 2.5rem;
  height: 2.5rem;

  border-radius: 50%;

  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cline x1='2' y1='2' x2='18' y2='18' stroke='%23ffffff'/%3E%3Cline x1='18' y1='2' x2='2' y2='18' stroke='%23ffffff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.lajitoveri-article h2.major {
  display: inline-block;

  margin-bottom: 2rem;
  padding-bottom: 0.75rem;

  border-bottom: solid 1px rgba(255, 255, 255, 0.75);

  color: var(--yellow);
  font-family: var(--font-dimension);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
}

#guestbook-overlay .lajitoveri-article {
  width: min(560px, 92vw);
  max-height: 86vh;
  overflow: auto;

  padding: 26px 26px 22px;

  border-radius: 18px;

  background:
    linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.72)),
    url("../images/vieraskirja.png");

  background-position: center;
  background-size: cover;
}

#guestbook-overlay.reading #guestbookForm {
  display: none;
}

#guestbook-overlay #entries {
  max-height: 42vh;
  margin-top: 14px;
  overflow: auto;
  padding-right: 6px;
}

#guestbookForm input,
#guestbookForm textarea {
  width: 100%;
  margin-bottom: 14px;
  padding: 14px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;

  color: #fff;
  font-size: 15px;

  background: rgba(10, 10, 10, 0.75);
}

#guestbookForm textarea {
  min-height: 110px;
  max-height: 220px;
  resize: vertical;
}

#guestbookForm input:focus,
#guestbookForm textarea:focus {
  border-color: var(--yellow);
  outline: none;
  box-shadow: 0 0 0 2px rgba(250, 186, 0, 0.25);
}

.guestbook-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  width: 100%;
  margin: 8px 0 18px;
  padding: 12px 14px;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;

  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-inter);
  font-size: 13px;
  line-height: 1.5;

  background: rgba(255, 255, 255, 0.08);
}

.guestbook-consent input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 2px 0 0;

  cursor: pointer;
  accent-color: var(--yellow);
}

.entry {
  margin-top: 18px;
  padding: 22px;

  border-left: 3px solid var(--yellow);
  border-radius: 14px;

  background: rgba(0, 0, 0, 0.55);
}

.entry-name {
  font-size: 18px;
  font-weight: 600;
}

.entry-location {
  font-size: 13px;
  opacity: 0.7;
}

.entry-message {
  margin-top: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.entry-date {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.5;
}

/* =========================
   TOURS / GUIDE OVERLAYS
   ========================= */

.tours-window-overlay,
.guide-overlay {
  position: fixed;
  inset: 0;
  display: none;
}

.tours-window-overlay {
  z-index: 30001;
}

.guide-overlay {
  z-index: 30002;
}

.tours-window-overlay.is-open,
.guide-overlay.is-open {
  display: block;
}

.tours-window-backdrop,
.guide-backdrop {
  position: absolute;
  inset: 0;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tours-window-backdrop {
  background: rgba(0, 0, 0, 0.64);
}

.guide-backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.tours-window-article,
.guide-article {
  position: relative;

  width: min(1180px, calc(100vw - 40px));
  height: min(860px, calc(100vh - 40px));
  margin: 20px auto;
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;

  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.tours-window-article {
  background: rgba(20, 22, 26, 0.96);
}

.tours-window-topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;

  display: flex;
  align-items: center;

  height: 64px;
  padding: 0 72px 0 24px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  background: rgba(10, 12, 16, 0.72);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tours-window-topbar h2 {
  margin: 0;

  color: var(--yellow);
  font-family: var(--font-vollkorn);
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tours-window-close,
.guide-close {
  position: absolute;
  z-index: 5;

  display: grid;
  place-items: center;

  border: 0;
  border-radius: 999px;

  color: #fff;
  line-height: 1;

  background: rgba(255, 255, 255, 0.1);

  cursor: pointer;

  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.tours-window-close {
  top: 12px;
  right: 12px;

  width: 40px;
  height: 40px;

  font-size: 20px;
}

.tours-window-close:hover,
.guide-close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

.tours-window-frame {
  position: absolute;
  inset: 64px 0 0 0;

  display: block;

  width: 100%;
  height: calc(100% - 64px);

  border: 0;
  background: #fff;
}

.guide-article {
  width: min(1120px, calc(100vw - 40px));

  background:
    linear-gradient(rgba(12, 16, 20, 0.84), rgba(12, 16, 20, 0.96)),
    url("../images/riisi-pieni.jpg");

  background-position: center;
  background-size: cover;
}

.guide-close {
  top: 14px;
  right: 14px;

  width: 42px;
  height: 42px;

  font-size: 22px;
}

.guide-shell {
  height: 100%;
  overflow: auto;
  padding: 34px 32px 30px;
}

.guide-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  align-items: start;
  gap: 28px;

  margin-bottom: 28px;
}

.guide-photo-wrap {
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;

  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.guide-photo {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.guide-kicker {
  margin: 0 0 10px;

  color: rgba(255, 255, 255, 0.74);
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.guide-intro h2 {
  margin: 0 0 14px;

  color: var(--yellow);
  font-family: var(--font-vollkorn);
  font-size: 34px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-lead,
.guide-body-text,
.guide-quote p {
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-cormorant);
}

.guide-lead {
  max-width: 720px;
  margin: 0 0 18px;

  font-size: 28px;
  line-height: 1.34;
}

.guide-section {
  margin-top: 24px;
}

.guide-section-title {
  margin: 0 0 14px;

  color: var(--yellow);
  font-family: var(--font-vollkorn);
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-body-text {
  max-width: 920px;

  font-size: 24px;
  line-height: 1.45;
}

.guide-testimonials {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.guide-quote {
  padding: 20px 20px 18px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;

  text-align: left;

  background: rgba(255, 255, 255, 0.08);

  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.guide-quote p {
  margin: 0 0 12px;

  font-size: 24px;
  line-height: 1.38;
}

.guide-quote span {
  display: block;

  margin-top: 14px;

  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-inter);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.guide-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
/* =========================
   GUIDE STORY / OPASESITTELY
   ========================= */

.guide-story-section {
  margin-top: 2.5rem;
}

.guide-story-card {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.025)
    );
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.guide-story-lead {
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
  line-height: 1.65;
  color: #ffffff;
}

.guide-story-highlight {
  margin: 1.6rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid #faba00;
  border-radius: 0 16px 16px 0;
  background: rgba(250, 186, 0, 0.08);
  color: #f3e5b5;
  font-family: var(--font-cormorant, Georgia, serif);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.35;
  font-style: italic;
}

.guide-story-closing {
  margin-top: 1.3rem;
  color: #faba00;
  font-weight: 600;
}

.guide-story-card .guide-body-text {
  max-width: 72ch;
}

@media (max-width: 700px) {
  .guide-story-card {
    padding: 1.15rem;
    border-radius: 18px;
  }

  .guide-story-highlight {
    font-size: 1.2rem;
    padding: 0.9rem 1rem;
  }
}
/* =========================
   GUIDE OVERLAY OPEN STATE
   ========================= */

.guide-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.guide-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.guide-open {
  overflow: hidden;
}