/*
 * Eduval — 404 page
 */

body.error404 {
  background-color: #f6efe3;
}

.eduval-404-page {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: clamp(620px, 78vh, 920px);
  background-color: #f6efe3;
}

.eduval-404-page::before,
.eduval-404-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.eduval-404-page::before {
  inset: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%23261e50' stroke-opacity='0.14' stroke-width='1.4'%3E%3Cpath d='M12 44c22-14 44-14 66 0s44 14 66 0'/%3E%3Cpath d='M12 92c22-14 44-14 66 0s44 14 66 0'/%3E%3Cpath d='M12 140c22-14 44-14 66 0s44 14 66 0'/%3E%3C/g%3E%3Cg fill='%23e58431' fill-opacity='0.12'%3E%3Ccircle cx='30' cy='26' r='4'/%3E%3Ccircle cx='138' cy='72' r='5'/%3E%3Ccircle cx='94' cy='150' r='4'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

.eduval-404-page::after {
  top: 34px;
  right: clamp(-120px, -8vw, -40px);
  bottom: 56px;
  left: auto;
  width: min(34vw, 340px);
  border-radius: 999px;
  background-color: rgba(38, 30, 80, 0.08);
  box-shadow:
    -78px 120px 0 0 rgba(229, 132, 49, 0.14),
    -16px 280px 0 0 rgba(38, 30, 80, 0.08);
  transform: rotate(12deg);
  opacity: 1;
}

.eduval-404 {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: inherit;
  padding-top: clamp(28px, 5vw, 54px);
  padding-bottom: clamp(48px, 7vw, 84px);
  margin-top: 0;
}

.eduval-404__inner {
  width: 100%;
  max-width: none;
  text-align: center;
  padding: clamp(38px, 5vw, 62px);
  border-radius: 28px;
  border: 1.5px solid rgba(38, 30, 80, 0.22);
  background-color: rgba(255, 251, 245, 0.9);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e58431' stroke-opacity='0.08' stroke-width='1.1'%3E%3Cpath d='M14 24h22'/%3E%3Cpath d='M84 24h22'/%3E%3Cpath d='M14 96h22'/%3E%3Cpath d='M84 96h22'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  backdrop-filter: blur(10px);
  box-shadow:
    0 28px 70px rgba(38, 30, 80, 0.1),
    0 0 0 4px rgba(38, 30, 80, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.eduval-404 .eduval-breadcrumbs__list {
  justify-content: center;
}

.eduval-404__icon {
  width: 170px;
  height: 170px;
  max-width: 55vw;
  margin: 0.5rem auto 1.25rem;
  display: block;
  color: var(--bg-blue);
  opacity: 0.95;
  filter: drop-shadow(0 18px 35px rgba(38, 30, 80, 0.18));
}

.eduval-404__inner h1 {
  font-family: var(--font-heading), Arial, sans-serif;
  color: var(--bg-blue);
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.96;
  text-transform: uppercase;
  text-wrap: balance;
}

.eduval-404__inner p {
  font-family: var(--font-default), Arial, sans-serif;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  color: color-mix(in srgb, var(--color-heading) 70%, #6f6a61);
  font-size: clamp(1.05rem, 1.1vw, 1.22rem);
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

body.error404 .site-footer {
  margin-top: 0;
  padding-top: 2.5rem;
  background-color: #f6efe3;
}

body.error404 .site-footer::after {
  background-color: #f6efe3;
  border-top: 1px solid rgba(38, 30, 80, 0.1);
  box-shadow: none;
}

body.error404 .site-footer::before {
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%23261e50' stroke-opacity='0.12' stroke-width='1.4'%3E%3Cpath d='M12 44c22-14 44-14 66 0s44 14 66 0'/%3E%3Cpath d='M12 92c22-14 44-14 66 0s44 14 66 0'/%3E%3Cpath d='M12 140c22-14 44-14 66 0s44 14 66 0'/%3E%3C/g%3E%3Cg fill='%23e58431' fill-opacity='0.08'%3E%3Ccircle cx='30' cy='26' r='4'/%3E%3Ccircle cx='138' cy='72' r='5'/%3E%3Ccircle cx='94' cy='150' r='4'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-position: top left;
  background-size: 180px 180px;
}

.eduval-404 .search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  max-width: 100%;
  margin-top: 26px;
  padding: 10px;
  border: 1px solid rgba(38, 30, 80, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 30px rgba(38, 30, 80, 0.06);
}

.eduval-404 .search-form label {
  margin: 0;
  display: block;
  max-width: 860px;
}

.eduval-404 .search-form .screen-reader-text {
  position: absolute;
}

.eduval-404 .search-field,
.eduval-404 input[type="search"],
.eduval-404 input[type="text"] {
  width: min(100%, 860px);
  max-width: 100%;
  min-height: 58px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1.5px solid rgba(38, 30, 80, 0.16);
  background: rgba(255, 253, 250, 0.98);
  color: var(--color-heading);
  font-family: var(--font-default), Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 0 0 1px rgba(38, 30, 80, 0.08);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.eduval-404 .search-field::placeholder,
.eduval-404 input[type="search"]::placeholder,
.eduval-404 input[type="text"]::placeholder {
  color: color-mix(in srgb, var(--color-paragraph) 86%, #8f897f);
  font-weight: 500;
}

.eduval-404 .search-field:focus,
.eduval-404 input[type="search"]:focus,
.eduval-404 input[type="text"]:focus {
  outline: none;
  border-color: var(--bg-blue);
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(38, 30, 80, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.eduval-404 .search-submit,
.eduval-404 input[type="submit"],
.eduval-404 button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 58px;
  padding: 14px 24px;
  border: 1.5px solid var(--bg-blue);
  border-radius: 16px;
  background: var(--bg-blue);
  color: var(--white);
  font-family: var(--font-heading), Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 14px 26px rgba(38, 30, 80, 0.16);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.eduval-404 .search-submit:hover,
.eduval-404 .search-submit:focus-visible,
.eduval-404 input[type="submit"]:hover,
.eduval-404 input[type="submit"]:focus-visible,
.eduval-404 button[type="submit"]:hover,
.eduval-404 button[type="submit"]:focus-visible {
  outline: none;
  transform: translateY(-1px);
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  box-shadow: 0 18px 28px rgba(229, 132, 49, 0.2);
}

@media (max-width: 767px) {
  .eduval-404-page {
    min-height: 0;
  }

  .eduval-404-page::before {
    opacity: 0.16;
    background-size: 140px 140px;
  }

  .eduval-404-page::after {
    top: auto;
    right: -84px;
    bottom: 80px;
    width: 180px;
    box-shadow:
      -44px 92px 0 0 rgba(229, 132, 49, 0.16),
      -12px 204px 0 0 rgba(38, 30, 80, 0.07);
  }

  .eduval-404__inner {
    padding: 28px 18px;
    border-radius: 20px;
  }

  .eduval-404 .search-form {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .eduval-404 .search-form label {
    max-width: none;
  }

  .eduval-404 .search-submit {
    width: 100%;
    margin-top: 8px;
  }

  .eduval-404 input[type="submit"],
  .eduval-404 button[type="submit"] {
    width: 100%;
    margin-top: 8px;
  }
}
