body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: 'Source Sans 3', Arial, Helvetica, sans-serif;
  background: radial-gradient(
    ellipse at center,
    #e6e0e2 0%,
    #DCD5D7 55%,
    #DCD5D7 100%
  );
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/*diamond shape title*/

#titleBanner {
  position: fixed;
  top: 0;
  left: 0;

  width: clamp(320px, 36vw, 400px);
  height: clamp(170px, 20vw, 210px);

  background: #0A8276 100%;

  clip-path: polygon(
    0 0,
    100% 0,
    84% 78%,
    0 100%
  );

  z-index: 10;
  box-sizing: border-box;
  padding: clamp(24px, 3vw, 45px)
           clamp(24px, 3vw, 42px);

  transition: opacity 0.5s ease, transform 0.5s ease;
}

#titleBanner h1 {
  margin: 0;
  color: #FFFFFF;
  font-family: 'Source Sans 3', Arial, sans-serif;
  font-size: clamp(20px, 2.2vw, 32px);
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 768px) {
  #titleBanner {
    background-color: #0A8276;
    width: 80vw;
    height: 120px;
    padding: 24px 20px;

    clip-path: polygon(
      0 0,
      100% 0,
      84% 78%,
      0 100%
    );
  }

  #titleBanner h1 {
    font-size: 20px;
    line-height: 1.25;
  }
}

/*Side buttons*/

#sideControls {
  position: fixed;
  top: 50%;
  right: 32px;
  transform: translateY(-50%);

  display: flex;
  flex-direction: column;
  gap: 12px;

  z-index: 20;
}

#sideControls button {
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 0;
  background-color: #FFFFFF;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);

  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#sideControls button img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

#sideControls button:hover {
  transform: scale(1.05);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.2);
}

#sideControls button:focus-visible {
  outline: 2px solid #0A8276;
  outline-offset: 3px;
}

/*Side buttons mobile*/

@media (max-width: 768px) {
  #sideControls {
    right: 16px;
    gap: 10px;
  }

  #sideControls button {
    width: 40px;
    height: 40px;
  }

  #sideControls button img {
    width: 24px;
    height: 24px;
  }
}



/* ============ 3D MODEL LABELS ============ */
#labelsContainer {
  position: fixed;
  inset: 0;
  pointer-events: none;   /* don't block OrbitControls */
  z-index: 5;             /* keep BELOW your cards/buttons/modal — adjust if needed */
}

.model-label {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.model-label.is-hidden {
  opacity: 0;
}

.model-label-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00a98f;          /* teal, matching your design */
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  flex: none;
}

.model-label-text {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* hide all labels at once (used when modal is open) */
#labelsContainer.labels-hidden .model-label {
  opacity: 0;
}






/*Bottom cards*/

#bottomCards {
  position: fixed;
  bottom: 32px;
  left: 100px;
  right: 100px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 20px;
  z-index: 15;
}

.componentCard {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 16px;

  width: 500px;      
  max-width: 100%;    
  box-sizing: border-box;
  
  background-color: #FFFFFF;
  border-radius: 1px;
  border: 2px solid #0A8276;
  overflow: hidden;
  cursor: pointer;
}

/* HOVER STATE */
.componentCard:hover {
  background-color: #EEEDED;
  color: #FFFFFF;
}

/* Selected card */
.componentCard.selected {
  background-color: #075E55;
  border-color: #075E55;
}

.componentCard.selected .componentCardTitle,
.componentCard.selected .componentCardSubtitle {
  color: #FFFFFF;
}

.componentCard.selected svg {
  background: #ffffff;
}



.componentCardImage {
  width: 70px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
}

.componentCardContent {
  display: flex;
  flex-direction: column;

  flex: 1 1 0;
  min-width: 0;

}

.componentCardTitle {
  /*
   flex: 1 1 0;
  min-width: 0;
  */
  color: #0A8276;
  font-family: 'Source Sans 3', Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;

  white-space: normal;
  overflow-wrap: anywhere;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  overflow: hidden;
}

.componentCardSubtitle {
  font-size: 16px;
  color: #111;
}

.componentCardArrow {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 24px;
}

/*Modais*/

.infoModal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 24px;
  box-sizing: border-box;
  padding-right: clamp(32px, 7vw, 120px);

  /* Overlay invisível, mas continua a bloquear interações */
  background: rgba(0, 0, 0, 0);

  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.infoModal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.infoModalContent {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 48px 36px 36px;
  box-sizing: border-box;
  background-color: #FFFFFF;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  z-index: 1;
}

.infoModalContent h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  color: #0A8276;
}

.infoModalContent p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
}


.infoModalClose::before {
  content: '\00D7';   /* the × character */
  font-size: 30px;
  line-height: 1;
}


.infoModalClose {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: #333333;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.infoModalClose:hover {
  color: #0A8276;
}

.modalVideoControls {
  margin-top: 24px;
}

.modalVideoControls[hidden] {
  display: none;
}

#modalPlayPauseBtn {
  padding: 10px 16px;
  border: 1px solid #0A8276;
  background: #0A8276;
  color: #FFFFFF;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#modalPlayPauseBtn:hover {
  background: #07685e;
}

#modalPlayPauseBtn:focus-visible {
  outline: 2px solid #0A8276;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .infoModal {
    justify-content: center;
    padding: 16px;
  }

  .infoModalContent {
    max-width: 360px;
  }
}
