/* Reset básico y ocupación completa de pantalla */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #fdfdfd;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
}

/* Envoltorio principal que centra el contenido vertical y horizontalmente */
.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centrado vertical */
  align-items: center;     /* Centrado horizontal */
  padding: 20px 10px;
  box-sizing: border-box;
}

/* Ancho máximo del bloque principal */
.content-wrapper {
  width: 100%;
  max-width: 800px;
  text-align: center;
}

/* Header centrado */
header {
  border-bottom: 2px solid #000;
  padding-bottom: 12px;
  margin-bottom: 25px;
  text-align: center;
}

/* Logo-texto con Grape Nuts */
h1 {
  font-family: 'Grape Nuts', cursive;
  font-size: 52px;
  margin: 0 0 5px 0;
  font-weight: normal;
  line-height: 1;
}

p.tagline {
  font-size: 14px;
  margin: 0;
  color: #444;
}

/* Status Box Global */
#status {
  margin: 0 auto 20px auto;
  padding: 10px;
  border: 1px dashed #000;
  background: #fffff0;
  display: none;
  font-size: 14px;
  max-width: 600px;
  text-align: center;
  border-radius: 4px;
}

/* Layout Centrado de Tarjetas Flexibles */
.cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 20px;
}

/* Estilo de Tarjeta Individual con bordes sutilmente redondeados */
.card {
  background-color: #f4f4f4;
  border: 1px solid #767676;
  border-radius: 4px;
  flex: 1 1 calc(20% - 10px);
  min-width: 130px;
  box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

/* Encabezado cliqueable de la Tarjeta */
.card-header {
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.card:hover {
  background-color: #eaeaea;
  border-color: #000;
}

.card.active {
  background-color: #fff;
  border: 2px solid #000;
  flex: 1 1 100%; /* Expansión a fila completa */
}

.card-title {
  font-size: 14px;
  color: #0000ee;
  text-decoration: underline;
  font-weight: normal;
  display: block;
  transition: color 0.15s ease;
}

.card.active .card-title {
  color: #000;
  text-decoration: none;
  font-weight: bold;
}

/* Contenedor desplegable usando Grid Rows */
.card-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease-out;
  border-top: 1px solid transparent;
}

.card.active .card-collapse {
  grid-template-rows: 1fr;
  border-top-color: #000;
}

.card-body {
  overflow: hidden;
  opacity: 0;
  padding: 0 20px;
  transition: opacity 0.2s ease-out 0.05s, padding 0.25s ease-out;
  background: #fff;
  text-align: center;
}

.card.active .card-body {
  opacity: 1;
  padding: 20px;
}

.card-body h2 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 1px dotted #888;
  padding-bottom: 6px;
  display: inline-block;
}

.field {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

input[type="file"], input[type="text"], input[type="number"], select {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  padding: 6px;
  border: 1px solid #666;
  border-radius: 3px;
  background: #fff;
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  text-align: center;
}

/* Estilos para el visor de previsualización 3D */
.pdf-3d-preview {
  display: none;
  width: 100%;
  max-width: 600px; /* Incrementado de 450px a 600px */
  height: 340px;    /* Incrementado de 220px a 340px para mayor impacto visual */
  margin: 15px auto 20px auto;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f4f5f7;
  overflow: hidden;
  position: relative;
  cursor: grab;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.03); /* Sombra interior suave */
}

.pdf-3d-preview:active {
  cursor: grabbing;
}

.pdf-3d-preview canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.3d-loading {
  margin: 0;
  color: #666;
  line-height: 320px; /* Alineación vertical con la nueva altura */
  text-align: center;
}

button.action-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  background: #e9e9e9;
  border: 1px solid #767676;
  border-radius: 4px;
  padding: 8px 18px;
  cursor: pointer;
  margin-top: 5px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

button.action-btn:hover {
  background: #d0d0d0;
  border-color: #000;
}

footer {
  margin-top: 30px;
  border-top: 1px solid #ccc;
  padding-top: 10px;
  font-size: 12px;
  color: #666;
  text-align: center;
}

.header-logo {
  margin: 10px auto 15px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-logo img {
  max-width: 400px;
  height: auto;
  display: block;
}
