/* Gurugram Police awareness poster and image-search experience */
:root {
  --police-navy: #082b61;
  --police-blue: #0d3e7b;
  --police-red: #a90e18;
  --police-red-bright: #c41420;
  --poster-blue: #e4f1fa;
  --poster-white: #fbfdff;
  --ink: #132d4f;
  --muted: #66788e;
  --line: #c9d6e3;
  --shadow: 0 18px 60px rgba(8, 43, 97, 0.18);
  --ff-heading: "Oswald", "Roboto Condensed", Impact, sans-serif;
  --ff-condensed: "Roboto Condensed", "Roboto", sans-serif;
  --ff-body: "Roboto", Arial, sans-serif;
  --ff-devanagari: "Noto Sans Devanagari", "Mangal", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: #dce7f0;
  font-family: var(--ff-body);
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #f4b429;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 16px;
  color: #fff;
  background: var(--police-navy);
  border-radius: 6px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ── Site nav ────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  z-index: 100;
  top: 8px;
  right: 20px;
}

.site-nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav-list li {
  flex: 0 0 auto;
}

.nav-link {
  display: block;
  padding: 7px 13px;
  color: var(--police-navy);
  font-family: var(--ff-condensed);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  transition: color 180ms ease, background 180ms ease;
}

.nav-link:hover {
  color: #fff;
  background: var(--police-navy);
}

.nav-link.active {
  color: #fff;
  background: var(--police-red);
}

/* ── Viewport-fit shell ─────────────────────────────────────────── */
.awareness-page {
  position: relative;
  display: flex;
  width: 100%;
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
}

/* ── Poster canvas ──────────────────────────────────────────────── */
.police-poster {
  isolation: isolate;
  position: relative;
  display: flex;
  flex: 1 0 auto;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 21%, rgba(255, 255, 255, 0.98) 0 17%, rgba(244, 250, 255, 0.86) 36%, transparent 58%),
    linear-gradient(180deg, #dceefa 0%, #f8fbfe 47%, #eef6fb 72%, #dce8f0 100%);
  box-shadow: inset 0 -10px 38px rgba(8, 43, 97, 0.12);
  animation: poster-in 700ms ease-out both;
}

/* ── Watermark ──────────────────────────────────────────────────── */
.watermark-pattern {
  position: absolute;
  z-index: -3;
  inset: 0;
  background: url("/images/haryana_police.png") 55px 18px / clamp(96px, 13vw, 185px) repeat;
  filter: grayscale(1) sepia(0.18) hue-rotate(168deg) saturate(1.8);
  opacity: 0.045;
  pointer-events: none;
}

/* ── City art ───────────────────────────────────────────────────── */
.city-art {
  position: absolute;
  z-index: -2;
  top: 0;
  width: clamp(280px, 31vw, 440px);
  height: clamp(190px, 19.5vw, 275px);
  object-fit: cover;
  opacity: 0.92;
  pointer-events: none;
  user-select: none;
}

.city-art-left {
  left: 0;
  object-position: left top;
  -webkit-mask-image: linear-gradient(90deg, #000 0 78%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0 78%, transparent 100%);
}

.city-art-right {
  right: 0;
  object-position: right top;
  -webkit-mask-image: linear-gradient(270deg, #000 0 78%, transparent 100%);
  mask-image: linear-gradient(270deg, #000 0 78%, transparent 100%);
}

/* ── Header ─────────────────────────────────────────────────────── */
.poster-header {
  position: relative;
  z-index: 4;
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(14px, 1.8vw, 26px);
  text-align: center;
}

.police-crest {
  display: block;
  width: clamp(180px, 19vw, 268px);
  height: auto;
  border-radius: 49%;
  mix-blend-mode: multiply;
  object-fit: contain;
}

.poster-header h1 {
  margin: clamp(-3px, -0.2vw, 0px) 0 0;
  color: var(--police-navy);
  font-family: var(--ff-heading);
  font-size: clamp(40px, 4.4vw, 62px);
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 0.98;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.95);
}

.title-divider {
  display: grid;
  width: min(71.5vw, 1000px);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(10px, 1vw, 15px);
  margin-top: clamp(5px, 0.55vw, 9px);
}

.title-divider span {
  height: 2px;
  background: var(--police-red);
}

.title-divider b {
  color: var(--police-blue);
  font-size: clamp(18px, 1.75vw, 25px);
  line-height: 1;
}

/* ── Search categories ──────────────────────────────────────────── */
.identification-options {
  position: relative;
  z-index: 4;
  display: grid;
  width: min(72vw, 1010px);
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(24px, 3.2vw, 46px);
  margin-top: clamp(5px, 0.65vw, 10px);
}

.identity-option {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: clamp(13px, 1.5vw, 22px);
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 20px;
  cursor: pointer;
  text-align: left;
  transition: filter 220ms ease, transform 220ms ease;
}

.identity-option:hover {
  filter: drop-shadow(0 7px 8px rgba(8, 43, 97, 0.13));
  transform: translateY(-3px);
}

.option-icon {
  display: grid;
  width: clamp(104px, 10.4vw, 146px);
  height: clamp(104px, 10.4vw, 146px);
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  background: rgba(249, 252, 255, 0.76);
  border: clamp(2px, 0.2vw, 3px) solid var(--police-red);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.48);
  align-self: flex-start;
}

.option-icon img {
  display: block;
  width: 91%;
  height: 91%;
  object-fit: contain;
}

.identity-option-deadbody .option-icon img {
  width: 96%;
  height: 96%;
}

.option-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.option-title {
  color: var(--police-red);
  font-family: var(--ff-heading);
  font-size: clamp(27px, 2.9vw, 41px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.94;
  text-transform: uppercase;
}

.option-description {
  margin-top: clamp(5px, 0.55vw, 8px);
  color: var(--police-navy);
  font-family: var(--ff-devanagari);
  font-size: clamp(15px, 1.45vw, 20px);
  font-weight: 600;
  line-height: 1.27;
  white-space: nowrap;
}

.options-divider {
  width: 1px;
  min-height: clamp(130px, 13.7vw, 192px);
  background: linear-gradient(180deg, transparent, var(--police-blue) 12% 88%, transparent);
}

/* ── Contact block ──────────────────────────────────────────────── */
.contact-card {
  position: relative;
  z-index: 6;
  display: flex;
  width: min(39vw, 548px);
  min-width: 340px;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.3vw, 19px);
  margin-top: clamp(5px, 0.55vw, 8px);
  padding: clamp(7px, 0.75vw, 11px) clamp(12px, 1.4vw, 20px);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--police-red);
  border-radius: clamp(9px, 1vw, 14px);
  box-shadow: 0 9px 22px rgba(8, 43, 97, 0.11);
  transition: background-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.contact-card:hover {
  background: #fff;
  box-shadow: 0 14px 30px rgba(8, 43, 97, 0.18);
  transform: translateY(-2px);
}

.contact-phone {
  width: clamp(52px, 5vw, 70px);
  height: auto;
  flex: 0 0 auto;
}

.contact-copy {
  text-align: center;
  text-transform: uppercase;
}

.contact-copy p {
  margin: 0;
}

.contact-label {
  color: var(--police-blue);
  font-family: var(--ff-heading);
  font-size: clamp(19px, 1.9vw, 27px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 0.9;
}

.contact-name {
  color: var(--police-red-bright);
  font-family: var(--ff-heading);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.06;
}

.contact-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px clamp(9px, 1vw, 14px) 3px;
  color: #fff;
  background: var(--police-navy);
  border-radius: 4px;
  font-family: var(--ff-condensed);
  font-size: clamp(15px, 1.45vw, 20px);
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1.15;
}

.contact-numbers a {
  color: inherit;
  text-decoration: none;
}

.service-slogan {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 1vw, 14px);
  margin: clamp(3px, 0.45vw, 7px) 0 0;
  color: var(--police-navy);
  font-family: var(--ff-devanagari);
  font-size: clamp(20px, 2.15vw, 30px);
  font-weight: 600;
  line-height: 1.2;
}

.service-slogan span[aria-hidden] {
  color: var(--police-red);
  font-size: 0.7em;
}

/* ── Bottom scene ───────────────────────────────────────────────── */
.ground-scene {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(176px, 18.2vw, 255px);
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 0 33%, rgba(207, 223, 234, 0.46) 50%, rgba(161, 181, 198, 0.3) 51%, rgba(209, 220, 228, 0.8) 100%);
  pointer-events: none;
}

.ground-skyline {
  position: absolute;
  right: 0;
  bottom: 38%;
  left: 0;
  height: 43%;
  opacity: 0.25;
  background:
    linear-gradient(90deg,
      transparent 0 1%, #32688c 1% 2.1%, transparent 2.1% 3.2%, #32688c 3.2% 4.2%, transparent 4.2% 5.5%,
      #32688c 5.5% 7.5%, transparent 7.5% 9%, #32688c 9% 9.8%, transparent 9.8% 12%, #32688c 12% 14.8%,
      transparent 14.8% 17%, #32688c 17% 18.4%, transparent 18.4% 20%, #32688c 20% 22.7%, transparent 22.7% 76%,
      #32688c 76% 78.4%, transparent 78.4% 80%, #32688c 80% 81.2%, transparent 81.2% 84%, #32688c 84% 87%,
      transparent 87% 89%, #32688c 89% 90.4%, transparent 90.4% 92%, #32688c 92% 94%, transparent 94% 96%,
      #32688c 96% 98%, transparent 98%);
  filter: blur(0.2px);
}

.police-vehicle,
.police-officer {
  position: absolute;
  bottom: 0;
  display: block;
  height: auto;
  user-select: none;
}

.police-vehicle {
  z-index: 2;
  width: clamp(300px, 29.25vw, 410px);
  filter: drop-shadow(0 8px 5px rgba(19, 42, 65, 0.2));
}

.police-vehicle-left {
  left: -1px;
}

.police-vehicle-right {
  right: -1px;
}

.police-officer {
  z-index: 3;
  left: 50%;
  width: clamp(110px, 12vw, 168px);
  transform: translateX(-50%);
  filter: drop-shadow(0 6px 5px rgba(19, 42, 65, 0.2));
}

/* ── Social strip ───────────────────────────────────────────────── */
.social-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  min-height: 31px;
  color: #fff;
  background: var(--police-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.social-footer-inner {
  display: flex;
  width: min(100% - 32px, 920px);
  min-height: 31px;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 24px);
  margin: 0 auto;
}

.social-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: clamp(12px, 1.15vw, 16px);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, transform 180ms ease;
}

.social-footer a:hover {
  color: #f6ca56;
  transform: translateY(-1px);
}

.social-footer img {
  width: clamp(18px, 1.8vw, 25px);
  height: clamp(18px, 1.8vw, 25px);
  transition: opacity 180ms ease;
}

.social-footer i {
  width: 1px;
  height: 23px;
  background: rgba(255, 255, 255, 0.55);
}

/* ── Image search dialog ────────────────────────────────────────── */
.search-dialog {
  width: min(1040px, calc(100% - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.search-dialog::backdrop {
  background: rgba(3, 26, 58, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.search-dialog[open] {
  animation: dialog-in 260ms ease-out both;
}

.dialog-shell {
  position: relative;
  display: flex;
  height: min(820px, calc(100dvh - 32px));
  flex-direction: column;
  padding: clamp(20px, 3vw, 34px);
  background:
    radial-gradient(circle at 100% 0, rgba(13, 62, 123, 0.1), transparent 33%),
    #f6f9fc;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: inherit;
  overflow: hidden;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-shrink: 0;
}

.dialog-eyebrow {
  margin: 0 0 3px;
  color: var(--police-red);
  font-family: var(--ff-condensed);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dialog-header h2 {
  margin: 0;
  color: var(--police-navy);
  font-family: var(--ff-heading);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
  text-transform: uppercase;
}

.dialog-close {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--police-navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.dialog-close:hover {
  color: var(--police-red);
  border-color: var(--police-red);
  transform: rotate(4deg);
}

.search-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.search-card {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: clamp(16px, 2.3vw, 24px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(8, 43, 97, 0.07);
  overflow: hidden;
}

.search-card h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 15px;
  color: var(--police-navy);
  font-family: var(--ff-condensed);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-card h3 i {
  color: var(--police-red);
}

#searchForm {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.drop-zone {
  position: relative;
  display: grid;
  min-height: 0;
  flex: 1;
  place-items: center;
  overflow: hidden;
  background: #f0f5f9;
  border: 2px dashed #a7b8c9;
  border-radius: 14px;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
  background: #eaf3fb;
  border-color: var(--police-blue);
  box-shadow: inset 0 0 0 3px rgba(13, 62, 123, 0.06);
}

.drop-zone.has-file {
  background: #12243c;
  border-style: solid;
  border-color: var(--police-blue);
  cursor: default;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-zone-empty {
  padding: 25px;
  text-align: center;
}

.drop-zone-empty > i {
  display: block;
  margin-bottom: 9px;
  color: #7e95ac;
  font-size: 48px;
}

.drop-zone-empty p {
  margin: 0 0 10px;
  color: #455d76;
  font-size: 15px;
  font-weight: 500;
}

.drop-zone-empty small {
  display: block;
  margin-top: 11px;
  color: #7890a7;
  font-size: 12px;
}

.browse-button {
  padding: 8px 15px;
  color: #fff;
  background: var(--police-blue);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.preview-panel {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.drop-zone.has-file .drop-zone-empty {
  display: none;
}

.drop-zone.has-file .preview-panel {
  display: flex;
}

.preview-panel > img {
  width: 100%;
  min-height: 0;
  flex: 1;
  background: #12243c;
  object-fit: contain;
}

.preview-details {
  position: relative;
  display: flex;
  min-height: 54px;
  flex-direction: column;
  justify-content: center;
  padding: 8px 52px 8px 13px;
  background: #fff;
}

.preview-details > span {
  overflow: hidden;
  color: var(--police-navy);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-details small {
  color: var(--muted);
  font-size: 11px;
}

.preview-details button {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--police-red);
  background: #fdebed;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
}

.error-alert {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 11px;
  color: #9e111b;
  background: #fff0f1;
  border: 1px solid #f2c0c4;
  border-radius: 8px;
  font-size: 13px;
}

.error-alert.active {
  display: flex;
}

.identify-button,
.reset-button {
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
  color: #fff;
  background: var(--police-red);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
  flex-shrink: 0;
  transition: box-shadow 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.identify-button:hover:not(:disabled),
.reset-button:hover {
  box-shadow: 0 8px 20px rgba(169, 14, 24, 0.24);
  transform: translateY(-1px);
}

.identify-button:disabled {
  cursor: not-allowed;
  opacity: 0.43;
}

.button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  vertical-align: -3px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.identify-button.loading .button-spinner {
  display: inline-block;
}

.results-card {
  overflow: hidden;
}

.results-empty,
.no-results {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #7e95ac;
  text-align: center;
}

.results-empty > i,
.no-results > i {
  margin-bottom: 12px;
  color: #a9bac9;
  font-size: 42px;
}

.results-empty p,
.no-results p {
  max-width: 260px;
  margin: 0;
  line-height: 1.55;
}

.no-results,
.results-area,
.reset-button {
  display: none;
}

.no-results.active {
  display: flex;
}

.results-area.active {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.reset-button.active {
  display: block;
  background: var(--police-blue);
}

.results-scroll {
  min-height: 0;
  overflow-y: auto;
  padding-right: 5px;
}

.result-card {
  margin-bottom: 10px;
  padding: 13px 14px;
  background: #f8fbfd;
  border: 1px solid #d7e1e9;
  border-left: 4px solid var(--police-blue);
  border-radius: 9px;
  animation: result-in 300ms ease both;
}

.result-delay-1 { animation-delay: 50ms; }
.result-delay-2 { animation-delay: 100ms; }
.result-delay-3 { animation-delay: 150ms; }
.result-delay-4 { animation-delay: 200ms; }
.result-delay-5 { animation-delay: 250ms; }

.result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.result-rank {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--police-navy);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.result-name {
  margin: 0;
  color: var(--police-navy);
  font-size: 15px;
}

.result-detail {
  margin-top: 2px;
  color: #526a81;
  font-size: 12px;
  line-height: 1.4;
}

.result-score {
  display: inline-block;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.score-high { color: #087345; background: #e6f7ef; }
.score-medium { color: #0d5492; background: #e8f3fc; }
.score-low { color: #a5111c; background: #fdecee; }

/* ── Loading overlay ────────────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  z-index: 1500;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
  background: rgba(3, 26, 58, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  text-align: center;
}

.loading-content h2 {
  margin: 18px 0 5px;
  font-family: var(--ff-heading);
  font-size: 28px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.loading-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.scan-mark {
  position: relative;
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  margin: 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

.scan-mark::before {
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-bottom-color: #fff;
  border-radius: 50%;
  content: "";
  animation: spin 1.7s linear infinite reverse;
}

.scan-mark i {
  font-size: 29px;
  animation: counter-spin 1.1s linear infinite;
}

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes poster-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(15px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes result-in {
  from { opacity: 0; transform: translateX(-7px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes counter-spin {
  to { transform: rotate(-360deg); }
}

/* ── Tablet ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .city-art {
    width: 36%;
    height: 200px;
  }

  .police-crest {
    width: 178px;
  }

  .poster-header h1 {
    font-size: 50px;
  }

  .identification-options {
    width: min(92%, 760px);
    gap: 20px;
  }

  .option-icon {
    width: 100px;
    height: 100px;
  }

  .option-title {
    font-size: 27px;
  }

  .option-description {
    font-size: 14px;
  }

  .contact-card {
    width: 410px;
  }

  .service-slogan {
    font-size: 20px;
  }

  .ground-scene {
    height: 180px;
  }

  .police-vehicle {
    width: 290px;
  }

  .social-footer-inner {
    gap: 15px;
  }

  .social-footer a {
    font-size: 12px;
  }
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .police-poster {
    padding-bottom: 0;
    background:
      radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.98), transparent 34%),
      linear-gradient(180deg, #e0eff9 0%, #fbfdff 53%, #e1ecf3 100%);
  }

  .watermark-pattern {
    background-position: 15px 10px;
    background-size: 108px;
  }

  .city-art {
    width: 48%;
    height: 155px;
    opacity: 0.62;
  }

  .poster-header {
    padding-top: 14px;
  }

  .police-crest {
    width: 140px;
  }

  .poster-header h1 {
    margin-top: 2px;
    font-size: clamp(38px, 10.5vw, 48px);
    letter-spacing: 0.015em;
  }

  .title-divider {
    width: min(88%, 520px);
  }

  .identification-options {
    width: min(92%, 540px);
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  .identity-option {
    min-height: 154px;
    gap: 20px;
    justify-content: center;
    padding: 8px 10px;
  }

  .option-icon {
    width: 114px;
    height: 114px;
    align-self: center;
  }

  .option-title {
    font-size: 30px;
  }

  .option-description {
    font-size: 14px;
  }

  .options-divider {
    width: 78%;
    min-height: 1px;
    height: 1px;
    justify-self: center;
    background: linear-gradient(90deg, transparent, var(--police-blue) 15% 85%, transparent);
  }

  .contact-card {
    width: min(calc(100% - 32px), 440px);
    min-width: 0;
    margin-top: 14px;
  }

  .contact-label {
    font-size: 18px;
  }

  .contact-name {
    font-size: clamp(27px, 8vw, 34px);
  }

  .contact-numbers {
    gap: 6px;
    font-size: clamp(13px, 3.8vw, 16px);
  }

  .contact-phone {
    width: 47px;
  }

  .service-slogan {
    gap: 7px;
    margin-top: 10px;
    font-size: clamp(17px, 5vw, 21px);
  }

  .service-slogan span {
    width: 25px;
  }

  .ground-scene {
    height: 180px;
  }

  .police-vehicle {
    width: min(55vw, 270px);
  }

  .police-vehicle-left {
    left: -9vw;
  }

  .police-vehicle-right {
    right: -9vw;
  }

  .police-officer {
    width: 92px;
  }

  .social-footer {
    padding: 12px 0;
  }

  .social-footer-inner {
    display: grid;
    width: min(100% - 28px, 500px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
  }

  .social-footer a {
    justify-content: flex-start;
    font-size: 11px;
    white-space: normal;
  }

  .social-footer i {
    display: none;
  }

  .search-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Small mobile ───────────────────────────────────────────────── */
@media (max-width: 430px) {
  .city-art {
    width: 52%;
    height: 140px;
    opacity: 0.48;
  }

  .identity-option {
    flex-direction: column;
    gap: 7px;
    padding: 12px 8px;
    text-align: center;
  }

  .option-icon {
    width: 105px;
    height: 105px;
  }

  .option-title {
    font-size: 27px;
  }

  .option-description {
    font-size: 13.5px;
  }

  .contact-card {
    gap: 7px;
    padding-inline: 8px;
  }

  .contact-phone {
    width: 39px;
  }

  .contact-label {
    font-size: 15px;
  }

  .contact-name {
    font-size: 27px;
  }

  .contact-numbers {
    font-size: 12px;
  }

  .service-slogan span[aria-hidden] {
    display: none;
  }

  .ground-scene {
    height: 160px;
  }

  .police-vehicle {
    width: 60vw;
  }

  .police-vehicle-left {
    left: -17vw;
  }

  .police-vehicle-right {
    right: -17vw;
  }

  .police-officer {
    width: 80px;
  }

  .social-footer-inner {
    grid-template-columns: 1fr;
  }

  .social-footer a {
    justify-content: center;
  }

  .search-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 15px;
  }

  .dialog-shell {
    padding: 16px;
    height: calc(100dvh - 16px);
  }

  .dialog-header {
    margin-bottom: 16px;
  }

  .search-card {
    padding: 14px;
  }
}

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