:root {
  /* Highlights */
  --highlight-bg: rgb(231 197 11 / 64%);
  --highlight-bg-light: rgb(231 197 11 / 54%);
  --highlight-hover: #c2c212;
  
  /* Text Colors */
  --text-primary: #000;
  --text-secondary: #333;
  --text-tertiary: #555;
  --text-dark: #111;
  --text-darker: #222;
  --text-hover: rgb(52, 52, 52);
  
  /* Background Colors */
  --bg-white: #fff;
  --bg-panel: rgba(200, 200, 200, 0.9);
  --bg-panel-hover: rgba(160, 160, 160, 0.9);
  --bg-overlay: rgba(255, 255, 255, 0.9);
  --bg-light-gray: #f8f9fa;
  
  /* Borders */
  --border-light: #b7b7b7;
  --border-medium: #b2b2b2;
  --border-dark: #4f4f4f;
  
  /* Font */
  --font-base: "arial", sans-serif;
}

/* ==================== BASE ==================== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  color: var(--text-primary);
  background: var(--bg-white);
  overflow: auto;
  font-family: var(--font-base);
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5 {
  margin: 0;
  line-height: 1.1;
  font-family: var(--font-base);
}

h1 {
  font-size: clamp(1.5em, 2.5vw, 5em);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.2em, 1.2vw, 3em);
  font-weight: 700;
  color: var(--text-dark);
}

h3 {
  font-size: clamp(1.1em, 1.1vw, 2.5em);
  font-weight: 600;
}

h5 {
  font-size: clamp(1.2em, 1.3vw, 3em);
  font-weight: 600;
  color: var(--text-darker);
}

p {
  font-size: clamp(0.9em, 1vw, 2.8em);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.3;
  font-family: var(--font-base);
}

a, a:visited, a:active {
  color: var(--text-primary);
  text-decoration: none;
}

a:hover {
}

/* ==================== LAYOUT ==================== */
.portfolio-wrapper {
  margin: 20px auto;
  width: 60%;
  display: flex;
  flex-direction: column;
  max-width: 3000px;
  min-width: 300px;
}

/* ==================== HEADER ==================== */
.header-container {
  display: flex;
  align-items: flex-end;
  width: 100%;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.header-title {
  font-weight: 700;
  font-size: clamp(1.2em, 2.4vw, 5em);
  white-space: nowrap;
  display: flex;
  align-items: flex-end;
  background: var(--bg-panel);
}

.header-title a {
  display: inline-flex;
  align-items: flex-end;
  padding: 3px 10px;
}

.header-title a:hover {
  background: var(--highlight-bg);
}

/* Match active styling for header title link */
.header-title a.active-link {
  background: var(--highlight-bg);
  color: var(--text-hover);
}

.header-title a.active-link:hover {
  background: var(--highlight-bg) !important;
  color: var(--text-hover);
}

.header-links {
  display: flex;
  font-size: clamp(1em, 1.2vw, 2em);
  gap: 10px;
  align-items: flex-end;
}

.header-links a {
  padding: 3px 8px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  line-height: 1;
  background: var(--bg-panel);
}

.header-links a:hover {
  color: var(--text-hover);
  background: var(--highlight-bg) !important;
}

.header-links a.active-link {
  background: var(--highlight-bg);
}

.header-links a.active-link:hover {
  background: var(--highlight-bg) !important;
}

/* ==================== DROPDOWN STYLES ==================== */
.dropdown-item {
  position: relative;
  display: flex;
  align-items: flex-end;
  line-height: 1;
  background: var(--bg-panel);
}

.dropdown-item > a {
  padding: 3px 8px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  line-height: 1;
  text-decoration: none;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-panel);
  min-width: 150px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  white-space: nowrap;
}

.dropdown-content a {
  color: var(--text-primary);
  padding: 3px 8px;
  background: var(--bg-panel);
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background: var(--highlight-bg) !important;
}

.dropdown-item:hover .dropdown-content {
  display: block;
}

.dropdown-item:hover > a {
  background: var(--bg-panel);
  color: inherit;
}

/* Legacy dropdown support */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown .dropdown-content {
  font-size: clamp(0.85em, 1vw, 2em);
  background-color: var(--bg-white);
  border: 1px solid lightgrey;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  z-index: 1000;
}

.dropdown .dropdown-content a {
  padding: 4px 8px;
  color: rgb(27, 27, 27);
  transition: background 0.2s ease;
  line-height: 1.2;
}

.dropdown .dropdown-content a:hover {
  background: var(--highlight-bg);
  color: var(--text-hover);
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ==================== SLIDESHOW ==================== */
.slideshow-container {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 400px;
  overflow: hidden;
  margin-bottom: 0;
  border: 1px solid var(--border-medium);
}

.slideshow-slide {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
}

.slideshow-slide.active {
  display: block;
}

.slideshow-content {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.slideshow-content > div,
.slideshow-content > .img-slider-container {
  width: 100% !important;
  height: 100% !important;
}

.slideshow-info {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5000;
  max-width: 280px;
}

.slideshow-navigation-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 15px auto 2vw auto;
  width: 100%;
  z-index: 100;
}

.slideshow-arrow {
  position: static;
  transform: none;
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 2em;
  padding: 10px 15px;
  cursor: pointer;
  border: none;
  user-select: none;
  transition: background 0.3s;
}

.slideshow-arrow:hover {
  background: var(--bg-panel-hover);
}

.slideshow-indicators {
  position: static;
  transform: none;
  display: flex;
  gap: 12px;
  background: var(--bg-overlay);
  padding: 8px 10px;
  border-radius: 20px;
}

.slideshow-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.slideshow-dot:hover {
  background: #999;
}

.slideshow-dot.active {
  background: #333;
}

/* ==================== PORTFOLIO ROWS ==================== */
.portfolio-row-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.portfolio-top-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-transform: uppercase;
  font-size: clamp(1.2em, 1.4vw, 3em);
  color: var(--text-dark);
  font-weight: 700;
  background: var(--highlight-bg);
  gap: 0.5em;
  padding: 2px 0px;
}

.portfolio-top-row a {
  display: inline-flex;
  justify-content: center;
  gap: 0.25em;
}

.portfolio-top-row span {
  display: inline-block;
}

.portfolio-sub-row,
.home-sub-row {
  align-items: center;
  width: 100%;
  color: var(--text-primary);
  font-size: clamp(1.15em, 1.44vw, 3em);
  margin: 0px 0 10px 0;
}

.home-sub-row {
  display: flex;
  justify-content: space-between;
}

.portfolio-sub-row {
  font-weight: 400;
}

.portfolio-sub-row a,
.home-sub-row a {
  display: inline-block;
}

.home-sub-row a {
  font-size: clamp(1.15em, 2vw, 3em);
}

.portfolio-sub-row a:hover {
  color: var(--text-hover);
}

.home-sub-row a:hover {
  color: var(--text-hover);
  background: var(--highlight-bg);
}

.portfolio-sub-row .divider-symbol,
.home-sub-row .divider-symbol {
  display: none;
}

a.subrow-toggle {
  color: var(--text-primary);
  cursor: pointer;
}

a.subrow-toggle:hover,
a.subrow-toggle:focus {
  outline: none;
  background: var(--highlight-bg);
}

.subrow-dropdown {
  display: none;
  color: var(--text-primary);
  position: relative;
  margin-top: 5px;
}

.subrow-close {
  color: #900;
  font-weight: bold;
  cursor: pointer;
}

.portfolio-row {
  display: flex;
  height: 25vw;
  margin-bottom: 20px;
  max-height: 350px;
  min-height: 150px;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-medium);
  box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.45);
  justify-content: space-between;
}

/* ==================== PORTFOLIO LEFT COLUMN ==================== */
.portfolio-left {
  flex: 1.6;
  display: flex;
  min-width: 150px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  overflow-y: auto;
}

.portfolio-left h2 {
  margin: 0 0 2px 0;
  text-align: left;
}

.portfolio-left p {
  padding: 0;
  text-align: left;
  width: 95%;
}

.portfolio-left:hover h2 a,
.portfolio-left:hover p a {
  background: var(--highlight-bg);
  color: var(--text-primary);
  transition: background-color 0.3s ease;
}

.portfolio-left h2 a,
.portfolio-left p a {
  display: inline;
}

/* ==================== PORTFOLIO RIGHT COLUMN ==================== */
.portfolio-right {
  flex: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  border: 1px solid var(--border-light);
  height: 100%;
}

#model-thumbnail-container,
#jb-model-thumbnail-container,
#nys-model-thumbnail-container {
  width: 100%;
  height: 100%;
  display: block;
}

.portfolio-right a {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

.portfolio-right a img,
.portfolio-right a video {
  object-fit: cover;
  display: block;
  width: 100%;
  height: 100%;
}

/* ==================== GALLERY ==================== */
.portfolio-right.gallery {
  flex-direction: row;
  gap: 8px;
}

.portfolio-right.gallery a {
  flex: 1 1 50%;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  background: var(--bg-white);
}

.portfolio-right.gallery a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
}

/* ==================== MODELS PAGE - FULL WIDTH LAYOUT ==================== */
.portfolio-row-fullwidth {
  position: relative;
  width: 100%;
  height: 25vh;
  min-height: 300px;
  margin-bottom: 20px;
  border: 1px solid var(--border-medium);
  overflow: hidden;
}

.portfolio-left-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 50;
  max-width: 280px;
  background: var(--bg-overlay);
  padding: 10px;
  border-radius: 2px;
}

.portfolio-left-overlay h2 {
  margin: 0 0 4px 0;
}

.portfolio-right-fullwidth {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.portfolio-right-fullwidth > div {
  width: 100% !important;
  height: 100% !important;
}

/* ==================== PLAINTEXT ROWS ==================== */
.plaintext-row {
  margin-top: 20px;
  overflow: auto;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.plaintext-left {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.plaintext-left-content {
  z-index: 2;
  width: 100%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.plaintext-left-content h2 {
  font-size: clamp(1.2em, 1.28vw, 3em);
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 5px;
  line-height: 1;
  background: var(--highlight-bg-light);
  padding: 2px 4px;
}

.plaintext-left-content p {
  font-size: clamp(0.85em, 1vw, 2em);
  color: var(--text-secondary);
}

/* ==================== INFO PANEL ==================== */
.info-panel-link,
.info-panel-link:hover,
.info-panel-link:focus,
.info-panel-link:active {
  text-decoration: none;
  color: inherit;
}

.info-panel-link {
  display: block;
}

.info-panel-link:hover .info-panel {
  background: var(--highlight-bg);
}

.info-panel {
  background: var(--bg-panel);
  padding: 9px 12px;
  white-space: normal;
  max-width: 1000px;
  overflow-wrap: break-word;
  word-break: break-word;
  transition: background 0.05s ease;
}

.info-panel h2 {
  margin: 0 0 4px 0;
}

  .info-panel a {
  }


 .info-panel h2:hover {

  }

.info-panel h5 {
  text-transform: uppercase;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1400px) {
  .portfolio-wrapper {
    width: 90%;
    max-width: 100%;
    margin: 20px auto;
    padding: 0 8px;
  }

  .portfolio-top-row {
    gap: 0.3em;
  }
}

@media (max-width: 430px) {
  .portfolio-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 10px 0px;
    padding: 0 8px;
    box-sizing: border-box;
  }

  .portfolio-row-wrapper {
    margin: 0px 0 5px 0;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
  }

  .header-title {
    font-size: 20px;
    background: var(--highlight-bg);
  }

  .header-title a {
    padding: 0px;
    display: inline-block;
    line-height: 1;
    background: none;
  }

  .header-title a:hover {
    background: var(--highlight-bg);
  }

  .header-links {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    padding: 0px;
  }

  .header-links a {
    padding: 0px;
    display: inline-block;
    line-height: 1;
    background: none;
    margin: 8px 0px;
  }

  .header-links a:hover {
    background: var(--highlight-bg);
  }

  .portfolio-top-row {
    font-size: clamp(0.875em, 1.125em, 1.125em);
    box-sizing: border-box;
    padding: 0 2px;
    display: none;
  }

  .portfolio-row {
    flex-direction: column;
    height: auto !important;
    gap: 15px !important;
    margin-top: 10px;
    padding: 10px;
    overflow: hidden;
    display: flex;
    box-sizing: border-box;
  }

  .portfolio-left {
    order: 1;
    height: auto !important;
    min-height: fit-content !important;
    flex: 1 1 auto !important;
    min-width: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  .info-panel {
    width: 100%;
    height: auto !important;
    min-height: fit-content !important;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
  }

  .portfolio-right {
    order: 2;
    height: 300px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    flex: 1 1 auto !important;
    box-sizing: border-box;
    overflow: hidden;
    margin: 0 !important;
  }

  .portfolio-right img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
  }

  #model-thumbnail-container,
  #leaflet-map,
  .img-slider-container {
    height: 100% !important;
    width: 100% !important;
    max-height: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    position: relative;
    min-height: 0 !important;
  }

  #model-thumbnail-container canvas,
  .portfolio-right canvas {
    max-width: 100% !important;
    max-height: 100% !important;
  }

  .img-slider-container.real-images {
    position: relative;
    overflow: hidden;
  }

  .overlay-image-wrapper {
    max-width: 100%;
    max-height: 100%;
  }

  .home-sub-row {
    margin: 5px 0px;
    display: none;
  }

  .portfolio-sub-row {
    font-size: clamp(0.75em, 0.875em, 0.875em);
  }

  .threedmodel-left h2 {
    font-size: 16px;
  }

  .threedmodel-left p {
    font-size: 13px;
  }

  .threedmodelbutton {
    width: 28px;
    height: 28px;
    font-size: 12px;
    margin-right: 3px;
    margin-bottom: 3px;
  }

  #jblegend-container {
    max-width: 140px;
    min-width: 120px;
    font-size: 11px;
  }

  #jblegend-container h3 {
    font-size: 13px;
  }

  .jbcolor-box {
    width: 16px;
    height: 12px;
  }

  .jblabel {
    font-size: 12px;
  }

  #nysmodelcontrols-container {
    align-items: flex-start;
  }

  .layer-button {
    padding: 8px;
    font-size: 12px;
  }

  .sliderimageportfolio-row {
    flex-direction: column;
  }

  .sliderimageportfolio-left {
    order: 1;
  }

  .sliderimageportfolio-left h2 {
    font-size: 18px;
  }

  .sliderimageportfolio-left p,
  .sliderimageportfolio-left li {
    font-size: 13px;
  }

  .sliderimageportfolio-right {
    order: 2;
    height: 45vh;
    min-height: 250px;
    max-height: 400px;
  }

  .slider-handle {
    width: 6px;
  }

  .slider-handle .knob {
    width: 20px;
    height: 20px;
  }

  .slider-instruction {
    top: 30%;
  }

  .slider-instruction p {
    font-size: 13px;
    padding: 3px 6px;
  }

  .plaintext-row {
    flex-direction: column;
  }

  .plaintext-left-content h2 {
    font-size: 18px;
    background: none;
    align-content: normal;
    padding: 0px;
  }

  .plaintext-left-content p {
    font-size: 13px;
  }

  .dropdown-content {
    min-width: 0px;
    font-size: 12px;
  }

  .dropdown-content a {
    display: inline;
    padding: 0px;
  }

  .subrow-toggle {
    font-size: 13px;
  }

  .subrow-dropdown {
    font-size: 13px;
  }

  #worldloading-progress,
  #jbmodelloading-progress,
  #nysmodelloading-progress {
    width: 180px;
    height: 8px;
  }

  #worldloading-message,
  #jbmodelloading-message,
  #nysmodelloading-message,
  #nysmodelloading-details {
    font-size: 11px;
  }

  .model-description {
    font-size: 12px;
  }

  .model-instruction-text {
    font-size: 1em;
    padding: 3px 6px;
  }

  .controls-row {
    gap: 3px;
  }

  .controls-group {
    gap: 8px;
  }
}