/*
 * Project overrides on top of the Around theme (theme.min.css).
 *
 * The static design carried these rules as an inline <style> block in every
 * page's <head>; they live here so the public CSP can stay nonce-based without
 * needing 'unsafe-inline' for stylesheets we control.
 */

/* ── Page loader ─────────────────────────────────────────────────────────── */
.page-loading {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: all .4s .2s ease-in-out;
  background-color: #fff;
  opacity: 0;
  visibility: hidden;
  z-index: 9999;
}

[data-bs-theme="dark"] .page-loading {
  background-color: #121519;
}

.page-loading.active {
  opacity: 1;
  visibility: visible;
}

.page-loading-inner {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  text-align: center;
  transform: translateY(-50%);
  transition: opacity .2s ease-in-out;
  opacity: 0;
}

.page-loading.active > .page-loading-inner {
  opacity: 1;
}

.page-loading-inner > span {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: normal;
  color: #6f788b;
}

[data-bs-theme="dark"] .page-loading-inner > span {
  color: #fff;
  opacity: .6;
}

.page-spinner {
  display: inline-block;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: .75rem;
  vertical-align: text-bottom;
  background-color: #d7dde2;
  border-radius: 50%;
  opacity: 0;
  animation: spinner .75s linear infinite;
}

[data-bs-theme="dark"] .page-spinner {
  background-color: rgba(255, 255, 255, .25);
}

@keyframes spinner {
  0% {
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: none;
  }
}

/* ── Admin-authored rich text ────────────────────────────────────────────── */
/* Editors write these bodies in the admin's rich editor, so the markup is
   whatever the editor produces — give it sane vertical rhythm. */
.rich-text > *:last-child {
  margin-bottom: 0;
}

.rich-text p {
  margin-bottom: 1rem;
}

.rich-text ul,
.rich-text ol {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
}

.rich-text li {
  margin-bottom: .35rem;
}

.rich-text h2,
.rich-text h3,
.rich-text h4 {
  margin-top: 1.75rem;
  margin-bottom: .75rem;
}

.rich-text img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ar-border-radius, .5rem);
}

.rich-text table {
  width: 100%;
  margin-bottom: 1.25rem;
}

.rich-text iframe {
  max-width: 100%;
}

/* Service pages keep the design's "lead" weight on the first paragraph. */
.rich-text > p:first-child {
  font-size: 1.125rem;
}

/* ── Small fixes ─────────────────────────────────────────────────────────── */
/* Logo tiles keep their aspect ratio regardless of the uploaded file size. */
.bg-light.rounded-3 > img,
.bg-gray.rounded-4 > img {
  max-width: 100%;
  height: auto;
}

/* The service-group cards link their items; keep them readable. */
.card-body.servisa a {
  text-decoration: none;
}

.card-body.servisa a:hover p {
  text-decoration: underline;
}
