:root {
  --primary: #0f172a;
  --secondary: #1e293b;
  --danger: #dc2626;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text-main: #334155;
  --text-muted: #64748b;
  --border: #cbd5e1;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Barra superior con logo */
.navbar {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 4%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.navbar img {
  height: 32px;
  width: auto;
}

@media (max-width: 768px) {
  .navbar {
    padding: 8px 4%;
  }

  .navbar img {
    height: 28px;
  }
}

/* Contenedor amplio */
.main-wrapper {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 5%;
}

.page-header {
  margin-bottom: 40px;
}

.page-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.page-header-visual {
  flex-shrink: 0;
}

.page-header-img {
  display: block;
  width: min(100%, 280px);
  height: auto;
  max-height: 200px;
  object-fit: contain;
}

.page-header-copy {
  width: 100%;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--primary);
  margin: 0 0 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.intro {
  font-size: 1.2rem;
  color: var(--danger);
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .page-header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 36px;
  }

  .page-header-copy {
    text-align: left;
    flex: 1;
    min-width: 0;
  }

  .intro {
    margin: 0;
  }
}

/* Tarjeta unificada: legal + solicitud en rejilla */
.card-unified-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start;
}

@media (min-width: 1024px) {
  .card-unified-top {
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
  }
}

.card-unified-legal,
.card-unified-info {
  min-width: 0;
}

.card-unified .mintic-logos {
  margin-top: 32px;
}

/* Tarjetas limpias y modernas */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -4px rgba(0,0,0,0.05);
}

.card h2, .card h3 {
  color: var(--primary);
  margin: 0 0 25px;
  font-size: 1.4rem;
  border-bottom: 2px solid var(--bg);
  padding-bottom: 15px;
}

/* Cuerpo legal: un solo tamaño y color negro */
.legal-texto-cuerpo {
  font-size: 1rem;
  color: #000000;
  line-height: 1.6;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.legal-texto-cuerpo p,
.legal-texto-cuerpo div {
  font-size: inherit;
  color: inherit;
}

.legal-texto-cuerpo p {
  margin: 0 0 1em 0;
}

.legal-texto-cuerpo p:last-child {
  margin-bottom: 0;
}

.legal-texto-cuerpo strong {
  font-size: inherit;
  color: inherit;
  font-weight: 700;
}

.legal-box ul {
  padding-left: 25px;
  margin: 20px 0 0;
  font-size: 1.05rem;
}

.legal-box li {
  margin-bottom: 15px;
}

/* Logos Internet Sano, MinTIC y Coljuegos centrados en fila */
.mintic-logos {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 28px;
  width: 100%;
}

.mintic-logos img {
  display: block;
  width: auto;
  max-width: min(30%, 220px);
  height: auto;
  max-height: 96px;
  object-fit: contain;
}

@media (max-width: 520px) {
  .mintic-logos {
    gap: 10px 12px;
  }

  .mintic-logos img {
    max-width: min(30%, 160px);
    max-height: 64px;
  }
}

/* Lista de datos técnicos: etiqueta | valor en fila */
.info-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-item {
  display: grid;
  grid-template-columns: minmax(0, 11rem) 1fr;
  gap: 8px 20px;
  align-items: start;
  background: var(--bg);
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.info-label {
  font-size: 0.95rem;
  text-transform: none;
  color: var(--text-main);
  font-weight: 600;
  margin: 0;
  padding-top: 2px;
  line-height: 1.4;
}

.info-value-cell {
  min-width: 0;
}

.info-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.05rem;
  color: var(--primary);
  word-break: break-all;
  line-height: 1.45;
}

.info-value--fecha {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}

.info-value-error {
  margin-top: 8px;
}

/* Fila URL: sin rejilla de dos columnas; valor en una sola línea con scroll horizontal */
.info-item--url {
  grid-template-columns: 1fr;
}

.info-item--url .info-label {
  margin-bottom: 4px;
}

.info-value-cell--url {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

#val-url {
  display: block;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  min-height: 1.45em;
}

@media (max-width: 520px) {
  .info-item:not(.info-item--url) {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .info-item--url {
    gap: 6px;
  }

  .info-label {
    padding-top: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
  }
}

.error-text {
  color: var(--danger);
  font-size: 0.95rem;
  margin-top: 10px;
}

.actions {
  margin-top: 40px;
}

.btn {
  display: block;
  width: 100%;
  text-align: center;
  background-color: var(--primary);
  color: #ffffff;
  padding: 18px 30px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
}

.action-note {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 20px;
}

@media (max-width: 768px) {
  .main-wrapper { padding: 30px 5%; }
  .card { padding: 25px; }
  .page-header-inner { gap: 22px; }
  .page-header-img { max-height: 160px; }
  .page-header h1 { font-size: 2.2rem; }
  .intro { font-size: 1.15rem; }
}
