
/* General Styling */
body {
  font-family: 'Almendra SC', serif;
  margin: 0;
  overflow-x: hidden; /* Prevent body overflow issues */
}

/* Hidden class for elements */
.hidden {
  display: none !important;
}

/* View Styling */
.view {
  display: none; /* All views are hidden by default */
  width: 100%;
  height: 100%;
  position: absolute; /* Position views on top of each other */
  top: 0;
  left: 0;
  background-color: #f5f5f5;
}

.view.active {
  display: block; /* Show the active view */
}

/* #region Homepage Styling */
#homepage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f5f5f5;
  text-align: center;
  top: 10px;
}

.homepage-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.title-line {
  font-size: 3rem; /* Adjust font size */
  margin: 0; /* Remove default margin */
  line-height: 1.2; /* Adjust line spacing */
  text-align: center; /* Center the text */
  color: #333; /* Adjust text color */
  font-family: "Diplomata", serif;
  font-weight: 300;
  font-style: normal;
  z-index: 10;
}

#homepage-description {
  font-size: 1.5rem; /* Adjust font size as needed */
  line-height: 1;
  max-width: 500px;
  font-family: "Almendra SC", serif; /* Inherit the font family */
  font-weight: 300; /* Keep the current weight */
  text-align: center; /* Ensure the text remains centered */
  color: #333; /* Optional: Adjust text color */
}

#homepage-name {
  font-size: 1.5rem; /* Adjust font size as needed */
  line-height: 1; /* Optional: Adjust line spacing for readability */
  font-family: "Almendra SC", serif; /* Inherit the font family */
  font-weight: 300; /* Keep the current weight */
  text-align: center; /* Ensure the text remains centered */
  color: #333; /* Optional: Adjust text color */
}


/* Overlay for homepage */
#homepage-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px; /* Match the height of the #title-section */
  background-color: #f5f5f5;
  z-index: 6; /* Ensure it sits above the #title-section */
}

/* Styling for the image below the title */
#homepage-image {
  max-width: 80%; /* Make the image responsive */
  display: block; /* Ensure it's treated as a block-level element */
}

/* Styling for the circular button */
.circle-button {
  width: 80px; /* Adjust the size of the circle */
  height: 80px;
  border: none;
  border-radius: 50%; /* Makes it a circle */
  background-color: #918ce9; /* Button background color */
  cursor: pointer;
  position: relative; /* Allow for tweaks in positioning */
  top: 10px; /* Adjust placement as needed */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
}

.circle-button:hover {
  background-color: #5D3FD3; /* Change the color on hover */
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Enhance shadow on hover */
}

/*#endregion*/

/* #region Shared Elements Styling */
#title-section.hidden,
#nav-buttons.hidden {
  display: none !important;
}

#title-section {
  text-align: center;
  position: fixed;
  top: 0; /* Sticks to the top of the viewport */
  z-index: 5;
  padding: 20px 10px;
  width: 100%; /* Ensure the title spans the viewport width */
  margin-bottom: 20px;
  box-sizing: border-box; /* Include padding in width calculation */
}

#title-section h1 {
  font-size: 2rem; /* Larger font for the title */
  margin: 0; /* Remove default margin */
}

#nav-buttons {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 5;
}

.custom-button {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between image and text */
  padding: 10px; /* Increase button padding for a larger button */
  border-radius: 8px;
  cursor: pointer;
  color: #000000; /* Text color */
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.custom-button img {
  width: auto;
  height: 60px;
  max-width: 30px;
  max-height: 70px;
  object-fit: contain;
}

.custom-button:hover {
  transform: scale(1.05);
}

/* About Button Styling */
#about-btn {
  position: fixed;
  top: 10px; /* Distance from the top */
  right: 10px; /* Distance from the right */
  z-index: 5; /* Same z-index as #nav-buttons for consistency */
  display: flex;
  align-items: center;
  gap: 10px; /* Space between image and text */
  padding: 10px; /* Match nav button padding */
  border-radius: 8px; /* Match nav button rounding */
  cursor: pointer;
  color: #000000; /* Match nav button text color */
}

#about-btn img {
  width: auto;
  height: 40px;
  max-width: 70px;
  max-height: 40px;
  object-fit: contain; /* Maintain aspect ratio */
}

#about-btn:hover {
  transform: scale(1.05); /* Slightly enlarge on hover */
}

/* #endregion */

/* #region About page */

/*overlay*/

#about-underlay { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 80px; /* Match the height of the #title-section */ 
  background-color: #f5f5f5; 
  z-index: 1; /* Ensure it sits above the #title-section */ }

#about-content {
  margin-top: 40px; 
  background-color: #f5f5f5; /* Match your desired background color */
  box-sizing: border-box; /* Ensure padding is included in dimensions */
  width: 100%; /* Extend across the full width */
  min-height: 100vh; /* Ensure it takes at least the viewport height */
}

#about-content h2 {
  font-size: 1.5rem;
  margin-top: 130px; 
  margin-bottom: 10px; 
  margin-left: 170px;
  margin-right: 170px;
  color: #000000;
}

#about-content p {
  font-size: 1.2rem; 
  line-height: 1.6; 
  margin-bottom: 10px; 
  margin-left: 170px;
  margin-right: 170px;
  color: #000000;
  background-color: #f5f5f5;
}

#about-content img {
  align-items: center;
  max-width: 70%; /* Ensure images are responsive */
  height: auto; /* Maintain aspect ratio */
  margin: 10px 10px 10px 160px; 
  background-color: #f5f5f5;
}


/* #endregion */

/* #region Chart Styling */
#view1.active {
  display: flex; /* Flex layout for positioning */
  position: relative;
  width: 100%;
  height: 100vh; /* Full viewport height */
  padding-top: 100px; /* Push everything down */
  box-sizing: border-box;
  background-color: #f5f5f5;
}

svg {
  display: block;
  margin: 0 auto; /* Center the SVG horizontally */
  max-width: 100%; /* Ensure it fits within the container */
  height: auto;
}

.right-menu {
  position: absolute;
  top: 100px; /* Float in the top-right corner */
  right: 30px;
  padding: 10px;
  border-radius: 5px;
  z-index: 10;
}

#toggleViewButton {
  font-family: 'Almendra SC', serif;
  font-size: 16px; /* Adjust font size */
  background-color: #e6e5e5; /* Set button background color */
  color: #000; /* Set text color */
  border: none; /* Remove default border */
  border-radius: 5px; /* Add rounded corners */
  padding: 10px 20px; /* Add padding for a larger click area */
  cursor: pointer; /* Show pointer cursor on hover */
  transition: background-color 0.2s ease, transform 0.2s ease; /* Smooth transitions */
}

/* Hover effect */
#toggleViewButton:hover {
  background-color: #bebebe; /* Darken background on hover */
}

/* Optional: Add focus styles for accessibility */
#toggleViewButton:focus {
  outline: 1px solid #ffffff; /* Add a white outline when focused */
  outline-offset: 2px;
}

#circle-selector {
  position: absolute;
  top: 40px;
  left: 15%; 
  transform: translateX(-50%); /* Center alignment correction */
  z-index: 10; /* Ensure it's above the chart */
}

.interactive-selector {
  margin: 20px auto;
  text-align: center;
}

.interactive-selector svg {
  display: block;
  margin: auto;
}

circle {
  transition: opacity 0.3s, transform 0.3s;
}

.x-axis text {
  font-family: 'Almendra SC', serif;
  font-size: 14px; /* Adjust font size as needed */
  fill: #000000; /* Change the text color if desired */
}
/* #endregion */

/* #region Image Gallery Styles */


/* view2 setup */
#view2.active {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: hidden; /* Prevent vertical scrolling */
  overflow-x: auto; /* Allow horizontal scrolling for gallery */
  scrollbar-width: none; /* Hide scrollbar in Firefox */
  -ms-overflow-style: none; /* Hide scrollbar in IE */
  background-color: #f5f5f5;
}

#view2::-webkit-scrollbar{
  display: none; /* Hide scrollbar in WebKit browsers */
}

/* Parent container for the image gallery */
.image-gallery {
  display: flex;
  flex-direction: column; /* Stack rows vertically */
  gap: 10px;
  width: max-content; /* Allow gallery to scroll horizontally */
  height: auto;
  overflow: visible; /* Ensure scrolling happens on the parent */
  padding: 90px 10px;
}

/* Style for each row */
.image-row {
  display: flex; /* Arrange images horizontally */
  flex-wrap: nowrap; /* Prevent wrapping */
  gap: 10px; /* Space between images */
  height: 200px; /* Fixed row height */
  padding: 5px;
}

/* Style for images */
.image-row img {
  height: 100%; /* Fit images to row height */
  object-fit: cover; /* Maintain aspect ratio */
  cursor: pointer;
  background-color: #e3e3b5; /* Placeholder color */
}

#image-gallery img:hover {
  transform: scale(1.05); /* Optional: Slight zoom on hover */
  transition: transform 0.2s ease-in-out; /* Smooth hover effect */
}

#slider-container {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0; /* Sticks to the bottom of the viewport */
  z-index: 10;
  background-color: #f5f5f5;
  padding: 10px;
  width: 60%; 
  box-sizing: border-box;
}

#year-slider {
  -webkit-appearance: none; /* Remove default styling in WebKit browsers */
  appearance: none; /* Remove default styling in modern browsers */
  width: 80%;
  height: 6px;
  background: #777; /* Custom track gradient */
  border-radius: 3px; /* Rounded track edges */
  outline: none; /* Remove focus outline */
  margin: 0 10px;
  cursor: pointer; /* Change cursor to pointer */
}


/* Style for the thumb (draggable button) */
#year-slider::-webkit-slider-thumb {
  -webkit-appearance: none; /* Remove default styling in WebKit browsers */
  appearance: none; /* Ensure cross-browser consistency */
  width: 16px; /* Thumb width */
  height: 16px; /* Thumb height */
  background: #555; /* Thumb color */
  border-radius: 50%; /* Make thumb circular */
  cursor: pointer; /* Change cursor to pointer */
  border: 2px solid #f5f5f5; /* Optional white border */
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3); /* Optional shadow for depth */
}

/* Hover effect on the thumb */
#year-slider::-webkit-slider-thumb:hover {
  background: #333; /* Darker thumb on hover */
}

/* Focused slider track */
#year-slider:focus {
  outline: none; /* Remove focus outline */
  background: #777; /* Slightly darker track on focus */
}
/* #endregion */

/* #region Card Styles */
/* Card/modal styling */
.card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex; /* Use flexbox for image and text alignment */
  background: #ffffff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
  display: none;
  z-index: 1001;
  width: 80%; 
  height: 80%; 
  max-width: 800px; 
  max-height: 700px; 
  border-radius: 10px; 
  overflow: hidden; /* Ensure contents stay inside the card */
  box-sizing: border-box; /* Include padding in total dimensions */
}

.card.active {
  display: flex;
}

/* Normal Layout: Image centered within its half */
.normal-layout {
  display: flex;
  flex-direction: row; /* Image and text side-by-side */
  gap: 20px; /* Space between image and text */
  align-items: center; /* Center items vertically */
}

.normal-layout img.card-image {
  width: 50%; /* Image takes 50% of the card width */
  height: auto; /* Maintain aspect ratio */
  max-height: 90%;
  object-fit: contain; /* Prevent distortion */
  margin: 0 auto; /* Center within its allocated half */
  display: block; /* Ensure predictable layout behavior */
  padding: 10px;
}

/* Wide Layout: Image fully centered */
.wide-layout {
  display: flex;
  flex-direction: column; /* Stack text and image vertically */
  align-items: center; /* Center text and image horizontally */
  justify-content: center; /* Center content vertically */
  width: 100%; /* Make sure it spans the full width of the card */
  height: 100%; /* Ensure it occupies the full height of the card */
  gap: 20px; /* Space between text and image */
}

.wide-layout .card-text {
  text-align: center; /* Center-align text */
  width: 100%;
}

.wide-layout img.card-image {
  width: auto; /* Image width adjusts to its natural size */
  max-width: 90%; /* Prevent image from exceeding 90% of the card width */
  height: auto; /* Maintain aspect ratio */
  max-height: 60%; /* Prevent image from exceeding 70% of the card height */
  object-fit: contain; /* Ensure the image fits without distortion */
  margin: 0 auto; /* Center the image horizontally */
  display: block; /* Ensure predictable layout behavior */
}

.card h2 {
  font-size: 1.6rem; /* Adjust heading size */
  margin: 0 0 10px 0; /* Add spacing below heading */
}

.card p {
  margin: 10px 0; /* Add consistent spacing */
  line-height: 1.5; /* Improve readability */
  border-top: 1px solid #ddd; /* Add a line above each paragraph */
  padding-top: 10px; /* Space text away from the line */
}

.card p:first-child {
  border-top: none; /* Remove the top line for the first paragraph */
  padding-top: 0; /* Remove padding for the first paragraph */
}

/* Close button as an "X" in the top-left corner */
.close-card-btn {
  position: absolute;
  top: 10px; /* Offset from the top */
  left: 10px; /* Offset from the left */
  width: 30px; /* Fixed size for the button */
  height: 30px; /* Fixed size for the button */
  background: #323232;
  color: #f5f5f5;
  border: none;
  border-radius: 50%; /* Circular button */
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 30px; /* Center text vertically */
  text-align: center; /* Center text horizontally */
  cursor: pointer;
}

.close-card-btn:hover {
  background-color: #777;
}

.card-link {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  text-decoration: none;
}

.custom-arrow {
  width: 35px; /* Adjust the size of the icon */
  height: 35px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.card-link:hover .custom-arrow {
  opacity: 0.7; /* Change opacity on hover */
}

/* #endregion */