/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Lora", serif;
  background: #f5f3ef; /* neutro cálido igual que el index */
  color: #2e241a;
  line-height: 1.7;
}

/* ===== SECCIÓN ===== */
.section {
  padding: 30px 20px;
  text-align: center;
  margin-top: 80px;
}

.section h2 {
  font-family: "Cinzel Decorative", serif;
  font-size: 2.2rem;
  color: #3a2e23;
  margin-bottom: 1rem;
}

.section p {
  max-width: 700px;
  margin: 0 auto 2rem;
  font-size: 1.18rem;
  color: #463a2a;
}

/* ===== GRID DE MODELOS ===== */
.grid-models {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== TARJETAS DE MODELO ===== */
.model-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2), inset 0 0 15px rgba(255,255,255,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hover elegante */
.model-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.35), inset 0 0 20px rgba(255,255,255,0.15);
}

/* Título del modelo */
.model-card h3 {
  font-family: "Cinzel Decorative", serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin: 1rem 0 0.5rem 0;
  color: #2b2115;;
  text-align: center;
}

/* Model-viewer */
.model-card model-viewer {
  width: 100%;
  height: 350px;
  border-radius: 15px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
}
.model-card model-viewer:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Botón "Más Información" */
.info-btn {
  margin: 1rem 0 1.5rem 0;
  padding: 0.55rem 1.4rem;
  border-radius: 30px;
  border: 2px solid #2b2115;;
  background: linear-gradient(145deg, #ffffff, #f0f0f5);
  color: #3a2d1d;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.info-btn:hover {
  background: linear-gradient(145deg, #3a2d1d, #413322);
  color: #ffffff;
  border-color: #3a2d1d;;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 30, 0.85); /* Fondo oscuro semi-transparente */
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
  transition: all 0.3s ease;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 2.5rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.15);
  animation: slideUp 0.35s ease;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  color: #2b2115;;
}

/* Botón cerrar */
.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #2b2115;;
  transition: color 0.2s, transform 0.2s;
}
.close-btn:hover {
  color: #e74c3c;
  transform: scale(1.1);
}

/* Título */
#modal-title {
  margin-bottom: 1.5rem;
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  color: #2b2115;;
  font-family: "Cinzel Decorative", serif;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Pestañas de idioma */
.tab-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.55rem 1.4rem;
  border-radius: 30px;
  border: 2px solid #2b2115;;
  background: linear-gradient(145deg, #ffffff, #f0f0f5);
  color: #2b2115;;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.tab-btn.active {
  background: linear-gradient(145deg, #2b2115, #55422b);
  color: #ffffff;
  border-color: #2b2115;;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.tab-btn:hover:not(.active) {
  background: #dfe6e9;
}

/* Contenido de pestaña */
.tab-content {
  display: none;
  line-height: 1.65;
  color: #2b2115;;
  font-size: 1rem;
}
.tab-content.active {
  display: block;
}

/* Audio */
.tab-content audio {
  width: 100%;
  margin-top: 1rem;
}

/* Animación modal */
@keyframes slideUp {
  from {transform: translateY(60px); opacity: 0;}
  to {transform: translateY(0); opacity: 1;}
}

/* Scroll personalizado */
.modal-content::-webkit-scrollbar {
  width: 10px;
}
.modal-content::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb {
  background: #2b2115;
  border-radius: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .modal-content {
    padding: 1.5rem 1.8rem;
    max-width: 95%;
    max-height: 95vh;
  }

  #modal-title {
    font-size: 1.8rem;
  }

  .tab-btn {
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .tab-buttons {
    gap: 0.3rem;
  }

  #modal-title {
    font-size: 1.5rem;
  }

  .tab-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
  }
}

