/* This file extends the main portfolio CSS */

.threedmodel-row {
  position: relative;
  width: 100%;
  max-width: 1500px;
  height: 70vh;
  min-width: 620px;
  margin: 0 auto;
  box-sizing: border-box;
}

.threedmodel-right {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #9f9f9f;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  box-sizing: border-box;
}

.threedmodel-right img,
.threedmodel-right video {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.threedmodel-left {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 21%;
  max-width: 230px;
  min-width: 180px;
  max-height: calc(100% - 20px);
  overflow-y: auto;
  z-index: 2;
  background: rgba(200, 200, 200, 0.9);
  padding: 8px;
  box-sizing: border-box;
}

.threedmodel-left h2 {
  margin: 0 0 4px 0;
}

.threedmodel-left h2 a:hover {
  background-color: var(--highlight-bg, rgba(231,197,11,0.64));
  text-decoration: none;
}

.threedmodel-left p {
  margin: 0 0 12px 0;
  line-height: 1.1;
}

.threedmodel-left p:last-child {
  margin-bottom: 0;
}

/* ==================== MODEL INFO SECTION CONTAINERS ==================== */

.model-info-section {
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 8px;
  margin-bottom: 5px;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.model-info-section:last-child {
  margin-bottom: 0;
}

.model-info-section h2 {
  padding: 0;
}

.model-info-section p {
  margin: 0 0 6px 0;
}

.model-info-section p:last-child {
  margin-bottom: 0;
}

/* ==================== NAVIGATION SECTION ==================== */

#worldcontrols-container,
#jbmodelcontrols-container,
#nysmodelcontrols-container,
#azcratercontrols-container {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  z-index: 10;
}

#worldcontrols-container h2,
#jbmodelcontrols-container h2,
#nysmodelcontrols-container h2,
#azcratercontrols-container h2 {
  padding: 0;
}

#nysmodelcontrols-container,
#azcratercontrols-container {
  align-items: flex-start;
}

/* ==================== MODELS SLIDESHOW CONTAINER ==================== */

.models-slideshow-container {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  margin: 0 auto 0 auto;
  overflow: hidden;
}

.models-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

.models-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==================== MODELS CONTENT (Full Width/Height) ==================== */

.models-content {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.models-content .portfolio-right-fullwidth {
  width: 100%;
  height: 100%;
  border: none;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
}

.models-content #worldmodel-container,
.models-content #model-thumbnail-container,
.models-content #jb-model-thumbnail-container,
.models-content #nys-model-thumbnail-container,
.models-content #azcrater-model-thumbnail-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* ==================== MODELS NAVIGATION WRAPPER ==================== */

.models-navigation-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 15px auto 2vw auto;
  width: 100%;
  z-index: 100;
}

.models-arrow {
  position: static;
  transform: none;
  background: rgba(200, 200, 200, 0.8);
  color: var(--text-primary);
  font-size: 2em;
  padding: 10px 15px;
  cursor: pointer;
  border: none;
  user-select: none;
  transition: background 0.3s;
}

.models-arrow:hover {
  background: rgba(160, 160, 160, 0.9);
}

.models-indicators {
  position: static;
  transform: none;
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
  border-radius: 20px;
}

.models-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.models-dot:hover {
  background: #999;
}

.models-dot.active {
  background: #333;
}

/* ==================== CONTROLS & BUTTONS ==================== */

.controls-group,
.controls-container-group {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  z-index: 10;
  padding: 0;
  width: 100%;
}

.controls-container-group {
  gap: 0px;
}

.controls-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: flex-start;
  margin-bottom: 0;
  pointer-events: auto;
  position: relative;
  box-sizing: border-box;
}

.controls-grid,
.controls-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
}

.control-section,
.control-buttons-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ==================== 3D MODEL BUTTONS ==================== */

.threedmodelbutton {
  width: 28px;
  height: 28px;
  color: #333;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 4px;
  margin-bottom: 4px;
  background: #d1d1d1;
  border-radius: 2px;
  border: 1px solid #d0d0d0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.threedmodelbutton:hover {
  background: var(--highlight-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.threedmodelbutton:active {
  transform: translateY(1px);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  background: #e8e8e8;
}

/* ==================== LAYER BUTTONS ==================== */

.layer-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0px;
  justify-content: flex-start;
}

.layer-button {
  width: 100%;
  padding: 5px 7px;
  margin: 2px 0 0 0;
  font-size: 13px;
  font-weight: bold;
  border-radius: 2px;
  background: #f8f8f8;
  border: 1px solid #d0d0d0;
  display: block;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.layer-button:hover {
  background: var(--highlight-bg);
  border-color: #b0b0b0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.layer-button:active {
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.layer-button.active {
  background: #005892;
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.layer-button.active:hover {
  background: var(--highlight-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ==================== LEGEND ==================== */
#jblegend-container {
  padding: 0px;
  font-size: 12px;
  max-width: 160px;
  min-width: 140px;
  position: relative;
  align-self: flex-start;
  margin: 0 0 8px 0;
}

#jblegend-container h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: bold;
  color: var(--text-secondary);
  text-align: left;
}

#jblegend {
  list-style: none;
  padding: 0;
  margin: 0;
}

#jblegend li {
  display: flex;
  align-items: center;
  margin-bottom: 3px;
  padding: 1px 0;
  justify-content: flex-start;
}

.jbcolor-box {
  width: 20px;
  height: 14px;
  margin-right: 6px;
  border: 1px solid #999;
  border-radius: 2px;
  flex-shrink: 0;
}

.jblabel {
  font-size: 13px;
  color: var(--text-darker);
  line-height: 1.2;
  text-align: left;
}

/* ==================== MODEL CONTAINERS ==================== */

#worldcanvas {
  width: 100%;
  height: 100%;
  display: block;
}

#worldmodel-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  min-width: 400px;
}

#jbmodel-container {
  width: 100%;
  height: 100%; 
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e0e0e0;
  overflow: hidden;
}

.nysmodel-container {
  width: 100%;
  height: 100%;
  min-width: 400px;
  min-height: 300px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

.nysmodel-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

#azcratermodel-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e0e0e0;
  overflow: hidden;
  box-sizing: border-box;
}

#azcratermodel-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ==================== LOADING OVERLAYS ==================== */

#worldloading-overlay,
#jbmodelloading-overlay,
#nysmodelloading-overlay,
#azcraterloading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

#worldloading-progress,
#jbmodelloading-progress,
#nysmodelloading-progress,
#azcraterloading-progress {
  width: 250px;
  height: 12px;
  background-color: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 15px;
  border: 1px solid #ddd;
}

#worldloading-bar,
#jbmodelloading-bar,
#nysmodelloading-bar,
#azcraterloading-bar {
  width: 0;
  height: 100%;
  background-color: #005892;
  transition: width 0.3s ease;
}

#worldloading-message,
#jbmodelloading-message,
#nysmodelloading-message,
#azcraterloading-message {
  font-size: 16px;
  font-family: var(--font-family);
  font-weight: normal;
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
}

#worldloading-details,
#jbmodelloading-details,
#nysmodelloading-details,
#azcraterloading-details {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  text-align: center;
}

/* ==================== MISC ==================== */

.model-description {
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
  display: block;
  line-height: 1.4;
}

.group-label {
  display: none;
}