/* =================================================================
   TEXTURE 3D MODAL
   Iframe-hosted 3D texture visualizer used on the Enceladus sample.
   Trigger card opens a modal containing a 3D textured-effects demo.
   ================================================================= */

/* =================================================================
   TRIGGER CARD
   ================================================================= */

.texture-card {
  float: left;
  clear: left;
  max-width: 280px;
  margin: 20px 25px 20px 0;
}

@media (max-width: 600px) {
  .texture-card {
    float: none;
    max-width: 100%;
    margin: 20px auto;
  }
}

.texture-card__trigger {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  font-family: inherit;
  text-align: left;
  background: #f0f2f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.texture-card__trigger:hover {
  background: #e8eaed;
  border-color: #ccc;
  box-shadow: 0 4px 12px rgb(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.texture-card__thumbnail {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #1a3a5c, #0a1929);
  aspect-ratio: 4 / 3;
}

.texture-card__thumbnail img {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease, filter 0.3s ease;
  object-fit: cover;
}

.texture-card__trigger:hover .texture-card__thumbnail img {
  filter: brightness(0.7);
  transform: scale(1.05);
}

.texture-card__overlay {
  position: absolute;
  background: rgb(0, 0, 0, 0.3);
  transition: background 0.3s ease;
  inset: 0;
}

.texture-card__trigger:hover .texture-card__overlay {
  background: rgb(2, 38, 98, 0.6);
}

.texture-card__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  border-radius: 50%;
  box-shadow: 0 0 15px rgb(0, 180, 216, 0.5);
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.texture-card__icon svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.texture-card__trigger:hover .texture-card__icon {
  box-shadow:
    0 0 25px rgb(0, 180, 216, 0.8),
    0 0 40px rgb(0, 119, 182, 0.5);
  transform: translate(-50%, -50%) scale(1.1);
}

.texture-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
}

.texture-card__label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #888;
}

.texture-card__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #022662;
}

/* =================================================================
   MODAL CONTAINER (iframe-hosted)
   ================================================================= */

.texture-modal {
  position: fixed;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  inset: 0;
}

.texture-modal.active {
  opacity: 1;
  visibility: visible;
}

.texture-modal__backdrop {
  position: absolute;
  background: rgb(2, 38, 98, 0.95);
  inset: 0;
}

.texture-modal__content {
  position: relative;
  width: 90%;
  max-width: 900px;
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.texture-modal.active .texture-modal__content {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.texture-modal__close {
  position: absolute;
  top: -40px;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  font-size: 24px;
  color: #fff;
  background: rgb(255, 255, 255, 0.1);
  border: 1px solid rgb(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.texture-modal__close:hover {
  background: rgb(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.texture-modal__iframe {
  width: 100%;
  height: 70dvh;
  background: #011a42;
  border: none;
  border-radius: 8px;
}
