:root {
  --primary-color: #1a2a41;
  --secondary-color: #35424a;
  --less-light-color: #566975;
  --light-color: #868d9c;
  /* Maximum width for the homepage carousel (customize as desired) */
  --carousel-max-width: 1200px;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f7f7f7;
  color: #333;
}
a {
  color: var(--primary-color);
  text-decoration: none;
}
a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}


h1, h2, h3 {
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: normal;
  text-align: center;
  color: var(--primary-color);
  margin-top: 1em;
}

h1 {
  font-size: 3em;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.6em;
}

h3 {
  font-size: 1.3em;
}

.content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

header {
  background: rgba(26, 42, 65, 0.6);
  color: #fff;
  padding: 1em 0;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  position: relative;
  z-index: 10;
}

header h1,
header h2,
header h3 {
  color: #fff;
}

.tagline {
  font-style: italic;
  margin: 0.3em 0 1.2em;
}

.navbar .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 0.5em;
}

.navbar .menu li {
  display: inline-block;
  position: relative;
}

.navbar a {
  color: #fff;
  padding: 0.5em 1em;
  text-decoration: none;
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.navbar li:hover {
  background: rgba(255, 255, 255, 0.1);
}

.navbar a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border-radius: 4px;
  z-index: 1;
}

.dropdown-content a {
  color: var(--primary-color);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: rgba(0,0,0,0.05);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.carousel {
  width: 100%;
  max-width: var(--carousel-max-width, 100%);
  height: min(400px, 50vh);
  margin: 2em auto;
  position: relative;
  overflow: hidden;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border-radius: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  animation: zoom 16s ease-in-out infinite;
}

.carousel-image.active {
  display: block;
  opacity: 1;
}

@keyframes zoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.about {
  max-width: 800px;
  margin: 1em auto 2em;
  text-align: center;
  line-height: 1.6;
}

/* Dropdown category headings */
.dropdown-section {
  padding: 8px 16px;
  font-weight: bold;
  color: var(--primary-color);
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(230,230,230,0.9));
  border-bottom: 1px solid rgba(0,0,0,0.1);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,0.2);
}

/* Tool list section */
.tools-list {
  max-width: 800px;
  margin: 2em auto;
  line-height: 1.5;
}

.tool-category {
  margin-bottom: 1.2em;
}

.tool-category h3 {
  margin-bottom: 0.3em;
  color: #fff;
  background: linear-gradient(to bottom, #6c7a89, #4a5663);
  padding: 0.3em 0.5em;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
}

.tool-category ul {
  list-style: disc;
  padding-left: 20px;
  text-align: left;
}

.tool-category li {
  margin-bottom: 0.4em;
}

button {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.5em 1em;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: var(--secondary-color);
}

fieldset {
  margin-bottom: 1em;
  padding: 1em;
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 4px;
}

label {
  display: block;
  margin-bottom: 0.5em;
}

pre {
  background: #f5f5f5;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
}

.log-output {
  background: #f5f5f5;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  font-family: "Courier New", monospace;
  white-space: pre-wrap;
}

/* Ensure MathJax equations adapt on small screens */
.MathJax_Display {
  overflow-x: auto;
  white-space: normal !important;
}

/* Generic top banner for tool pages */
.top-banner {
  width: 100%;
  height: var(--banner-height, 100px);
  overflow: hidden;
  margin-bottom: 1em;
}

.top-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Homepage banner */
.banner {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin: 1em 0;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Homepage background and content panel */
body.homepage {
  background: url('img_website/TOC_PCSB.jpg') no-repeat center/cover fixed;
}

.homepage .content-panel {
  background: rgba(255, 255, 255, 0.85);
  margin: 0;
  padding: 1.5em 2em;
  border-radius: 0;
  box-shadow: none;
}

/* Collapsible info panel */
details.info-panel {
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.5em 1em;
  margin-bottom: 1em;
}

details.info-panel summary {
  font-weight: bold;
  cursor: pointer;
  color: var(--primary-color);
}

