/* Main CSS */

/* Global Variables */
:root {
  /* Fonts */
  --default-font: "Times New Roman";

  /* Global Colors */
  --background-color: #FFFFFF;
  --surface-color: #E6E6E6;
  --Greyscale-900: #1A1A1A;
  --default-font-color: #1A1A1A;
  --Greyscale-50: #CCC;

  /* Layout */
  --nav-height: 100px;
  --center-gap-half: clamp(0px, 1.5vw, 20px);
}

/* General styling */
body {
  background-color: var(--background-color);
  color: var(--default-font-color);
  font-family: var(--default-font);
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Headings (h1–h6) */
h1,
h2,
h3,
h4,
h5,
h6 {
  /* font-family inherited */
  color: var(--default-font-color);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
}


/* Headings sizing scale (responsive-friendly) */
h1 {
  font-size: clamp(1rem, 4vw + 1rem, 2rem);
}

/* CSS tool for making text responsive without breaking layouts -> clamp(min, preferred, max) */
h2 {
  font-size: clamp(0.75rem, 3vw + 1rem, 1.5rem);
}

h3 {
  font-size: clamp(0.75rem, 2vw + 1rem, 1.5rem);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Paragraphs */
p {
  color: var(--default-font-color);
  padding-inline: clamp(1rem, 3vw, 2rem);
  max-width: 85ch;
  margin-inline: auto;
  line-height: 1.6;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  text-wrap: pretty;
}

main strong {
  font-weight: 700;
}

section h1,
section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

section p {
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}


/* =========================================
    OPENING PAGE
   ========================================= */
.forest-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  overflow: hidden;
  transition: opacity 3s ease-in-out;
}

/* white gradient overlay */
.forest-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #ffffff 0%, #f2f2f2 50%, #ffffff 100%);
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
  z-index: 5;
}

.forest {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Main Background Image */
.bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
  z-index: 1;
}

/* Shared styles for all trees */
.forest img.tree {
  position: absolute;
  bottom: 0;
  height: clamp(100vh, 100vh, 950px);
  object-fit: contain;
  transition: transform 2.5s ease-in-out;
  z-index: 4;
}

/* left side trees */
.forest-left .tree {
  right: 50%;
  margin-right: var(--center-gap-half);
  transform: translateX(var(--shift));
}

.forest-left .left-tree {
  --shift: -0px;
  transform: translateX(var(--shift)) scaleX(-1);
}

.forest-left .l2 {
  --shift: clamp(-90px, -10vw, -30px);
}

.forest-left .l3 {
  --shift: clamp(-170px, -18vw, -60px);
}

.forest-left .l4 {
  --shift: clamp(-250px, -26vw, -90px);
}

.forest-left .l5 {
  --shift: clamp(-330px, -34vw, -130px);
}

.forest-left .l6 {
  --shift: clamp(-410px, -42vw, -180px);
}

/* right side trees */
.forest-right .tree {
  left: 50%;
  margin-left: var(--center-gap-half);
  transform: translateX(var(--shift));
}

.forest-right .right-tree {
  --shift: 0px;
}

.forest-right .r1 {
  --shift: clamp(30px, 8vw, 80px);
}

.forest-right .r2 {
  --shift: clamp(60px, 15vw, 160px);
}

.forest-right .r3 {
  --shift: clamp(90px, 22vw, 240px);
}

.forest-right .r4 {
  --shift: clamp(130px, 30vw, 320px);
}

.forest-right .r5 {
  --shift: clamp(170px, 38vw, 400px);
}

.forest-right .r6 {
  --shift: clamp(210px, 46vw, 480px);
}

.far {
  opacity: 0.8;
}

/* witch svg */
.witch-svg {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(80px, 8vw, 120px);
  height: auto;
  z-index: 18;
  transition: transform 2.5s ease-in-out, opacity 1s ease-in-out;
}

/* title and button */
.title-box {
  position: fixed;
  left: 50%;
  top: 70%;
  transform: translateX(-50%);
  z-index: 15;
  text-align: center;
  white-space: nowrap;
  width: clamp(280px, 30vw, 400px);
  opacity: 1;
  transition: opacity 1s ease-in-out;
}

.title-box .title {
  margin: 0 0 0.4rem 0;
  text-transform: uppercase;
  font-size: 1.5rem;
  font-weight: 700;
}

.title-box .subtitle {
  margin: 0 0 0.8rem 0;
  font-size: 0.8rem;
  font-weight: 400;
}

@media (max-width: 500px) {
  .title-box .title {
    white-space: normal;
    line-height: 1;
  }
}

.enter-btn {
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  background: transparent;
  border: 1px solid var(--default-font-color);
  color: var(--default-font-color);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.enter-btn:hover {
  background: var(--default-font-color);
  color: var(--background-color);
}

/* animation opening */
.forest.opening .forest-left .tree {
  transform: translateX(calc(var(--shift) - 100vw));
}

.forest.opening .forest-left .left-tree {
  transform: translateX(calc(var(--shift) - 100vw)) scaleX(-1);
}

.forest.opening .forest-right .tree {
  transform: translateX(calc(var(--shift) + 100vw));
}

.forest-container.opening .title-box,
.forest-container.opening .forest-gradient {
  opacity: 0;
  pointer-events: none;
}

.forest-container.hidden {
  display: none;
}

.forest.opening .witch-svg {
  transform: translate(-50%, -100vh) scale(0.1);
  opacity: 0;
}

.content-to-reveal {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out;
}

.content-to-reveal.visible {
  opacity: 1;
  visibility: visible;
}

/* ---------------------------------------
                   Navbar
------------------------------------------ */
.navbar {
  display: flex;
  padding: 24px;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
}

.navbar-nav {
  padding: 8px 24px;
  gap: 24px;
  border-radius: 80px;
  background-color: var(--surface-color);
}

/* Logo */
.navbar-brand svg {
  width: 50px;
  height: auto;
  flex-shrink: 0;
}

.navbar-nav .nav-link {
  padding: 10px 24px !important;
  justify-content: center;
  gap: 10px;
  border-radius: 80px;
  color: var(--default-font-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  text-decoration: none;
  background-color: color-mix(in srgb, var(--Greyscale-50), transparent 35%);
}

.navbar .nav-link.active {
  color: var(--surface-color) !important;
  text-decoration: none;
  background-color: var(--Greyscale-900);
}

/* Theme Switcher in navbar */
.navbar .layout-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 24px;
  margin-left: auto;
  transform: translateY(-50%);
  z-index: 9999;    /* above overlay */
}

.navbar .layout-container .layout-button {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar .layout-container .layout-button svg {
  width: 35px;
  height: 35px;
  aspect-ratio: 1/1;
  display: inline-block;
  vertical-align: middle;
}

.navbar .layout-container .layout-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.navbar .layout-container .layout-options {
  display: none; /* hidden by default */
  position: absolute;
  top: 50px;
  right: 0;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  list-style: none;
  margin: 0;
  z-index: 9999;
}

.navbar .layout-container .layout-options.active {
  display: flex;
  gap: 10px;
}

.navbar .layout-container .layout-options .trigger-style {
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 6px 12px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: visible;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hide label by default */
.trigger-style .style-label {
  display: block;
  opacity: 0;
  visibility: hidden;
  white-space: nowrap;
  font-size: 20px;
  transition: opacity 0.2s ease;
}

.trigger-style:hover {
  transform: translateY(-2px);  
}

/* Reveal label on hover */
.trigger-style.active-theme .style-label,
.trigger-style:hover .style-label {
  opacity: 1 !important;
  visibility: visible !important;
  width: auto;
  justify-content: flex-start;
  padding: 5px 15px;
  align-self: center;
  display: flex;
  margin-left: 8px;
  white-space: nowrap;
  color: white;
}

/* Image inside the circle */
.trigger-style .style-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.trigger-style .style-icon path {
  fill: black !important;
  stroke: black;
}

/* Dropdown overlay */
.dropdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); 
  z-index: 9998; /* just below the dropdown with z-index: 9999*/
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Navbar Responsive --- */
@media (max-width: 991px) {
  #menuItems {
    padding: 20px 0;
    border-radius: 0; 
    width: 100%;
  }

  .navbar-nav {
    flex-direction: column !important;
    gap: 10px;
    padding: 0;
    background: none;
  }

  .navbar-toggler {
    border: none;
  }

  .navbar-toggler-icon {
    filter: brightness(0);
    width: 28px;
    height: 28px;
  }
}

/* Theme Switcher button: Move to bottom-left on smaller screens */
@media (max-width: 991px) {
  .navbar .layout-container {
    position: fixed;
    top: auto;
    bottom: 24px;
    right: 20px;
    left: auto;
    transform: none;
  }

  /* Dropdown opens upward from bottom */
  .navbar .layout-container .layout-options {
    top: auto;
    bottom: 60px;
    left: auto;
    right: 0;
  }
}

/* Theme Switcher button on phones */
@media (max-width: 480px) {
  .navbar .layout-container {
    bottom: 10px;
    right: 10px;
    left: auto;
  }

  .navbar .layout-container .layout-options {
    bottom: 50px;
    right: 10px;
    left: auto;
  }
}

@media (max-width: 768px) {
  .navbar-nav {
    padding: 8px 24px;
    gap: 12px;
  }

  .navbar-nav a {
    padding: 10px 16px;
  }
}


/* ------------------------------------
                  FOOTER
-------------------------------------- */
.footer-separator {
  height: 2px;
  background: black;
  max-width: 90%;
  margin: 40px auto;
}

footer p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: none;
}

footer a {
  text-decoration: none;
  color: var(--default-font-color);
}

.bi-github, 
.bi-envelope {
  display: inline;
  vertical-align: middle;
  color: black;
}

/* =========================================
    INDEX PAGE
   ========================================= */

/* --- Carousel --- */
.carousel-frame-wrapper {
  position: relative;
}

.carousel {
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 70vh;
  background: none;
  overflow: hidden;
  position: relative;
}

.carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-item {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-caption {
  position: absolute;
  bottom: 10%;
  left: 10%;
  right: auto;
  text-align: left;
  z-index: 10;
  /* above image */
  padding: 0.5rem 1rem;
}

.carousel-caption a {
  color: var(--background-color);
  text-decoration: none;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-family: var(--default-font);
  font-weight: bold;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  transition: color 0.3s ease;
}

.carousel-caption a:hover {
  color: var(--Greyscale-50);
  transform: translateX(3px);
}

.carousel-control-prev,
.carousel-control-next {
  width: 10%;
  opacity: 0.8;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.introduction,
.link-documentation {
  max-width: 90%;
  margin: 4rem auto;
  padding: 0 1rem;
  text-align: center;
}

.introduction-title h2::after,
.link-documentation-title h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: var(--default-font-color);
  margin: 1em auto 1em;
}

/* hide the curve of theme 2 by default */
.introduction-title h1 .curved-svg {
  display: none;
}

.introduction-title h1 .std-text {
  display: block;
}

.introduction-text p,
.link-documentation-text p {
  padding-inline: clamp(1rem, 3vw, 2rem);
  max-width: 70ch;
  margin-inline: auto;
  line-height: 1.6;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  text-wrap: pretty;
}

.link-documentation a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--default-font-color);
  border-radius: 2rem;
  color: var(--default-font-color);
  text-decoration: none;
  font-weight: 600;
  margin: 1.5rem;
}

.link-documentation a:hover {
  background-color: var(--default-font-color);
  color: var(--background-color);
}

/* opening page */
@media (max-width: 480px) {
  .title-content {
    top: 60%;
  }

  .title {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .enter-btn {
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    white-space: normal;
    /* allow wrapping on very narrow screens */
  }
}

@media (max-width: 400px) {
  .forest {
    object-fit: cover;
    min-width: 120vw;
    /* ensure coverage */
  }
}

@media (max-width: 360px) {
  .title-content {
    top: 55%;
  }

  .title {
    font-size: 1.4rem;
  }

  .subtitle {
    font-size: 1rem;
  }
}

/* carousel */
@media (max-width: 576px) {
  .carousel-caption {
    bottom: 5%;
    left: 5%;
  }

  .carousel-caption a {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {

  .introduction,
  .link-documentation {
    padding: 0 1rem;
  }
}

/* Mobile + narrow viewports */
@media (max-width: 991px) {
  .forest {
    width: 100vw;
    /* Force fill screen */
    height: 100vh;
    object-fit: cover;
    /* Scale as needed */
    min-width: 100vw;
    min-height: 100vh;
  }
}


/* ------------------------------------
                  TOGGLE EXHIBITION PAGE
-------------------------------------- */
.toggle-frame {
  position: sticky;
  top: var(--nav-height);
  z-index: 990;
  width: 100%;
  background-color: var(--background-color);
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#labelChrono,
#labelEras {
  flex: 1;
  width: 50%;
}

#labelChrono {
  text-align: right;
  padding-right: 12px;
}

#labelEras {
  text-align: left;
  padding-left: 12px;
}

.toggle-pill {
  width: 128px;
  height: 68px;
  background: var(--background-color);
  border: 1px solid var(--default-font-color);
  border-radius: 200px;
  position: relative;
  cursor: pointer;
  flex: 0 0 128px !important;
}

.toggle-knob {
  width: 60px !important;
  height: 60px !important;
  background: var(--default-font-color);
  border-radius: 50%;

  position: absolute;
  top: 3px !important;
  left: 3px !important;

  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);

  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.toggle-pill.eras-active .toggle-knob {
  transform: translateX(60px) !important;
}

.inactive-icon-wrapper {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  right: 18px !important;
  left: auto !important;
}

.toggle-pill.eras-active .inactive-icon-wrapper {
  right: auto !important;
  left: 18px !important;
}


/* ICON COLORS */
.toggle-knob svg path,
.toggle-knob svg rect {
  fill: var(--background-color) !important;
}

.inactive-icon-wrapper svg path,
.inactive-icon-wrapper svg rect {
  fill: var(--default-font-color) !important;
}

.toggle-text {
  font-size: 24px;
  font-family: var(--default-font);
  cursor: pointer;
  color: var(--default-font-color);
  transition: opacity 0.3s ease;
  text-align: center;
}

.active-text {
  font-weight: 700;
}

@media (max-width: 480px) {
  .toggle-frame {
    top: 80px;
    gap: 12px;
  }

  .toggle-text {
    font-size: 16px;
  }

  .toggle-pill {
    width: 100px;
    height: 50px;
  }

  .toggle-knob {
    width: 42px !important;
    height: 42px !important;
    top: 3px !important;
    left: 3px !important;
  }

  .toggle-pill.eras-active .toggle-knob {
    transform: translateX(50px);
  }

  #toggleIcon,
  #inactiveIcon {
    width: 24px;
    height: 24px;
  }

  .inactive-icon-wrapper {
    right: 12px;
  }
}

/*  ERA CARDS UNDER TOGGLE  */
.p-3 {
  padding-bottom: 12px;
}

.era-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--Greyscale-900);
  border-radius: 16px;
  gap: 12px;
  background: white;
  box-sizing: border-box;
  height: 100%;

}

.era-card {
  position: relative;
}

.bottom-left,
.bottom-right {
  position: absolute;
}

.era-card {
  gap: 0;
}

.era-card-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  gap: 12px;
  height: 100%;
}

/* Wrap title + description in a header div */
.era-card-header {
  flex: 0 0 auto;
}

.era-title {
  font-family: var(--default-font);
  font-size: 20px;
  font-weight: 400;
  color: var(--Greyscale-900);
  margin-bottom: 2px;
}

.era-description {
  padding-inline: 0 !important;
  padding: 0 !important;
  margin-inline: 0 !important;
  max-width: 100% !important;
  font-family: var(--default-font);
  font-size: 14px;
  color: var(--Greyscale-900);
  margin: 0;
  margin-bottom: 12px;
  line-height: 1.2;
  text-align: left;
}


/* ERA ITEMS - Grid layout */
.era-items {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 145px);
  gap: 10px;
}

/* Individual image + text container */
.era-item {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
}

/* Image inside the item */
.era-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text overlay */
.era-item-text {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  color: white;
  font-family: "Times New Roman", serif;
  font-size: 14px;
  /* smaller for responsiveness */
  font-weight: 400;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
  word-wrap: break-word;
  pointer-events: none;
  line-height: 1.2;

  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* maximum 3 lines */
  -webkit-box-orient: vertical;
}


/* Small screen adjustments */
@media (max-width: 480px) {
  .era-items {
    grid-template-columns: 1fr;
    /* 1 column on mobile */
  }

  .era-item-text {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
}


header {
  position: sticky;
  top: 0;
  z-index: 10000;   /* higher than toggle- important, don't change */
  background: var(--background-color);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;   /* avoid creating new stacking context */
}

/* Ensure navbar itself doesn't create an interfering stacking context */
nav.navbar {
  position: relative;
  top: 0;
  z-index: 10001; /* above header background */
  background: transparent; /* header provides background */
}


/* Chronology Timeline */
.chronology-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding-top: 20px;
  background-color: var(--Greyscale-50);
  width: 100%;
}

.timeline-lines {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Central vertical line */
.timeline-lines::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--Greyscale-900);
  transform: translateX(-50%);
  z-index: 1;
}

.line {
  display: flex;
  width: 100%;
  margin-bottom: 40px;
  position: relative;
}

/* Odd lines - right side */
.line:nth-child(odd) {
  justify-content: flex-end;
}

/* Even lines - left side */
.line:nth-child(even) {
  justify-content: flex-start;
}

/* Card */
.card {
  display: flex;
  flex-direction: row;
  border: 1px solid var(--Greyscale-900);
  border-radius: 12px;
  overflow: hidden;
  width: 500px;
  max-width: 100%;
  background: white;
  z-index: 3;
}

/* Left-side card (even) image */
.left-card .picture {
  border-radius: 12px 0 0 12px;
  margin-left: 0;
}

/* Image */
.picture,
.picture-2 {
  width: 168px;
  height: 160px;
  flex-shrink: 0;
  background-color: var(--Greyscale-50);
}

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

/* Text section fills remaining space */
.text {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.text-wrapper {
  font-size: 24px;
  font-family: "Times New Roman";
}

.div {
  font-size: 20px;
  font-family: "Times New Roman";
}

/* Black dot */
.ellipse,
.ellipse-2 {
  width: 20px;
  height: 20px;
  background: var(--Greyscale-900);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
  z-index: 0;
}

.text-decoration-none {
  text-decoration: none;
  color: inherit;
  display: flex;
}

.card:hover,
.era-item:hover {
  cursor: pointer;
}

@media (max-width: 768px) {

  /* Center the entire timeline content horizontally */
  .timeline-lines {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  
  .line {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 20px;

  }

  .card {
    width: 85%;
    min-width: 250px;
    margin: 0 auto;
    flex-direction: column;
    align-self: center;
  }

  .line:nth-child(odd),
  .line:nth-child(even) {
    justify-content: center;
  }

  .card .picture,
  .card .text {
    width: 100%;
  }
  .card .picture {
    border-radius: 8px 8px 0 0;
  }

  .left-card .picture {
    border-radius: 8px 8px 0 0;
  }

  .card.left-card {
    flex-direction: column-reverse;
  }
}

/* -------------------------
            MAP
---------------------------- */
.map-container {
  margin: 0 auto 30px auto;
  display: flex;
  justify-content: center; 
  align-items: center; 
}

.map-container svg {
  width: 100%;
  height: auto;
  display: block;
}

.museum-room {
  fill: var(--background-color) !important; 
  stroke: none;
  opacity: 0.8;
  transition: fill 0.3s, opacity 0.3s;
}

/* Hover and active effect */
.museum-room:hover {
  fill: var(--Greyscale-50) !important;
  opacity: 1.0;
  cursor: pointer;
}

.museum-room.active {
  fill: var(--Greyscale-50) !important;
  opacity: 1.0;
  cursor: pointer;
}

.room-name {
  font-family: var(--default-font);
  font-size: 25px;
  font-weight: 600;
}

.museum-door {
  fill: var(--background-color);
}

.map-description {
  border: 2px solid var(--Greyscale-900);
  border-radius: 8px;
  padding: 20px 40px;
}

.map-description p {
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 1em;
  padding: 0;
}

.room-title {
  text-align: center;
  margin-bottom: 15px;
}

/* "Explore Room Items" Button */
.custom-room-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--default-font-color);
  border-radius: 2rem;
  color: var(--default-font-color);
  text-decoration: none;
  font-weight: 600;
}

.custom-room-btn:hover, 
.custom-room-btn.active {
  background-color: var(--default-font-color);
  color: var(--background-color);
  border: 1px solid var(--default-font-color);
}


/* -------------------------
    ITEM PAGE
---------------------------- */
.item-table {
  align-items: stretch;
}

.item-box {
  flex-direction: column;
  position: relative;
  aspect-ratio: 2 / 1;
  min-height: 500px;
}

.item-box a {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  height: 100%;
  position: relative;
}

.item-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.table-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: auto;
  padding: 1.5rem;
  background-color: var(--background-color);
}

@media (max-width: 767.98px) {
  .item-box {
    height: 300px;
  }

  .item-box img {
    position: relative;
  }
}

.table {
  width: 100%;
  margin: 0;
  background-color: transparent;
}

.table th,
.table td {
  border: 1px solid var(--Greyscale-50);
  padding: 8px 10px;
  vertical-align: top;
}

.table thead tr:first-child th {
  text-align: center;
  font-size: 1.1rem;
}

#item-date,
#item-room {
  cursor: pointer;
}

.text-box button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--default-font-color);
  border-radius: 2rem;
  color: var(--default-font-color);
  text-decoration: none;
  font-weight: 600;
  margin-top: 1.5rem;
}

.text-box button:hover {
  background-color: var(--default-font-color);
  color: var(--background-color);
  border: 1px solid var(--default-font-color);
}

.text-box button.active {
  background-color: var(--default-font-color);
  color: var(--background-color);
  border: 1px solid var(--default-font-color);
}

#item-description-display {
  margin: 4rem auto 1rem auto;
  padding: 0 1rem;
  text-align: center;
  text-align: justify;
}

.card-footer button {
  border: 2px solid var(--default-font-color);
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  color: var(--default-font-color);
  text-decoration: none;
  font-weight: 600;
  margin-top: 0;
}

.card-footer button:hover {
  background-color: var(--default-font-color);
  color: var(--background-color);
}

#room-nav-controls span {
  font-family: var(--default-font);
  color: var(--Greyscale-900) !important;
  text-align: center;
}

#imageModal .modal-body {
  padding: 0 !important;
  background-color: transparent;
}

#imageModal .modal-body img {
  width: auto !important;
  max-height: 95vh !important;
  transition: all 0.3s ease-in-out;
}

#imageModal .modal-content {
  border-radius: 0;
  border: none;
  background-color: transparent;
}

/* Prev and next buttons */
.btn-icon {
  display: none;
  color: var(--default-font-color);
  transition: color 0.3s ease;
}

@media (max-width: 576px) {
  .btn-text {
    display: none;
  }

  .btn-icon {
    display: inline-block;
    font-size: 1.2rem;
    color: var(--default-font-color);
  }

  #btn-prev:hover .btn-icon,
  #btn-next:hover .btn-icon {
    color: var(--surface-color);
  }
}

/* -------------------------
    DOCUMENTATION PAGE
---------------------------- */

#documentation ul:not(.list-unstyled),
#documentation ol:not(.list-unstyled) {
  max-width: 85ch;
  margin-inline: auto;
  font-family: var(--default-font);
  color: var(--default-font-color);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
  text-align: left;
  line-height: 1.6;
  list-style-position: inside;
  margin-bottom: 1.5rem;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

#documentation li {
  margin-bottom: 0.5rem;
}

.doc-chapter h2,
.doc-chapter h3,
.doc-chapter h4 {
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.documentation-page .page-content a {
  overflow-wrap: break-word;
  word-break: break-word;
  word-wrap: break-word;
  color:var(--default-font-color);
}

.documentation-page .page-content a:hover {
  color: #d63384;
}

#documentation ol.flush-list {
  padding-inline-start: 0;
  list-style-position: unset; 
}

/* We set display: flex for the cards of exhibition page, here we want to restore bootstrap behavior */
.row.row-cols-1 .card {
  display: block;
  width: 100%;
}

.row.row-cols-1 .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.row.row-cols-1 .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
