:root {
  --ign-blue: #202846;
  --ign-blue-2: #2d3e63;
  --ign-cyan: #00a3d7;
  --ign-cyan-soft: #dff3fb;
  --ink: #27333a;
  --muted: #657782;
  --line: #d6e2e8;
  --surface: #ffffff;
  --bg: #eef3f6;
}

.mapas3d-page, .mapas3d-page *, .mapas3d-modal, .mapas3d-modal * { box-sizing: border-box; }

.mapas3d-page {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
  margin: 0 auto;
  padding: 0 0 56px;
}

.mapas3d-page .hero {
  background: linear-gradient(135deg, var(--ign-blue), var(--ign-blue-2));
  border-top: 5px solid var(--ign-cyan);
  color: #fff;
  padding: 34px;
  box-shadow: 0 18px 35px rgba(32, 40, 70, .18);
}

.mapas3d-page .eyebrow,
.mapas3d-modal .eyebrow {
  color: var(--ign-cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.mapas3d-page h1,
.mapas3d-page h2,
.mapas3d-page h3,
.mapas3d-modal h2 { margin: 0; }

.mapas3d-page h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 400;
  letter-spacing: -.02em;
}

.mapas3d-page .lead {
  max-width: 780px;
  color: #d8e5ec;
  font-size: 17px;
  line-height: 1.55;
  margin: 14px 0 0;
}

.mapas3d-page .toolbar {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  gap: 16px;
  margin: 22px 0 34px;
  padding: 22px 24px;
}

.mapas3d-page .toolbar label {
  color: var(--ign-blue);
  font-weight: 700;
}

.mapas3d-page .toolbar input {
  border: 1px solid var(--line);
  border-radius: 0;
  flex: 1;
  font-size: 16px;
  min-width: 180px;
  padding: 11px 13px;
}

.mapas3d-page .cards {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.mapas3d-page .card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(42, 64, 78, .08);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.mapas3d-page .card-preview {
  aspect-ratio: 4 / 3;
  background: var(--ign-cyan-soft);
  border-bottom: 4px solid var(--ign-cyan);
  overflow: hidden;
}

.mapas3d-page .card-preview img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.mapas3d-page .card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.mapas3d-page .card h3 {
  color: var(--ign-cyan);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
}

.mapas3d-page .card p {
  color: var(--muted);
  line-height: 1.45;
  margin: 10px 0 18px;
}

.mapas3d-page .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
}

.mapas3d-page .button {
  background: var(--ign-blue);
  border: 1px solid var(--ign-blue);
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  text-decoration: none;
}

.mapas3d-page .button.secondary {
  background: #fff;
  color: var(--ign-blue);
}

.mapas3d-page .button:hover, .mapas3d-page .button:focus {
  background: var(--ign-cyan);
  border-color: var(--ign-cyan);
  color: #fff;
}

.mapas3d-page .empty {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
}

.mapas3d-page .license {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 34px;
  text-align: center;
}

.mapas3d-page .license a {
  color: var(--ign-blue);
}

.mapas3d-page .license img {
  margin-bottom: 6px;
}

.mapas3d-modal {
  background: rgba(12, 18, 28, .78);
  inset: 0;
  padding: 22px;
  position: fixed;
  z-index: 50;
}

.mapas3d-modal[hidden] { display: none; }

.mapas3d-modal .modal-panel {
  background: #0f1720;
  color: #fff;
  display: flex;
  flex-direction: column;
  height: min(760px, calc(100vh - 44px));
  margin: 0 auto;
  max-width: 1040px;
  min-height: 420px;
}

.mapas3d-modal .modal-header {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  justify-content: space-between;
  padding: 18px 20px;
}

.mapas3d-modal .modal-header h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 400;
}

.mapas3d-modal .icon-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .4);
  color: #fff;
  cursor: pointer;
  font-size: 34px;
  height: 44px;
  line-height: 34px;
  width: 44px;
}

.mapas3d-modal .viewer-status {
  color: #b9cbd5;
  font-size: 14px;
  padding: 10px 20px 0;
}

.mapas3d-modal .viewer-canvas {
  flex: 1;
  min-height: 260px;
  position: relative;
}

.mapas3d-modal .viewer-canvas canvas {
  display: block;
}

.mapas3d-modal .viewer-help {
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #b9cbd5;
  font-size: 13px;
  padding: 12px 20px;
}

@media (max-width: 640px) {
  .mapas3d-page .hero { padding: 24px; }
  .mapas3d-page .toolbar { align-items: stretch; flex-direction: column; }
  .mapas3d-modal { padding: 0; }
  .mapas3d-modal .modal-panel { height: 100vh; }
}
