:root {
  --site-bg: #f8f3e9;
  --site-ink: #142338;
  --site-muted: #596273;
  --site-blue: #0e3b84;
  --site-blue-dark: #082a60;
  --site-border: #ded7ca;
  --site-card-shadow: 0 12px 30px rgba(31, 28, 21, 0.08);
  --site-font: "Trebuchet MS", "Segoe UI", Tahoma, Arial, sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--site-bg);
  color: #1f1f1f;
  font-family: var(--site-font);
  font-size: 17px;
  line-height: 1.7;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--site-blue);
}

a:hover,
a:focus {
  color: var(--site-blue-dark);
}

img {
  max-width: 100%;
  height: auto;
}

#container {
  background: #fff;
  min-height: 100vh;
  padding-inline: clamp(0.75rem, 2vw, 1.5rem);
}

.site-header {
  padding: 0.75rem 0 0.85rem;
  border-bottom: 1px solid #e4dfd6;
}

.site-header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-logo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 190px;
  object-fit: contain;
}

.site-nav {
  background: var(--site-blue);
  border-radius: 0.45rem;
  padding: 0.25rem 0.6rem;
}

.site-nav .navbar-brand,
.site-nav .nav-link,
.site-nav .navbar-toggler {
  color: #fff;
}

.site-nav .nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding-inline: 0.85rem;
  border-radius: 0.35rem;
  font-weight: 600;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus,
.site-nav .nav-link.show {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.site-nav .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.45);
}

.site-nav .navbar-toggler:focus {
  box-shadow: 0 0 0 0.18rem rgba(255, 255, 255, 0.28);
}

.site-nav .navbar-toggler-icon {
  filter: invert(1) grayscale(1) brightness(2);
}

.site-nav .dropdown-menu {
  min-width: 16rem;
  max-width: min(92vw, 24rem);
  padding: 0.4rem;
  border: 1px solid #dce1eb;
  border-radius: 0.4rem;
  box-shadow: 0 12px 28px rgba(17, 25, 40, 0.13);
}

.site-nav .dropdown-item {
  color: #1d2330;
  border-radius: 0.25rem;
  padding: 0.5rem 0.65rem;
  line-height: 1.3;
  white-space: normal;
}

.site-nav .dropdown-item.small {
  color: #526070;
  font-size: 0.92rem;
}

.site-nav .dropdown-item:hover,
.site-nav .dropdown-item:focus {
  color: var(--site-blue-dark);
  background: #f2f5fb;
}

.site-main {
  display: block;
}

#centro,
#colonna-s {
  float: none;
  width: 100%;
  background: #fff;
}

#colonna-s {
  display: none;
}

.site-footer {
  margin-top: 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid #e4dfd6;
  text-align: center;
  color: var(--site-muted);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--site-ink);
  line-height: 1.25;
}

.content-header {
  max-width: 82ch;
  margin-inline: auto;
}

.content-prose {
  max-width: 78ch;
  margin-inline: auto;
  font-size: 1rem;
  line-height: 1.75;
}

.content-prose p,
.content-prose li {
  color: #1f1f1f;
}

.content-prose img {
  display: block;
  max-width: min(100%, 680px);
  height: auto;
  margin: 1rem auto;
}

.home-hero,
.list-grid-item {
  border: 1px solid var(--site-border) !important;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: var(--site-card-shadow);
}

.home-hero {
  padding: clamp(0.85rem, 2vw, 1.4rem) !important;
}

.home-hero-grid {
  display: block;
}

.home-hero-visual {
  margin-bottom: 0;
}

.home-hero-visual a,
.home-hero-visual button,
.list-grid-media a,
.list-grid-media button,
.gallery-tile {
  display: block;
}

.image-modal-trigger,
.gallery-tile {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.image-modal-trigger:focus-visible,
.gallery-tile:focus-visible {
  outline: 3px solid rgba(14, 59, 132, 0.35);
  outline-offset: 3px;
}

.home-hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 360px;
  object-fit: cover;
  object-position: center 36%;
  border: 1px solid #d4cbbb;
  border-radius: 0.35rem;
}

.home-hero-copy .content-prose {
  max-width: 82ch;
}

.list-grid-item {
  padding: clamp(0.85rem, 1.8vw, 1.15rem) !important;
}

.list-grid-media {
  width: 100%;
  height: auto;
  float: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.list-grid-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 220px;
  object-fit: cover;
  object-position: center;
  border: 1px solid #d4cbbb;
  border-radius: 0.35rem;
}

.content-card .list-grid-media {
  display: flex;
  justify-content: center;
  background: #f7f4ee;
  border: 1px solid #d4cbbb;
  border-radius: 0.35rem;
  padding: clamp(0.45rem, 1.5vw, 0.85rem);
}

.content-card .list-grid-media img {
  width: auto;
  max-width: min(100%, 760px);
  max-height: 420px;
  aspect-ratio: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0.25rem;
}

.list-grid-copy {
  max-width: 78ch;
  margin-inline: 0;
}

.leggi_tutto a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}

#titolo_cat {
  --bs-breadcrumb-divider-color: #7f8793;
  color: var(--site-muted);
  font-size: 0.95rem;
}

#bread {
  color: #7f8793;
}

#colonna_gallery {
  width: 100%;
  margin-top: 1.25rem;
}

.gallery-tile {
  overflow: hidden;
  border: 1px solid #dde2ec;
  border-radius: 0.45rem;
  background: #fff;
  box-shadow: 0 6px 16px rgba(17, 25, 40, 0.07);
}

.gallery-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 160ms ease;
}

.gallery-tile:hover img,
.gallery-tile:focus-visible img {
  transform: scale(1.03);
}

.image-modal .modal-body,
.gallery-modal .modal-body {
  background: #111;
}

.image-modal .modal-body img,
.gallery-modal .carousel-item img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.gallery-modal .carousel-caption {
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72));
}

.gallery-modal .carousel-caption p {
  margin: 0;
}

.home-section-title {
  color: var(--site-muted);
  font-weight: 600;
}

.content-prose .home-section-title {
  margin-top: 1.35rem;
  margin-bottom: 0.75rem;
}

.pager-wrap {
  margin: 1.35rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ece6dc;
}

.pager-total {
  margin-bottom: 0.65rem;
  text-align: center;
  color: var(--site-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.pager-wrap .page-link {
  min-width: 2.5rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: #d7deec;
  border-radius: 0.4rem !important;
  color: var(--site-blue);
  font-weight: 700;
}

.pager-wrap .page-link:hover,
.pager-wrap .page-link:focus {
  color: #fff;
  background: var(--site-blue);
  border-color: var(--site-blue);
}

.pager-wrap .page-item.active .page-link {
  color: #fff;
  background: var(--site-blue);
  border-color: var(--site-blue);
}

@media (max-width: 991.98px) {
  #container {
    max-width: 100%;
    padding-inline: 0.75rem;
  }

  .site-logo {
    max-height: 150px;
  }

  .site-nav .navbar-nav {
    padding-top: 0.4rem;
  }

  .site-nav .dropdown-menu {
    padding: 0.35rem;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.22);
  }

  .site-nav .dropdown-item {
    padding-block: 0.6rem;
  }

  .home-hero-visual img {
    aspect-ratio: 4 / 3;
    max-height: 260px;
  }

  .list-grid-media {
    margin-bottom: 1rem;
  }

  .content-card .list-grid-media img {
    max-height: 320px;
  }
}

@media (max-width: 430px) {
  body {
    font-size: 16px;
  }

  #container {
    padding-inline: 0.5rem;
  }
}
