:root {
  --primary: #002060;
  --primary-2: #0b5ed7;
  --primary-soft: #edf4ff;
  --text: #111827;
  --muted: #5b6472;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --border: #dbe2ea;
  --shadow: 0 18px 45px rgba(0, 32, 96, 0.08);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(11, 94, 215, 0.07), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  line-height: 1.55;
  max-width: 100%;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.top-strip {
  background: var(--primary);
  color: rgba(255,255,255,0.9);
  font-size: 0.92rem;
}

.top-strip .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  flex-wrap: wrap;
}

.top-strip p {
  margin: 0;
}

.lang-select {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
}

.lang-select select {
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
  outline: none;
}

.lang-select select option {
  color: var(--text);
  background: #fff;
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(219, 226, 234, 0.9);
}

.header-row {
  display: grid;
  gap: 14px;
  padding: 18px 0;
}

.header-brand-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  border: 1px solid rgba(219, 226, 234, 0.95);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,248,252,0.98) 100%);
  box-shadow: 0 12px 34px rgba(0, 32, 96, 0.07);
  overflow: hidden;
}

.logo-slot {
  min-width: 0;
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  background: rgba(255,255,255,0.72);
}

.logo-slot + .logo-slot {
  border-left: 1px solid rgba(219, 226, 234, 0.95);
}

.logo-slot img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 52px;
  object-fit: contain;
  margin: 0 auto;
}

.logo-slot-konica img {
  max-height: 45px;
}

.logo-slot-udg img {
  max-height: 100px;
}

.logo-slot-csuc img {
  max-height: 45px;
}

.header-identity {
  text-align: center;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero {
  padding: 52px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

.hero-grid > *,
.grid-2 > *,
.header-row > * {
  min-width: 0;
}

.hero-panel,
.hero-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 38px;
  background:
    linear-gradient(135deg, rgba(0,32,96,0.97) 0%, rgba(11,94,215,0.92) 100%),
    var(--primary);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 65%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.2vw, 3.45rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero p.lead {
  margin: 0;
  max-width: 62ch;
  font-size: 1.08rem;
  color: rgba(255,255,255,0.92);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.highlight-link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  margin-top: 20px;
  border-radius: 20px;
  border: 1px solid #bfd4fb;
  background: linear-gradient(180deg, #f6faff 0%, #edf4ff 100%);
  box-shadow: 0 14px 32px rgba(11, 94, 215, 0.12);
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.highlight-link:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: #94b7f3;
  box-shadow: 0 18px 36px rgba(11, 94, 215, 0.18);
}

.highlight-link strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.highlight-link span:last-child {
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

.highlight-link-hero {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.24);
  color: #fff;
  box-shadow: none;
}

.highlight-link-hero:hover {
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.highlight-link-hero span:last-child {
  color: #fff;
}

.highlight-link-centered {
  justify-content: center;
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  border-color: #e8c98a;
  background: linear-gradient(180deg, #fff8ec 0%, #fdf1d9 100%);
  box-shadow: 0 16px 34px rgba(163, 118, 24, 0.16);
}

.highlight-link-centered > span:first-child {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.highlight-link-centered:hover {
  border-color: #d9b36a;
  box-shadow: 0 20px 38px rgba(163, 118, 24, 0.22);
}

.highlight-link-centered strong,
.highlight-link-centered span:last-child {
  color: #7a5610;
}

.highlight-link-between-sections {
  margin-top: 8px;
  margin-bottom: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 48px;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 10px 22px rgba(0,0,0,0.16);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.28);
}

.hero-side {
  padding: 28px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.hero-side h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.hero-side p {
  margin: 0;
  color: var(--muted);
}

.check-list {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.check-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 18px;
  background: var(--primary-soft);
  border: 1px solid #cfe0ff;
}

.check-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.98rem;
}

.check-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 28px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
}

main {
  padding: 28px 0 70px;
}

.section {
  margin-top: 26px;
}

.section-title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 72ch;
  font-size: 1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
  min-height: 100%;
}

.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: #a9c3ef;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.2;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}

.panel-wide {
  width: 100%;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 1.28rem;
  line-height: 1.2;
}

.panel > p {
  margin-top: 0;
  color: var(--muted);
}

.steps {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fbfcfe;
}

.step-number {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

details {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfcfe;
  overflow: hidden;
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 800;
  position: relative;
  padding-right: 54px;
}

summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
}

details[open] summary::after {
  content: "−";
}

details .answer {
  padding: 0 18px 18px;
  color: var(--muted);
}

.support-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.support-item,
.resource-link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fbfcfe;
}

.support-item strong,
.resource-link strong {
  display: block;
  margin-bottom: 4px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.resource-link {
  min-height: 100%;
}

.resource-link span:last-child {
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

.support-panel-compact {
  display: grid;
  align-content: start;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding-top: 24px;
  padding-bottom: 24px;
}

.support-panel-compact h3 {
  margin-bottom: 0;
}

.support-panel-compact > p {
  margin: 0;
  max-width: 58ch;
}

.support-ticket-button {
  margin-top: 4px;
  width: fit-content;
  min-width: 280px;
}

.support-ticket-note {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 24px;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid #d7e5ff;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.centers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.center-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.center-photo {
  position: relative;
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(0,32,96,0.92), rgba(11,94,215,0.82)),
    var(--primary);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.center-photo img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.photo-fallback {
  width: calc(100% - 36px);
  min-height: 150px;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.center-body {
  padding: 22px;
  display: grid;
  gap: 14px;
  flex: 1;
}

.center-kicker {
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 800;
}

.center-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.center-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.center-meta li {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.center-meta strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.center-meta span {
  color: var(--muted);
  font-size: 0.96rem;
}

footer {
  background: #0d1726;
  color: rgba(255,255,255,0.78);
  padding: 28px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #fff;
  opacity: 0.88;
}

/* ============================================================
   Componentes compartidos de páginas interiores
   (centros.html, videotutorials.html, …)
   ============================================================ */

/* ── Enlace de vuelta al portal ───────────────────────────── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-2);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 0;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ── Hero de páginas interiores ──────────────────────────── */

.hero-subpage {
  padding: 40px 0 24px;
}

.hero-subpage .hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  margin-top: 16px;
}

.hero-subpage .hero-text {
  display: grid;
  gap: 14px;
}

.hero-subpage h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.hero-subpage p.lead {
  margin: 0;
  max-width: 62ch;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
}

/* ── Badge circular de conteo ────────────────────────────── */

.subpage-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex: 0 0 96px;
  text-align: center;
  color: #fff;
}

.subpage-count strong {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}

.subpage-count span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ── ─────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .hero-grid,
  .grid-2 { grid-template-columns: 1fr; }

  /* Centros: 2 columnas en tablet antes de colapsar a 1 */
  .centers-grid { grid-template-columns: repeat(2, 1fr); }

  /* Subpáginas: colapsar hero y ocultar badge */
  .hero-subpage .hero-panel { grid-template-columns: 1fr; }
  .subpage-count { display: none; }
}

@media (max-width: 760px) {
  /* Centros: 1 columna en móvil */
  .centers-grid { grid-template-columns: 1fr; }

  /* Reducir padding inferior excesivo en móvil */
  main { padding-bottom: 44px; }

  /* Subpáginas: ajuste de hero en móvil */
  .hero-subpage { padding: 18px 0; }
  .hero-subpage .hero-panel { margin-top: 12px; }

  header {
    position: static;
    backdrop-filter: none;
  }

  .wrap {
    width: min(100% - 20px, var(--max));
  }

  .top-strip .wrap {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
  }

  .top-strip p {
    font-size: 0.82rem;
    line-height: 1.35;
    max-width: 58%;
  }

  .lang-select {
    gap: 8px;
    font-size: 0.88rem;
  }

  .lang-select select {
    padding: 7px 10px;
  }

  .header-row {
    gap: 10px;
    padding: 12px 0 8px;
  }

  .header-brand-strip {
    grid-template-columns: 1fr;
  }

  .logo-slot {
    min-height: 84px;
    padding: 14px 18px;
  }

  .logo-slot + .logo-slot {
    border-left: none;
    border-top: 1px solid rgba(219, 226, 234, 0.95);
  }

  .logo-slot-konica {
    order: 2;
  }

  .logo-slot-udg {
    order: 1;
  }

  .logo-slot-csuc {
    order: 3;
  }

  .logo-slot img {
    max-height: 42px;
  }

  .logo-slot-konica img {
    max-height: 34px;
  }

  .logo-slot-udg img {
    max-height: 50px;
  }

  .logo-slot-csuc img {
    max-height: 40px;
  }

  .header-identity {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .hero {
    padding: 18px 0 18px;
  }

  .hero-panel {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .hero-side,
  .panel {
    padding: 20px;
  }

  .eyebrow {
    padding: 6px 10px;
    font-size: 0.75rem;
    margin-bottom: 14px;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 10vw, 2.45rem);
    line-height: 1.04;
  }

  .hero p.lead {
    font-size: 0.98rem;
  }

  .check-item {
    padding: 12px;
    border-radius: 16px;
  }

  .check-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    font-size: 0.86rem;
  }

  .section {
    margin-top: 20px;
  }

  .cards,
  .centers-grid { grid-template-columns: 1fr; }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .center-body {
    padding: 18px;
  }

  .center-photo,
  .center-photo img { min-height: 190px; }

  .hero-actions {
    flex-direction: column;
  }

  .btn { width: 100%; }

  .resource-link,
  .highlight-link,
  .support-item,
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .support-ticket-button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .wrap {
    width: min(100% - 16px, var(--max));
  }

  .top-strip .wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-strip p {
    max-width: none;
    font-size: 0.78rem;
  }

  .lang-select {
    width: 100%;
    justify-content: space-between;
  }

  .logo-slot {
    min-height: 76px;
    padding: 12px 14px;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .btn {
    min-height: 46px;
    padding: 13px 18px;
  }

  .hero-side h2 {
    font-size: 1.15rem;
  }
}
