/* Nuxt-rendered content compatibility layer for the legacy default template. */
.category-search {
  display: flex;
  gap: 10px;
  margin: 0 0 20px;
}

.category-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 14px;
}

.category-search button {
  padding: 0 22px;
  border: none;
  border-radius: 4px;
  background: #b91c2e;
  color: #fff;
  cursor: pointer;
}

.article-cover {
  margin: 0 0 24px;
}

.article-cover img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.rich-text img,
.article-content img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain;
}

.article-content {
  max-width: 100%;
  overflow-x: auto;
  word-break: break-word;
}

.article-content figure {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.article-content table,
.article-content iframe,
.article-content video,
.article-content embed,
.article-content object {
  max-width: 100% !important;
}

.article-content table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.single-page-content section + section {
  margin-top: 28px;
}

.pagination li {
  display: inline-block;
}

/* Header stacking fixes for dropdowns over Nuxt page content. */
.main-header {
  z-index: 3000;
}

.nav-item {
  z-index: 1;
}

.nav-item:hover,
.nav-item:focus-within {
  z-index: 3001;
}

.dropdown-menu {
  z-index: 3002;
}

/* Keep SSR content visible until the client plugin enables scroll animations. */
html:not(.legacy-animations-active) .anim-fade-up,
html:not(.legacy-animations-active) .anim-fade-left,
html:not(.legacy-animations-active) .anim-fade-right,
html:not(.legacy-animations-active) .anim-fade-scale,
html:not(.legacy-animations-active) .anim-fade-down {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  animation: none !important;
  will-change: auto;
}

/* Rich-text/custom single-page blocks generated from CMS content. */
.custom-image-text {
  display: grid;
  grid-template-columns: minmax(220px, 38%) 1fr;
  gap: 28px;
  align-items: start;
}

.custom-image-text img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.custom-contact-box {
  padding: 24px;
  background: #f8f8f8;
  border-left: 4px solid #b91c2e;
}

.custom-contact-box ul {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.custom-contact-box li {
  display: flex;
  gap: 12px;
  line-height: 1.7;
}

.custom-contact-box span {
  flex: 0 0 44px;
  color: #b91c2e;
  font-weight: 700;
}

.custom-map-box {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 180px;
  padding: 28px;
  background: linear-gradient(135deg, #f5f5f5 0%, #fff 100%);
  border: 1px solid #e8e8e8;
}

.map-pin {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #b91c2e;
  color: #fff;
  font-size: 22px;
}

.custom-form {
  display: grid;
  gap: 18px;
  max-width: 720px;
  padding: 28px;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.custom-form-row {
  display: grid;
  gap: 8px;
}

.custom-form-row label {
  font-weight: 700;
  color: #333;
}

.custom-form-row em {
  margin-left: 4px;
  color: #b91c2e;
  font-style: normal;
}

.custom-form input,
.custom-form select,
.custom-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  background: #fff;
  color: #222;
  font-size: 14px;
}

.custom-form textarea {
  min-height: 120px;
  resize: vertical;
}

.custom-form-captcha__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: center;
}

.custom-form-captcha__body img,
.custom-form-captcha__body button {
  width: 132px;
  height: 44px;
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  background: #f8f8f8;
  object-fit: cover;
}

.custom-form-captcha__body img {
  cursor: pointer;
}

.custom-form-captcha__body button {
  color: #b91c2e;
  font-weight: 700;
  cursor: pointer;
}

.custom-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.custom-choice-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
}

.custom-choice-group input {
  width: auto;
}

.custom-form-submit {
  justify-self: start;
  min-width: 140px;
  padding: 12px 22px;
  border: none;
  border-radius: 4px;
  background: #b91c2e;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.custom-form-submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.custom-form-message {
  margin: 0;
  color: #b91c2e;
  font-weight: 700;
}

/* The Vue template wraps ticker items so CSS can animate the full repeated track. */
.ticker-scroll {
  transform: none !important;
}

.ticker-track {
  display: inline-flex;
  width: max-content;
  align-items: center;
  white-space: nowrap;
  animation: zero-cms-ticker-scroll 28s linear infinite;
  will-change: transform;
}

.ticker-scroll:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-scroll a {
  display: inline-block;
  color: #fff;
}

.ticker-scroll a:hover {
  color: #fff;
  text-decoration: underline;
}

@keyframes zero-cms-ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .category-search {
    flex-direction: column;
  }

  .category-search button {
    min-height: 40px;
  }

  .custom-image-text,
  .custom-map-box {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .custom-form {
    padding: 20px;
  }

  .custom-form-captcha__body {
    grid-template-columns: 1fr;
  }
}
