:root {
  --font-family: "DM Sans", sans-serif;
  --font-family-menu:"Consolas", "Lucida Console", "Courier New", monospace;
  --font-family-quotes: 'Droid Serif', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-family-headers: "Consolas", "Lucida Console", "Courier New", monospace;
  --base-font-size: 16px;
  --line-height: 27px;
  --primary-color: #000;
  --secondary-color: #444;
  --bg-color: #fff;
  --border-color: #b5b5b5;
  --hover-color: #b4b4b4;
  --sidebar-bg: #fff;
  --menu-width: 250px;
  --max-container-width: 1050px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Reset and Base Styles */
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: var(--base-font-size);
  line-height: var(--line-height);
  color: var(--primary-color);
  background-color: var(--bg-color);
}

h1, h2, h3, h4 {
  font-family: var(--font-family-headers);

  }
/* Heading and Paragraph Styles */
h1 {
  font-size: 32px;
  font-family: var(--font-family-headers);
  line-height: 36px; 
  margin-bottom: 0.2em; 
  margin-top: 0px; 
}
h2 { 
  font-size: 24px; 
  padding-top: 20px;
  line-height: 36px; 
}
h3, h4 { 
  font-size: 18px;
  line-height: 28px; 
}

h3 {
  margin-bottom: 0px; 
  margin-top: 25px;
}

h4 {
  color: #5b5b5b;
  font-weight: 300;
  margin-left: 1px;
  line-height: 24px;
  font-family: var(--font-family-menu);
  font-size: 1.1rem;
  margin-top: 5px;
  margin-bottom: 20px;
}

p { 
  /* font-size: 1rem;  */
  margin-bottom: 1em; 
  text-wrap: pretty;
  font-weight: 400;
  color: #303538;
}



/* Layout Container */
.container {
  display: flex;
  min-height: 100vh;
  max-width: var(--max-container-width);
  overflow-x: hidden;
  position: relative;
}


.top-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}

/* Logo Styles */
.logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
}
.logo-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-color);
  cursor: pointer;
  padding-bottom: 20px;
  z-index: 1000;
}
.logo-image {
  width: 100px;
  height: auto;
  margin-right: 10px;
}

/* Navigation Controls */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
}


/* Sidebar and Menu */
.sidebar {
  position: absolute;
  left: 0;
  height: 100vh;
  padding-top: 30px;
  padding-left: 20px;
  padding-right: 20px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  font-family: var(--font-family-menu);
  margin-right: 1px;
}

.menu-item > span {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

/* Sub-menu Styles */
.sub-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-left: 10px;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
.sub-menu.active {
  max-height: 500px;
  opacity: 1;
}
.sidebar .sub-item {
  margin: 10px 0;
  cursor: pointer;
  font-size: 0.9em;
  color: #3f3f3f!important;
  transition: color 0.3s ease;
}

.sidebar .sub-item a {
  color: #3f3f3f!important;
  text-decoration: none;
}

.menu-item > span:hover,
.sub-item:hover {
  color: var(--hover-color);
}

/* Main Content */
.main-content {
  display: flex;
  margin-left: var(--menu-width);
  flex: 1;

}
.menu-and-content-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.content {
  flex: 1;
  padding-left: 30px;
  padding-right: 20px;
  max-width: 1000px;
  width: 100%;
}

#content-container {
  transition: opacity 0.3s ease;
}

/* References */
.references {
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
}
.reference {
  font-size: 14px;
  margin-bottom: 5px;
}

/* Footnotes and Tooltips */
.tooltip-container {
  position: relative;
  display: inline-block;
  padding: 1px;
  padding-top: 0px;
}
.footnote-tooltip {
  position: absolute;
  background: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  max-width: 300px;
  z-index: 1000;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  flex-wrap: wrap;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-all;
  gap: 0.3em;
}
.footnote-tooltip::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.footnote-tooltip a {
  color: #8cf;
  text-decoration: none;
  position: relative;
  z-index: 1001;
}

.footnote-tooltip a:visited {
  color: #8cf;
}

.footnote-tooltip a:hover {
  text-decoration: underline;
  cursor: pointer;
}
.tooltip-container::after {
  content: '';
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: -10px;
  height: 10px;
}
.footnote, .footnotes .footnote {
  margin: 0.5em 0;
  display: flex;
  align-items: flex-start;
  gap: 0.3em;
}
.footnote sup {
  flex-shrink: 0;
  margin-top: 0.1em;
}
.footnote-ref {
  font-size: 0.6rem;
}

.footnote p,
.footnote-tooltip p {
  margin: 0;
  display: inline;
  font-size: 14px;
  color: white;
}
.footnote-backref {
  margin-left: 0.3em;
  text-decoration: none;
}
.footnote-tooltip sup {
  flex-shrink: 0;
  margin-top: 0.2em;
}

.footnote p {
  color:#303538
}

/* Table Styles */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
  font-size: 14px;
  overflow-wrap: break-word;

}
th, td {
  text-align: left;
  vertical-align: middle;
  padding: 8px;
  border: 1px solid #e0e0e0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
th {
  background-color: #f5f5f5;
  font-weight: bold;
  border-bottom: 2px solid #d0d0d0;
}
tr:nth-child(even) {
  background-color: #fafafa;
}
tr:hover {
  background-color: #f0f0f0;
}

.products-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Media and Image Styles */
img {
  max-width: 100%;
  height: auto;
  min-width: 30px;
}
pre {
  max-width: 100%;
  overflow-x: auto;
}

li {
  margin-bottom: 10px;
}

.img_half {
  max-width: 70%;
}

.td-prod-img {
  max-height: 130px;
  text-align: center;
  vertical-align: middle;
}

td.image-cell {
  text-align: center; 
  vertical-align: middle;
}

/* Desktop-Specific Styles */
@media (min-width: 769px) {
  .container {
    max-width: var(--max-container-width);
    margin: 0 auto;
  }
  .top-controls {
    position: static;
    justify-content: flex-end;

  }

  .menu-item {
    margin-top: 10px;
  }

  .main-content {
    margin-top: 30px;
    border-left: 1px solid #e0e0e0;
  }

  h1 {
    margin-top: 0;
  }

  .sidebar {
    position: absolute;
    left: 0;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  h1 {
    margin-top: 15px;
  }
  .container {
    flex-direction: column;
  }
  .logo-container {
    background: none;
    padding-bottom: 0px;
  }
  .logo-image {
    width: 50px;

  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fffffffa;
    padding: 10px 20px;
    height: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: height 0.5s ease;
  }
  .hamburger {
    display: block;
    position: fixed;
    margin-top: 10px;
    right: 20px;
    z-index: 1002;
  }
  .menu {
    display: block;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
  }
  .menu.active {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding-top: 70px;
    transition: padding-top 0.5s ease;
  }

  #dynamic-menu {
    padding-top: 20px;
  }

  .content {
    position: relative;
    transition: padding-top 0.5s ease;
    padding-right: 20px;
    padding-left: 20px;
  }
  #content {
    padding-top: calc(100vh - 20px);
  }
  .top-controls {
    position: fixed;
    top: 10px;
    right: 40px;
    margin-top: 10px;
  }
  .language-select {
    margin-right: 30px;
    font-size: 12px;
  }
  table {
    font-size: 12px;
  }
  
  th, td {
    padding: 6px 4px;
  }
  
  .content {
    overflow-x: auto;
  }
  
  .footnote-tooltip {
    left: 0 !important; /* Override inline positioning */
    right: 0;
    max-width: 90vw;
    width: auto;
    margin-left: auto;
    margin-right: auto;
  }

  .img_half {
    max-width: 100%;
  }
}

/* Blockquote Styles */
blockquote {
  margin: 1em 0;
  padding: 1em 1em;
  background-color: #acffca1f;
  border-radius: 2px;
  position: relative;
  /* line-height: 1.6; Typewriter fonts often need slightly more line height */
}
blockquote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: rgb(21, 139, 54);
  border-radius: 4px;
}
blockquote p {
  margin: 0;
  font-style: italic;
  font-family: var(--font-family-quotes);
  font-size: 1rem;

  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;

}
blockquote p:not(:last-child) {
  margin-bottom: 1em;
}

/* Button and Select Styles */
.switch-language,
.language-select {
  color: rgb(88, 88, 88);   
  padding: 5px 10px;
  background-color: var(--bg-color);
  cursor: pointer;
}

/* Language selection styling using a wrapper pseudo-element for the icon */
.language-select-wrapper {
  position: relative;
  display: inline-block;
  padding-top: 10px;
}

/* Style the select element */
.language-select {
  color: rgb(88, 88, 88);
  padding-left: 30px; /* space reserved for the icon */
  padding-right: 10px;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Use the wrapper's pseudo-element to display the icon */
.language-select-wrapper::before {
  content: "";
  position: absolute;
  top: 60%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-color: currentColor; /* takes on the parent's (text) color */
  -webkit-mask: url('language.svg') no-repeat center;
  mask: url('language.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: color 0.3s ease;
}

/* On hover, change both text and icon color */
.language-select-wrapper:hover,
.language-select:hover {
  color: var(--hover-color); /* your preferred hover color */
}

/* Remove focus outline from the select */
.language-select:focus {
  outline: none;
  box-shadow: none;
}


/* Remove underlines from all links without modifying visited colors */
a,
a:visited {
  text-decoration: none;
  color: rgb(21, 67, 183);
}
a:hover {
  color: rgba(51, 102, 204, 0.555);
  transition: color 0.3s ease;
}



/* Collapsible Footnotes Styles */
details.footnotes {
  border-top: 1px solid #b5b5b5;
  padding-top: 10px;
  margin-top: 40px;
}

details.footnotes summary {
  cursor: pointer;
  font-weight: bold;
  outline: none;
  margin-bottom: 10px;
}

/* Additional styles for formatting individual options in language-select */
.language-select option {
  border: none;
  outline: none;
  background-color: var(--bg-color);
  padding: 8px 10px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.language-select option:hover {
  background-color: var(--hover-color);
  color: var(--primary-color); 
}

.header-section {
  margin-bottom: 1em;
}

.header-section h1,
.header-section h2 {
  transition: background-color 0.3s ease;
}

.header-section h1:hover,
.header-section h2:hover {
  background-color: var(--hover-color);
}

/* Optionally add a transition for showing/hiding content */
.collapsible-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* --- Accordion Styles Start --- */

/* Basic styling for the accordion container */
.accordion {
    border-top: 1px solid #ddd; /* Optional: Add a border around the accordion */
    border-bottom: none; /* Remove bottom border for cleaner look with item borders */
    width: 100%; /* Adjust width as needed */

}

/* Styling for each collapsible item */
.accordion-item {
    border-bottom: 1px solid #ddd; /* Border between items */
}

/* Styling for the clickable header */
.accordion-header {
    background-color: transparent; /* No grey background */
    color: rgb(21, 67, 183);
    cursor: pointer; /* Indicate clickable */
    padding: 12px 15px; /* Padding inside the header */
    padding-left: 0px;
    margin: 0px;
    width: 100%; /* Make button take full width */
    border: none; /* Remove default button border */
    text-align: left; /* Align text to the left */
    outline: none; /* Remove outline on focus */
    transition: background-color 0.3s ease; /* Smooth transition on hover */
    font-family: var(--font-family-headers);
    font-size: 20px;
    display: flex; /* Use flexbox to align arrow and text */
    align-items: center; /* Vertically align items */
}

/* Hover effect for the header */
.accordion-header:hover {
    background-color: #f1f1f1; /* Slight grey background on hover for feedback */
}

/* Styling for the arrow indicator */
.accordion-header .arrow {
    margin-right: 10px; /* Space between arrow and text */
    transition: transform 0.3s ease; /* Smooth rotation transition for arrow */
    display: inline-block; /* Allow transform */
    font-weight: bold; /* Make arrow bold */
}

/* Rotate the arrow when the header is active (clicked) */
.accordion-header.active .arrow {
    transform: rotate(90deg);
}

/* Styling for the hidden content area */
.accordion-content {
    background-color: #fff; /* White background for content */
    overflow: hidden; /* Hide overflow when collapsed */
    max-height: 0; /* Start hidden with max-height 0 */
    transition: max-height 0.3s ease-out, padding 0.3s ease-out; /* Smooth transition for collapsing/expanding */
}


/* Style for the paragraph inside the content */
.accordion-content p {
    margin: 0; /* Remove default paragraph margin */
    padding-bottom: 10px; /* Add some space at the bottom of the content */
}

/* --- Accordion Styles End --- */

.selection-criteria {
  color: rgb(21, 67, 183);
  font-weight: 600;
}

.hidden {
    opacity: 0;
    visibility: hidden;
}
.visible {
    opacity: 1;
    visibility: visible;
}

