/* GLOBAL RESET / BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Inter", sans-serif;
  background-color: #fafafa;
  color: #333;
}

/* 
   We ONLY apply the fixed/overflow logic for .landing-page.
   The detail page (class="detail-page") scrolls normally.
*/

/* For the landing page specifically: 
   - fixed-left, scrollable-right 
*/
body.landing-page {

  height: 100vh; 
  overflow: hidden; /* So the left is fixed & right is scrolled internally */
}

body.detail-page {
  /* The detail page should scroll normally if content is long */
  height: auto; 
  overflow: visible; 
}

/* =======================================
   LANDING PAGE LAYOUT
======================================= */

/* This alert is hidden by default, 
   but becomes visible in the media query 
   for small screens. */
.mobile-alert {
  display: none !important; 
  position: fixed; 
  top: 0; left: 0; 
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  /* Center the text */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
  box-sizing: border-box;
}

/* The "normal" landing layout for bigger screens */
.landing-left {
  position: fixed;
  top: 0;
  left: 0;
  width: 330px; 
  height: 100vh; 
  background: #ffffff;
  border-right: 1px solid #ccc;

  display: flex;
  align-items: center;
  justify-content: center;
}
.landing-left-content {
  max-width: 200px;
  text-align: center;
}

.landing-left-content {
  max-width: 350px;      
  padding: 1rem;      
  text-align: left;    
  color: #333;         
}


.landing-left-content .intro-text {
  margin: 1rem 0;        
  font-size: 0.95rem;    
  line-height: 1.6;      
}
.landing-left-content .intro-text-bold {
  margin: 1rem 0;        
  font-size: 0.95rem;    
  line-height: 1.6; 
  font-weight: 600;     
}


/* .landing-left-content .intro-text + .intro-text {
  border-top: 1px solid #eee;
  padding-top: 1rem;
} */


.landing-left-content .click-text {
  margin-top: 2rem;      
  font-size: 1rem;    
  font-weight: 600;      
  color: #222;           
  text-align: center;    
}

.landing-right {
  margin-left: 320px; 
  height: 100vh;
  overflow-y: auto;
  padding: 2rem;
  box-sizing: border-box;
}
.landing-right h1 {
  margin-bottom: 1rem;
}
.landing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.landing-grid img {
  width: 100%;
  aspect-ratio: 1 / 1; /* modern approach for squares */
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: transform 0.2s ease;
}
.landing-grid img:hover {
  transform: scale(1.02);
}
.gallery-item {
  cursor: pointer;
}

/* MEDIA QUERY: On small screens, show .mobile-alert and hide normal layout */
@media (max-width: 700px) {
  /* Hide the fixed left and the right side */
  .landing-left,
  .landing-right {
    display: none;
  }
  /* Show the mobile alert panel */
  .mobile-alert {
    display: flex !important;
  }
}
/* Gallery item wrapper */
.gallery-item {
  position: relative; /* So we can absolutely position the caption */
  display: inline-block;
  cursor: pointer;
}

/* Ensure the image doesn’t stretch oddly */
.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

/* The hover caption: hidden by default, and positioned absolutely */
.image-caption {
  display: none;               /* hidden by default */
  position: absolute;
  bottom: 0;                   /* can also do 'top: 0' if preferred */
  left: 0;
  background-color: #000;      /* solid black for maximum contrast */
  color: #fff;                 /* white text */
  opacity: 0.9;                /* slight transparency if you like, 
                                  but fully solid (1.0) is more consistent */
  padding: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.2;
  pointer-events: none;        /* let clicks pass through to the wrapper */
  white-space: pre-line;       /* so \n is respected in the text */
}

/* Show the caption on hover */
.gallery-item:hover .image-caption {
  display: block;
}

/* =======================================
   DETAIL PAGE LAYOUT
======================================= */
.page-container {
  max-width: 80%;
  margin: 0 auto;
  padding: 1rem 0;
}
header {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin: 1rem 0;
  padding: 1rem;
}
#artwork-info {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
#artwork-info img {
  max-width: 35%;
  width: 100%;
  height: auto;
  aspect-ratio: attr(width) / attr(height);
  border: 1px solid #ccc;
  border-radius: 4px;
  object-fit: cover;
}
#artwork-description {
  flex: 1;
}
#map-container {
  position: relative;
  height: 600px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 2rem;
  overflow: hidden;
  background-color: #eee;
}
#map {
  width: 100%;
  height: 100%;
}
.map-label {
  background: rgba(255, 255, 255, 0.5);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.8rem;
  width: auto !important;
  height: auto !important;
}
.map-badge {
  background: #e74c3c;
  color: #fff;
  text-align: center;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  line-height: 22px;
  font-size: 0.8rem;
}
/* Overlay buttons on map container */
.overlay-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 999;
  background-color: #fff;
  border: 1px solid #aaa;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  outline: none;
}
.overlay-btn:hover {
  background-color: #eee;
}

/* Single Event Modal (map-overlay) */
#map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hidden {
  display: none !important;
}

#overlay-content {
  background-color: #fff;
  width: 85%;
  max-width: 1200px;
  height: 90%;
  max-height: 90%;
  border-radius: 8px;
  padding: 1rem;
  display: grid;
  grid-template-rows: 90% 5%; 
  grid-template-columns: 1fr 1.2fr 1.8fr; 
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}


#overlay-event-text {
  max-height: 100%;
  overflow-y: auto;
  padding: 10px;
}
#overlay-close{
  color: black !important;
  position: absolute;
  top: 5%;
  right: 8%;
  z-index: 100000;
}
.close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: red;
}
.overlay-col {
  background-color: #fafafa;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1rem;
  overflow-y: auto;
  height: 100%;
}

.overlay-col::-webkit-scrollbar {
  width: 6px;
}
.overlay-col::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.col-middle {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 !important;
}
.col-middle svg{
  border: 0 !important;
}

/* Constrain the event thumb image in left col */
.col-left img {
  max-width: 100%;
  max-height: 300px;
  object-fit: cover;
}

/* nav buttons */
.overlay-nav {
  grid-column: 1 / 4;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem; 
}
.overlay-nav button {
  cursor: pointer;
  padding: 0.5rem 1rem;
  background: #eee;
  border: 1px solid #aaa;
  border-radius: 4px;
}

/* Full Network Overlay */
#full-network-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;

  display: flex;
  justify-content: center;
  align-items: center;
}
#full-network-content {
  background-color: #fff;
  width: 80%;
  max-width: 1200px;
  min-height: 50%;
  border-radius: 8px;
  padding: 1rem;
  position: relative;

  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
#full-network-content h2 {
  margin-top: 0.5rem;
  text-align: center;
}
#full-network-diagram {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
#full-network-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}
#full-network-close:hover {
  color: red;
}
.link-label {
  fill: #666;
  font-size: 12px;
  pointer-events: none;
}

/* Social Network Overlay */
#social-network-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;

  display: flex;
  justify-content: center;
  align-items: center;
}
#social-network-content {
  background-color: #fff;
  width: 80%;
  max-width: 1200px;
  min-height: 80%;
  border-radius: 8px;
  padding: 1rem;
  position: relative;

  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
#social-network-content svg{
  border: none !important;
}
#social-network-content h2 {
  margin: 0.5rem 0;
  text-align: center;
}
#social-network-diagram {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

/* 1) Lightbox overlay for enlarged event images */

#event-network-lightbox{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 2000; /* above everything else */
  display: flex;
  justify-content: center;
  align-items: center;
}
#event-network-close{
  position: absolute;
  top: 1rem;
  right: 2rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}
#image-lightbox.hidden {
  display: none;
}



/* close button at top-right corner of the lightbox */
#lightbox-close {
  position: absolute;
  top: 1rem;
  right: 2rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

/* 2) A style for "Back to Gallery" button */
.back-btn {
  margin:  0;
  padding: 0.5rem 1rem;
  background: #eee;
  border: 1px solid #aaa;
  border-radius: 4px;
  cursor: pointer;
}
.back-btn:hover {
  background: #ddd;
}
/* 1) Lightbox overlay for enlarged event images */
#image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 2000; /* above everything else */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Lightbox content container */
.lightbox-content {
  display: flex;
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  max-width: 90vw;
  max-height: 90vh;
}

/* The big image */
#lightbox-img {
  max-width: 100%; 
  max-height: 70vh; 
  object-fit: contain;
  border: 2px solid #fff;
  border-radius: 4px;
}

/* Text box with white background */
#lightbox-text {
  display: block;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #fff;
  border-radius: 4px;
  max-width: 100%;
  text-align: center;
}

/* Close button at the top-right corner */
#lightbox-close {
  position: absolute;
  top: 1rem;
  right: 2rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

/* ===============================
   INSTRUCTIONS MODAL
================================= */
#instructions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark overlay */
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.instructions-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    font-family: 'Arial', sans-serif;
    text-align: left;
    line-height: 1.6;
}

.instructions-modal-content h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
}

.instructions-modal-content p {
    font-size: 1rem;
    color: #555;
}

.instructions-modal-content ul {
    padding-left: 20px;
}

.instructions-modal-content li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Close Button */
.instructions-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.instructions-close:hover {
    color: #e74c3c;
}

/* ===============================
   FLOATING HELP ICON (BOTTOM-RIGHT)
================================= */
#instructions-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #f39c12;
    color: #fff;
    cursor: pointer;
    z-index: 3001;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.6);
}

#instructions-icon:hover {
    transform: scale(1.1);
}

/* Tooltip-like text that appears on hover */
#instructions-text {
    display: none;
    position: absolute;
    bottom: 50%;
    right: 110%;
    transform: translateY(50%);
    background: #333;
    color: #fff;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
    white-space: nowrap;
}

#instructions-icon:hover #instructions-text {
    display: block;
}

/* Smooth fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instructions-modal-content {
    animation: fadeIn 0.3s ease-in-out;
}

/* ===============================
   INSTRUCTIONS MODAL
================================= */
#instructions-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay */
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.instructions-modal-content {
  background: #ffffff;
  width: 90%;
  max-width: 900px;
  padding: 2rem;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  font-family: 'Arial', sans-serif;
  text-align: left;
  line-height: 1.6;
}

.instructions-modal-content h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #333;
  text-align: center;
}

.instructions-modal-content p {
  font-size: 1rem;
  color: #555;
}

.instructions-modal-content ul {
  padding-left: 20px;
}

.instructions-modal-content li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Close Button */
.instructions-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.instructions-close:hover {
  color: #e74c3c;
}

/* ===============================
 FLOATING HELP ICON (BOTTOM-RIGHT)
================================= */
#instructions-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #f39c12;
  color: #fff;
  cursor: pointer;
  z-index: 3001;
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease-in-out;
  box-shadow: 0 0 10px rgba(243, 156, 18, 0.6);
}

#instructions-icon:hover {
  transform: scale(1.1);
  width: 150px;
  height: 45px;
  font-size: 1.2rem;
  border-radius: 25px;
}

#instructions-icon:hover span {
  display: none
}

#instructions-icon:hover:before {
  content: "Instructions";

}
/* Tooltip-like text that appears on hover */
#instructions-text {
  display: none;
  position: absolute;
  bottom: 50%;
  right: 110%;
  transform: translateY(50%);
  background: #333;
  color: #fff;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.75rem;
  white-space: nowrap;
}

#instructions-icon:hover #instructions-text {
  display: block;
}

/* Smooth fade-in animation */
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(-10px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.instructions-modal-content {
  animation: fadeIn 0.3s ease-in-out;
}


.network-footer {
  font-size: 0.9rem;
  color: #555;
  text-align: center;
  margin-top: -0.5rem;
}


/* Container with 2 columns: smaller image-col (left) + bigger text col (right) */
.object-header {
  display: flex;
  align-items: flex-start; /* top-align them both */
  gap: 2rem;
  padding: 1rem;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Left side: narrower column for image */
#image-col {
  flex: 0 0 30%; /* 30% width, adjust as needed */
  display: flex;
  justify-content: center;  /* center image horizontally */
  align-items: center;      /* center image vertically */
  height: 100%;
}

/* The image itself */
#image-col img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  object-fit: cover;
}

/* Right side: bigger column for text */
.wall-label {
  flex: 1;  /* take remaining space */
  display: flex;
  flex-direction: column;
}

/* Larger text for the “big” lines */
.wall-label h2 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

/* Slightly smaller text for sublines (e.g. “Paris, 1717”) */
.wall-label h3 {
  font-size: 1rem;
  color: #555;
  margin-bottom: 0.3rem;
}

/* Medium text (Oil on canvas) */
.paint-medium {
  font-size: 1rem;
  color: #555;
}

/* Intro and museum link can be normal size */
#intro-text, 
#current-museum {
  font-size: 1rem;
  color: #333;
}

/* Smaller spacer between lines */
.label-spacer {
  margin: 0.5rem 0; /* smaller than 1rem */
}


@media (max-width: 700px) {
  .object-header {
    flex-direction: column;
    gap: 1rem;
  }
  .image-col, 
  .wall-label {
    flex: 0 0 auto;
    width: 100%;
  }
}
