:root {
  --blue-900: #071f4d;
  --blue-800: #0a3475;
  --blue-700: #0d4ea6;
  --yellow-500: #ffd43b;
  --yellow-600: #f2b705;
  --ink: #101828;
  --muted: #5d6678;
  --line: #d8e2f0;
  --paper: #ffffff;
  --soft: #f4f7fb;
  --shadow: 0 18px 50px rgba(7, 31, 77, .12);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
}

img {
  max-width: 100%;
  user-drag: none;
  -webkit-user-drag: none;
}

.protected-content,
.protected-content * {
  user-select: none;
  -webkit-user-select: none;
}

.flag-ribbon {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1040;
  height: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.flag-ribbon span:first-child { background: var(--blue-700); }
.flag-ribbon span:last-child { background: var(--yellow-500); }

.official-header {
  position: sticky;
  top: 6px;
  z-index: 1030;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(10, 52, 117, .12);
  box-shadow: 0 8px 30px rgba(7, 31, 77, .08);
}

.official-brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: var(--blue-900);
  text-decoration: none;
  max-width: min(560px, 52vw);
}

.official-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.official-brand strong,
.official-brand small {
  display: block;
}

.official-brand strong {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.official-brand small {
  color: var(--muted);
  font-weight: 600;
  max-width: 48ch;
  font-size: .78rem;
  line-height: 1.2;
}

.official-brand.compact img {
  width: 48px;
  height: 48px;
}

.nav-link {
  color: var(--blue-900);
  font-weight: 700;
}

.nav-link:hover {
  color: var(--blue-700);
}

.official-cta,
.btn-primary {
  background: var(--blue-700);
  border-color: var(--blue-700);
  border-radius: 6px;
  font-weight: 800;
}

.btn-warning {
  border-radius: 6px;
  font-weight: 900;
  color: var(--blue-900);
  background: var(--yellow-500);
  border-color: var(--yellow-500);
}

.btn-outline-light {
  border-radius: 6px;
  font-weight: 800;
}

.menu-button {
  width: 46px;
  height: 42px;
  border: 1px solid var(--line);
  display: inline-grid;
  align-content: center;
  gap: 5px;
}

.menu-button span {
  display: block;
  height: 2px;
  background: var(--blue-900);
}

.state-offcanvas {
  background: #f8fbff;
}

.state-offcanvas .offcanvas-body {
  display: grid;
  align-content: start;
  gap: .45rem;
}

.state-offcanvas a,
.side-rail a,
.official-footer a {
  color: var(--blue-900);
  text-decoration: none;
  font-weight: 800;
}

.state-offcanvas a {
  padding: .85rem 1rem;
  border-left: 4px solid var(--yellow-500);
  background: #fff;
  box-shadow: 0 8px 24px rgba(7, 31, 77, .06);
}

.state-offcanvas .admin-link {
  background: var(--blue-700);
  color: #fff;
  border-left-color: var(--yellow-500);
}

.side-rail {
  position: fixed;
  z-index: 1020;
  left: 18px;
  top: 138px;
  width: 168px;
  flex-direction: column;
  gap: .35rem;
}

.side-rail a {
  font-size: .78rem;
  padding: .7rem .8rem;
  border-left: 4px solid var(--yellow-500);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 28px rgba(7, 31, 77, .1);
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 86px);
  display: flex;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 31, 77, .96), rgba(13, 78, 166, .9) 56%, rgba(255, 212, 59, .88)),
    url("/images/logo.png") center right 8% / 520px no-repeat;
  padding: 7rem 0 6rem;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255, 255, 255, .2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .2) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: moveGrid 18s linear infinite;
}

@keyframes moveGrid {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(44px, 44px, 0); }
}

.hero-section .container {
  position: relative;
}

.state-kicker,
.section-heading span {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--yellow-500);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .82rem;
}

.state-kicker::before,
.section-heading span::before {
  content: "";
  width: 42px;
  height: 3px;
  background: currentColor;
}

.hero-section h1 {
  max-width: 980px;
  margin: 1.1rem 0;
  font-size: clamp(2rem, 4.6vw, 4.25rem);
  line-height: 1.08;
  font-weight: 900;
}

.hero-title span,
.hero-title small {
  display: block;
}

.hero-title span {
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  line-height: .98;
}

.hero-title small {
  max-width: 900px;
  margin-top: .75rem;
  font-size: clamp(1.05rem, 2.2vw, 1.65rem);
  line-height: 1.2;
  font-weight: 800;
  color: rgba(255, 255, 255, .92);
}

.hero-lead {
  max-width: 720px;
  font-size: 1.16rem;
  color: rgba(255, 255, 255, .9);
}

.hero-actions {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-emblem {
  position: relative;
  padding: 2rem;
  text-align: center;
}

.hero-emblem img {
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .25));
  animation: emblemFloat 5s ease-in-out infinite;
}

@keyframes emblemFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.emblem-caption {
  margin-top: 1rem;
  color: var(--blue-900);
  background: var(--yellow-500);
  display: inline-block;
  padding: .55rem .9rem;
  border-radius: 4px;
  font-weight: 900;
}

.content-section,
.official-band,
.help-section {
  padding: 5.5rem 0;
}

.official-band {
  background: #fff;
  border-block: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: .5rem 0 0;
  font-weight: 900;
  color: var(--blue-900);
  font-size: clamp(1.9rem, 3vw, 3rem);
}

.section-heading.light h2,
.section-heading.light span {
  color: #fff;
}

.state-card,
.news-card,
.document-card,
.event-panel,
.contact-panel {
  height: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue-700);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.state-card,
.event-panel,
.contact-panel {
  padding: 1.5rem;
}

.state-card h3,
.news-card h3,
.document-card h3,
.event-panel h3 {
  color: var(--blue-900);
  font-weight: 900;
  font-size: 1.25rem;
}

.lead-copy {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.08rem;
}

.news-card {
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.news-card:hover,
.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 60px rgba(7, 31, 77, .18);
}

.news-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.news-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-photo-grid.image-count-1 {
  display: block;
}

.news-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.news-photo-button:focus-visible {
  outline: 3px solid var(--yellow-500);
  outline-offset: -3px;
}

.news-photo-button img {
  display: block;
  width: 100%;
  height: 180px;
  aspect-ratio: auto;
  object-fit: cover;
  transition: transform .2s ease, opacity .2s ease;
}

.news-photo-button:hover img {
  transform: scale(1.04);
  opacity: .92;
}

.news-photo-grid.image-count-1 .news-photo-button img {
  height: auto;
  aspect-ratio: 16 / 10;
}

.news-more-photos {
  position: absolute;
  right: .75rem;
  top: .75rem;
  z-index: 2;
  min-width: 44px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 6px;
  color: #fff;
  background: rgba(7, 31, 77, .82);
  font-weight: 900;
}

.news-body {
  padding: 1.35rem;
}

.watermark-wrap {
  position: relative;
  overflow: hidden;
}

.watermark-wrap span {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: .35rem .6rem;
  color: rgba(255, 255, 255, .9);
  background: rgba(7, 31, 77, .66);
  border: 1px solid rgba(255, 255, 255, .25);
  font-weight: 900;
  font-size: .78rem;
  text-transform: uppercase;
}

.service-grid,
.event-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1.5rem;
}

.service-grid span,
.event-lines span {
  padding: .9rem 1rem;
  background: #eef5ff;
  border-left: 4px solid var(--yellow-500);
  color: var(--blue-900);
  font-weight: 900;
}

.document-card {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.doc-type {
  display: inline-block;
  margin-bottom: .6rem;
  color: var(--blue-900);
  background: var(--yellow-500);
  padding: .2rem .55rem;
  border-radius: 3px;
  font-weight: 900;
}

.document-card iframe,
.doc-preview {
  width: 100%;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
}

.document-preview-button {
  width: 100%;
  height: 280px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #252525;
  cursor: zoom-in;
  overflow: hidden;
}

.document-preview-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #252525;
}

.doc-preview {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--blue-900);
  font-weight: 900;
}

.doc-preview-link {
  align-content: center;
  gap: .55rem;
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.doc-preview-link:hover,
.doc-preview-link:focus-visible {
  border-color: var(--blue-700);
  box-shadow: 0 16px 34px rgba(7, 31, 77, .12);
  transform: translateY(-2px);
}

.doc-preview-type {
  display: inline-grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-inline: auto;
  border: 3px solid var(--blue-700);
  border-radius: 8px;
  color: var(--blue-700);
  background: #fff;
  font-size: 1.05rem;
  font-weight: 900;
}

.doc-preview small {
  max-width: 320px;
  color: var(--muted);
  font-weight: 700;
}

.document-modal {
  display: grid;
  grid-template-rows: auto 1fr;
  background: #0b1733;
}

.document-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: #fff;
  background: var(--blue-900);
}

.document-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.document-modal-header p {
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-weight: 800;
}

.document-modal-viewer {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 1.25rem 5rem;
  overflow: auto;
  background: #252525;
}

.document-modal-viewer img {
  max-width: 100%;
  max-height: calc(100vh - 98px);
  object-fit: contain;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .35);
}

.document-nav {
  position: fixed;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 31, 77, .72);
  font-size: 2.5rem;
  line-height: 1;
  transform: translateY(-50%);
}

.document-nav:hover,
.document-nav:focus-visible {
  background: var(--blue-700);
}

.document-nav-prev {
  left: 1.25rem;
}

.document-nav-next {
  right: 1.25rem;
}

.document-nav[hidden] {
  display: none;
}

.document-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.public-photo {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.public-photo img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  min-height: 260px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  color: #fff;
  text-align: left;
  background: var(--blue-900);
  transition: transform .25s ease, box-shadow .25s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  opacity: .78;
}

.gallery-item span,
.gallery-item strong {
  position: absolute;
  left: 1rem;
  right: 1rem;
}

.gallery-item span {
  bottom: 3.4rem;
  color: var(--yellow-500);
  font-weight: 900;
}

.gallery-item strong {
  bottom: 1rem;
  font-size: 1.1rem;
}

.gallery-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 10, 28, .96);
  color: #fff;
  padding: 2rem;
}

.gallery-modal .btn-close {
  position: fixed;
  right: 1.5rem;
  top: 1.5rem;
  z-index: 2;
}

.gallery-modal img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
}

.gallery-modal-caption {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: min(780px, calc(100vw - 2rem));
  text-align: center;
  pointer-events: none;
}

.gallery-modal-caption h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
}

.gallery-modal-caption p {
  margin: .25rem 0 0;
  color: rgba(255, 255, 255, .76);
  font-weight: 800;
}

.gallery-nav {
  position: fixed;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  color: #fff;
  background: rgba(7, 31, 77, .72);
  font-size: 2.5rem;
  line-height: 1;
  transform: translateY(-50%);
}

.gallery-nav:hover,
.gallery-nav:focus-visible {
  background: var(--blue-700);
}

.gallery-nav-prev {
  left: 1.25rem;
}

.gallery-nav-next {
  right: 1.25rem;
}

.gallery-nav[hidden] {
  display: none;
}

.help-section {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
}

.requisites {
  display: grid;
  gap: .5rem;
  color: rgba(255, 255, 255, .92);
}

.requisites p,
.contact-details p {
  margin: 0;
}

.contact-details {
  display: grid;
  gap: .65rem;
  margin-bottom: 1.4rem;
}

.contact-details a {
  color: var(--blue-700);
  font-weight: 800;
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.qr-box {
  width: min(320px, 86vw);
  aspect-ratio: 1;
  margin-inline: auto;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #fff;
  border: 12px solid var(--yellow-500);
  box-shadow: 0 24px 56px rgba(3, 10, 28, .22);
}

.qr-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-caption {
  max-width: 320px;
  margin: 1rem auto 0;
  color: rgba(255, 255, 255, .9);
  text-align: center;
  font-weight: 800;
}

.anti-spam-form input[name="website"] {
  position: absolute;
  left: -9999px;
}

.anti-spam-form .form-control:disabled {
  background: #eef3fb;
}

.official-footer {
  padding: 3rem 0;
  color: rgba(255, 255, 255, .85);
  background: #061a40;
}

.official-footer h2 {
  color: var(--yellow-500);
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 900;
}

.official-footer a {
  display: block;
  color: #fff;
  margin-bottom: .4rem;
}

.official-footer .official-brand strong,
.official-footer .official-brand small {
  color: #fff;
}

.admin-page {
  min-height: 72vh;
  background: #f8fbff;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-tile {
  display: grid;
  gap: .6rem;
  height: 100%;
  padding: 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--yellow-500);
  border-radius: 8px;
  color: var(--blue-900);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.admin-tile strong {
  font-size: 1.25rem;
  font-weight: 900;
}

.admin-tile span {
  color: var(--muted);
}

.admin-table,
.admin-form {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-form {
  max-width: 860px;
}

.admin-login {
  max-width: 520px;
  margin: 0 auto;
}

.admin-login-form {
  max-width: none;
}

.admin-form label {
  margin-top: 1rem;
  margin-bottom: .35rem;
  color: var(--blue-900);
  font-weight: 900;
}

.form-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.admin-preview {
  display: block;
  max-width: 220px;
  border-radius: 8px;
  margin-top: 1rem;
  border: 1px solid var(--line);
}

.admin-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.admin-preview-grid .admin-preview {
  width: 140px;
  height: 100px;
  margin-top: 0;
  object-fit: cover;
}

.admin-photo-option {
  display: grid;
  gap: .45rem;
  margin: 0;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.admin-photo-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  color: #b42318;
  font-size: .88rem;
  font-weight: 900;
}

.admin-photo-option input {
  width: 16px;
  height: 16px;
}

@media (max-width: 991.98px) {
  .hero-section {
    min-height: auto;
    padding: 5rem 0 4rem;
  }

  .hero-emblem {
    padding: 0;
  }
}

@media (min-width: 1200px) {
  main > section .container {
    padding-left: 205px;
  }

  .hero-section h1 {
    font-size: clamp(2.4rem, 5vw, 4.6rem);
  }
}

@media (max-width: 575.98px) {
  .official-brand {
    max-width: calc(100vw - 92px);
  }

  .official-brand img {
    width: 46px;
    height: 46px;
  }

  .official-brand strong {
    font-size: .78rem;
  }

  .official-brand small {
    font-size: .62rem;
    line-height: 1.15;
  }

  .content-section,
  .official-band,
  .help-section {
    padding: 3.5rem 0;
  }

  .service-grid,
  .event-lines {
    grid-template-columns: 1fr;
  }
}
