:root {
  --cab-blue: #173f85;
  --cab-blue-soft: #2a5aa3;
  --cab-red: #c91f1a;
  --cab-red-soft: #e15d52;
  --ink: #202733;
  --muted: #687386;
  --paper: #fffaf6;
  --surface: rgba(255, 255, 255, 0.86);
  --line: rgba(23, 63, 133, 0.14);
  --shadow: 0 24px 70px rgba(31, 42, 68, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 31, 26, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(23, 63, 133, 0.14), transparent 30rem),
    linear-gradient(180deg, #fbf4ef 0%, #f7f9ff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 72%);
}

.page-shell {
  width: min(100%, 980px);
  min-height: calc(100svh - 68px);
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 12px 14px;
  display: grid;
  place-items: start center;
}

.hero-card {
  width: 100%;
  margin: 0 auto;
  padding: clamp(10px, 2.6vw, 22px);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 246, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -130px;
  top: -150px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(23, 63, 133, 0.12), rgba(201, 31, 26, 0.09));
  z-index: -1;
}

.top-label {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 10px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cab-blue);
  background: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.78rem, 2.7vw, 0.95rem);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.logo {
  display: block;
  width: clamp(62px, 18vw, 94px);
  height: clamp(62px, 18vw, 94px);
  object-fit: contain;
  margin: 0 auto 8px;
  filter: drop-shadow(0 14px 18px rgba(23, 63, 133, 0.16));
}

.title-block {
  text-align: center;
  margin: 0 auto 14px;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--cab-red);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  font-weight: 800;
}

h1 {
  margin: 0;
  color: var(--cab-blue);
  font-size: clamp(1.35rem, 6vw, 2.45rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.subtitle {
  margin: 7px auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(0.88rem, 2.8vw, 1rem);
  line-height: 1.5;
}

.search-panel {
  width: min(100%, 760px);
  margin: 0 auto;
}

.search-panel label {
  display: block;
  margin: 0 0 8px 4px;
  color: var(--cab-blue);
  font-size: 0.94rem;
  font-weight: 800;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 10px 8px 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 32px rgba(23, 63, 133, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.search-box:focus-within {
  border-color: rgba(23, 63, 133, 0.34);
  box-shadow: 0 18px 42px rgba(23, 63, 133, 0.14);
  transform: translateY(-1px);
}

.search-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: var(--cab-blue-soft);
  opacity: 0.78;
}

input[type="search"] {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

input::placeholder {
  color: #98a0ad;
}

.clear-button {
  display: none;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 63, 133, 0.08);
  color: var(--cab-blue);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.clear-button.is-visible {
  display: grid;
  place-items: center;
}

.status-text {
  min-height: 24px;
  margin: 10px 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
  width: 100%;
}

.social-links {
  width: min(100%, 760px);
  margin: 12px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.social-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 63, 133, 0.14);
  border-radius: 17px;
  color: var(--cab-blue);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 24px rgba(31, 42, 68, 0.07);
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.1;
  text-decoration: none;
  touch-action: manipulation;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.social-button:hover,
.social-button:focus-visible {
  border-color: rgba(23, 63, 133, 0.26);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 30px rgba(31, 42, 68, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.social-icon-box {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.social-icon {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  display: block;
  fill: currentColor;
  overflow: hidden;
}

.social-facebook {
  color: #1f58a7;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(230, 239, 255, 0.62));
}

.social-instagram {
  color: #b33472;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 232, 242, 0.62));
}

.social-official {
  color: #173f85;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 241, 239, 0.62));
}

.selected-area {
  width: min(100%, 760px);
  margin: 12px auto 0;
}

.selected-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(201, 31, 26, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 244, 0.92));
  box-shadow: 0 16px 34px rgba(31, 42, 68, 0.1);
}

.selected-number {
  display: grid;
  place-items: center;
  min-width: 68px;
  height: 58px;
  padding: 0 12px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cab-red), var(--cab-red-soft));
  font-size: 1.18rem;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(201, 31, 26, 0.19);
}

.selected-caption {
  margin: 0 0 4px;
  color: var(--cab-blue);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selected-name {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1rem, 3.4vw, 1.15rem);
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.results-area {
  width: min(100%, 760px);
  margin: 12px auto 0;
}

.results-list {
  display: grid;
  gap: 10px;
}

.result-card {
  width: 100%;
  border: 1px solid rgba(23, 63, 133, 0.12);
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 26px rgba(31, 42, 68, 0.07);
  animation: rise 180ms ease both;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.result-card:hover,
.result-card:focus-visible {
  border-color: rgba(23, 63, 133, 0.32);
  box-shadow: 0 16px 32px rgba(31, 42, 68, 0.11);
  transform: translateY(-1px);
  outline: none;
}

.result-number {
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 52px;
  padding: 0 10px;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cab-blue), var(--cab-blue-soft));
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  box-shadow: 0 12px 22px rgba(23, 63, 133, 0.2);
}

.result-content {
  min-width: 0;
}

.result-caption {
  margin: 0 0 4px;
  color: var(--cab-red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-name {
  margin: 0;
  color: var(--ink);
  font-size: clamp(0.97rem, 3.2vw, 1.08rem);
  font-weight: 800;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.empty-state,
.error-state {
  padding: 18px;
  border: 1px dashed rgba(23, 63, 133, 0.22);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
  line-height: 1.5;
}

.error-state {
  color: #8b1d18;
  border-color: rgba(201, 31, 26, 0.28);
  background: rgba(255, 244, 242, 0.8);
}

.footer {
  padding: 18px max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  color: #6c7281;
  font-size: 0.88rem;
  text-align: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 430px) {
  .page-shell {
    padding-inline: 10px;
  }

  .hero-card {
    border-radius: 24px;
  }

  .top-label {
    margin-bottom: 8px;
  }

  .social-links {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .social-button {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 0.88rem;
  }

  .selected-card,
  .result-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .selected-number,
  .result-number {
    width: fit-content;
    min-width: 54px;
    height: 46px;
  }
}

@media (min-width: 760px) {
  .page-shell {
    padding-top: 18px;
  }

  .hero-card {
    margin-top: 4px;
  }

  .results-list {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Ajustes solicitados: botones superiores pequeños y búsqueda por abreviaturas UNAM */
.hero-card {
  padding-top: clamp(8px, 2vw, 18px);
}

.top-label {
  margin-bottom: 6px;
}

.social-links {
  width: min(100%, 760px);
  margin: 6px auto 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.social-button {
  min-height: 32px;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(31, 42, 68, 0.07);
}

.social-icon-box {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.social-icon {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}

.logo {
  margin-top: 2px;
}

.status-text {
  margin-top: 8px;
}

@media (max-width: 430px) {
  .social-links {
    display: flex;
    grid-template-columns: none;
    gap: 5px;
    margin: 5px auto 8px;
  }

  .social-button {
    min-height: 29px;
    padding: 6px 8px;
    gap: 5px;
    font-size: 0.72rem;
  }

  .social-icon-box {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .social-icon {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
  }
}

@media (max-width: 350px) {
  .social-button {
    font-size: 0.68rem;
    padding-inline: 7px;
  }
}


/* Ajuste visual solicitado: estilo más moderno, limpio y con menor peso tipográfico */
:root {
  --minimal-shadow: 0 12px 34px rgba(31, 42, 68, 0.075);
  --minimal-line: rgba(31, 42, 68, 0.10);
}

.hero-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.54));
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 54px rgba(31, 42, 68, 0.09);
}

.top-label,
.search-panel label {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-weight: 650;
  letter-spacing: 0.14em;
}

h1 {
  font-weight: 650;
  letter-spacing: -0.035em;
}

.subtitle,
.status-text,
.footer {
  font-weight: 400;
}

.search-box {
  border-color: rgba(31, 42, 68, 0.11);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--minimal-shadow);
}

.search-box:focus-within {
  border-color: rgba(23, 63, 133, 0.24);
  box-shadow: 0 16px 38px rgba(23, 63, 133, 0.10);
}

.social-button {
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(31, 42, 68, 0.055);
}

.selected-card,
.result-card {
  border: 1px solid var(--minimal-line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--minimal-shadow);
}

.selected-card {
  padding: 13px;
  border-left: 3px solid rgba(201, 31, 26, 0.38);
}

.result-card:hover,
.result-card:focus-visible {
  border-color: rgba(23, 63, 133, 0.22);
  box-shadow: 0 14px 34px rgba(31, 42, 68, 0.09);
}

.selected-number,
.result-number {
  min-width: 52px;
  height: 46px;
  border-radius: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  box-shadow: none;
}

.selected-number {
  color: var(--cab-red);
  background: rgba(201, 31, 26, 0.10);
  border: 1px solid rgba(201, 31, 26, 0.14);
}

.result-number {
  color: var(--cab-blue);
  background: rgba(23, 63, 133, 0.09);
  border: 1px solid rgba(23, 63, 133, 0.13);
}

.selected-caption,
.result-caption {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  text-transform: none;
}

.selected-name,
.result-name {
  color: #252b35;
  font-weight: 620;
  letter-spacing: -0.012em;
}

.selected-name {
  font-size: clamp(0.98rem, 3.2vw, 1.08rem);
}

.result-name {
  font-size: clamp(0.95rem, 3.1vw, 1.03rem);
}

.clear-button {
  font-weight: 400;
  background: rgba(23, 63, 133, 0.07);
}

@media (max-width: 430px) {
  .selected-card,
  .result-card {
    gap: 9px;
    padding: 12px;
  }

  .selected-number,
  .result-number {
    min-width: 48px;
    height: 42px;
  }
}
