/*
 * PROFQUI/UFPB — Página 404 moderna
 * Versão 1.0.0
 * Escopo: somente body.error404
 */

body.error404 {
  --pq404-blue-dark: #10384e;
  --pq404-blue: #174a66;
  --pq404-blue-bright: #2a7fff;
  --pq404-turquoise: #00d4aa;
  --pq404-cyan: #00ccff;
  --pq404-text: #172b36;
  --pq404-muted: #526b78;
  --pq404-border: #cfe0e8;
  --pq404-surface: #f3fafd;
}

/* Full width e remoção da sidebar do template antigo. */
body.error404 #main {
  width: 100% !important;
  margin: 0 !important;
  padding: clamp(28px, 5vw, 58px) 0 clamp(58px, 8vw, 96px) !important;
  background: #ffffff;
}

body.error404 #main > .full-container,
body.error404 #main .full-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

body.error404 #primary,
body.error404 .content-area {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body.error404 #secondary,
body.error404 .widget-area#secondary {
  display: none !important;
}

body.error404 .pq404,
body.error404 .pq404 *,
body.error404 .pq404 *::before,
body.error404 .pq404 *::after {
  box-sizing: border-box;
}

body.error404 .pq404 {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  color: var(--pq404-text);
  font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

body.error404 .pq404 a:focus-visible,
body.error404 .pq404 button:focus-visible,
body.error404 .pq404 input:focus-visible {
  outline: 3px solid var(--pq404-turquoise);
  outline-offset: 4px;
}

/* Hero */
body.error404 .pq404__hero {
  position: relative;
  min-height: 480px;
  padding: clamp(42px, 6vw, 72px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 88% 10%, rgba(0, 204, 255, .20), transparent 28%),
    radial-gradient(circle at 72% 104%, rgba(0, 212, 170, .18), transparent 35%),
    linear-gradient(135deg, #f7fcff 0%, #edfaff 52%, #f2fffb 100%);
  border: 1px solid var(--pq404-border);
  border-radius: 26px;
  box-shadow: 0 20px 52px rgba(23, 74, 102, .10);
}

body.error404 .pq404__hero::after {
  position: absolute;
  top: -160px;
  right: -70px;
  z-index: -2;
  width: 390px;
  height: 390px;
  content: "";
  border: 1px solid rgba(42, 127, 255, .14);
  border-radius: 50%;
  box-shadow:
    0 0 0 52px rgba(0, 212, 170, .045),
    0 0 0 104px rgba(0, 204, 255, .032);
}

body.error404 .pq404__number {
  position: absolute;
  right: clamp(20px, 5vw, 70px);
  top: 50%;
  z-index: -1;
  color: rgba(23, 74, 102, .055);
  font-size: clamp(170px, 26vw, 360px);
  font-weight: 900;
  letter-spacing: -.09em;
  line-height: .72;
  transform: translateY(-50%);
  user-select: none;
  pointer-events: none;
}

body.error404 .pq404__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

body.error404 .pq404__eyebrow {
  display: inline-flex;
  margin: 0 0 16px;
  align-items: center;
  gap: 9px;
  color: #087d69;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .11em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.error404 .pq404__eyebrow::before {
  width: 9px;
  height: 9px;
  content: "";
  background: var(--pq404-turquoise);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(0, 212, 170, .12);
}

body.error404 .pq404__title {
  max-width: 760px;
  margin: 0;
  color: var(--pq404-blue-dark);
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: 1.03;
  text-wrap: balance;
}

body.error404 .pq404__lead {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--pq404-muted);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.72;
  text-wrap: pretty;
}

/* Ações */
body.error404 .pq404__actions {
  display: flex;
  margin-top: 30px;
  flex-wrap: wrap;
  gap: 10px;
}

body.error404 .pq404__button {
  display: inline-flex;
  min-height: 46px;
  padding: 10px 15px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff !important;
  background: var(--pq404-blue);
  border: 1px solid var(--pq404-blue);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none !important;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

body.error404 .pq404__button:hover {
  color: #07584a !important;
  background: #effbf8;
  border-color: var(--pq404-turquoise);
  box-shadow: 0 8px 18px rgba(23, 74, 102, .07);
  transform: translateY(-1px);
}

body.error404 .pq404__button--secondary {
  color: var(--pq404-blue) !important;
  background: #ffffff;
  border-color: #bcd5e0;
}

body.error404 .pq404__button--secondary:hover {
  color: #07584a !important;
  background: #effbf8;
  border-color: var(--pq404-turquoise);
}

/* Busca */
body.error404 .pq404__search-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin-top: clamp(42px, 6vw, 64px);
  padding: clamp(24px, 3.5vw, 32px);
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(188, 213, 224, .95);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(23, 74, 102, .07);
  backdrop-filter: blur(8px);
}

body.error404 .pq404__search-title {
  margin: 0;
  color: var(--pq404-blue-dark);
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 820;
  letter-spacing: -.025em;
  line-height: 1.18;
}

body.error404 .pq404__search-text {
  margin: 8px 0 18px;
  color: var(--pq404-muted);
  font-size: 15px;
  line-height: 1.6;
}

body.error404 .pq404__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

body.error404 .pq404__label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.error404 .pq404__input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  color: var(--pq404-text);
  background: #ffffff;
  border: 1px solid #bcd5e0;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  box-shadow: inset 0 1px 2px rgba(23, 74, 102, .03);
}

body.error404 .pq404__input::placeholder {
  color: #7a909b;
}

body.error404 .pq404__input:hover {
  border-color: #9fc2d1;
}

body.error404 .pq404__submit {
  min-height: 48px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--pq404-blue);
  border: 1px solid var(--pq404-blue);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

body.error404 .pq404__submit:hover {
  color: #07584a;
  background: #effbf8;
  border-color: var(--pq404-turquoise);
  transform: translateY(-1px);
}

/* Pequena decoração molecular abstrata */
body.error404 .pq404__dot {
  position: absolute;
  z-index: -1;
  width: 10px;
  height: 10px;
  background: var(--pq404-turquoise);
  border-radius: 50%;
  opacity: .42;
  pointer-events: none;
}

body.error404 .pq404__dot--1 {
  right: 13%;
  top: 22%;
  box-shadow: 0 0 0 8px rgba(0, 212, 170, .06);
}

body.error404 .pq404__dot--2 {
  right: 24%;
  bottom: 17%;
  width: 7px;
  height: 7px;
  background: var(--pq404-cyan);
  box-shadow: 0 0 0 7px rgba(0, 204, 255, .05);
}

body.error404 .pq404__dot--3 {
  right: 7%;
  bottom: 33%;
  width: 6px;
  height: 6px;
  background: var(--pq404-blue-bright);
}

/* Responsividade */
@media (max-width: 760px) {
  body.error404 .pq404 {
    width: min(100% - 30px, 1180px);
  }

  body.error404 .pq404__hero {
    min-height: 0;
    padding: 32px 24px 30px;
    border-radius: 20px;
  }

  body.error404 .pq404__number {
    right: -5px;
    top: 48%;
    font-size: clamp(130px, 46vw, 220px);
    opacity: .7;
  }

  body.error404 .pq404__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.error404 .pq404__button {
    width: 100%;
  }

  body.error404 .pq404__search-card {
    margin-top: 34px;
    padding: 22px;
  }

  body.error404 .pq404__form {
    grid-template-columns: 1fr;
  }

  body.error404 .pq404__submit {
    width: 100%;
  }
}

@media (max-width: 420px) {
  body.error404 .pq404 {
    width: calc(100% - 22px);
  }

  body.error404 .pq404__hero {
    padding: 27px 19px 24px;
  }

  body.error404 .pq404__lead {
    font-size: 16px;
  }

  body.error404 .pq404__search-card {
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.error404 .pq404 *,
  body.error404 .pq404 *::before,
  body.error404 .pq404 *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  body.error404 .pq404__button:hover,
  body.error404 .pq404__submit:hover {
    transform: none;
  }
}
