:root {
  --nr-navy: hsl(210 55% 28%);
  --nr-navy-deep: hsl(210 58% 20%);
  --nr-teal: hsl(195 60% 45%);
  --nr-teal-dark: hsl(195 65% 38%);
  --nr-teal-soft: hsl(195 45% 92%);
  --nr-cream: #f8f6f2;
  --nr-surface: #ffffff;
  --nr-surface-alt: #f8fafc;
  --nr-border: rgba(30, 58, 95, 0.12);
  --nr-text: hsl(215 26% 16%);
  --nr-muted: hsl(215 12% 42%);
  --nr-shadow: 0 16px 48px rgba(20, 40, 70, 0.12);
  --nr-shadow-soft: 0 10px 30px rgba(20, 40, 70, 0.08);
  --nr-radius: 24px;
  --nr-radius-sm: 18px;
  --nr-container: 1320px;
  --nr-container-narrow: 860px;
  --nr-display: "Cormorant Garamond", Georgia, serif;
  --nr-body: "Montserrat", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--nr-body);
  color: var(--nr-text);
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fb 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.admin-bar .nr-site-header {
  top: 50px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(calc(100% - 32px), var(--nr-container));
  margin: 0 auto;
}

.container--narrow {
  width: min(calc(100% - 32px), var(--nr-container-narrow));
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.custom-logo {
  max-height: 56px;
  width: auto;
}

.site-content {
  min-height: 60vh;
}

.nr-site-header,
.nr-site-header * {
  box-sizing: border-box;
}

.nr-site-header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 0 18px;
  pointer-events: none;
}

.nr-header-shell {
  max-width: var(--nr-container);
  margin: 0 auto;
  min-height: 76px;
  padding: 12px 18px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition:
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    min-height 0.28s ease;
  pointer-events: auto;
}

.nr-site-header.is-scrolled .nr-header-shell {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(30, 58, 95, 0.12);
  box-shadow: var(--nr-shadow);
  min-height: 72px;
}

.nr-brand,
.nr-brand--footer {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nr-brand-logo {
  width: auto;
  height: 52px;
  object-fit: contain;
}

.nr-site-header.is-scrolled .nr-brand-logo {
  filter:
    brightness(0) saturate(100%)
    invert(22%) sepia(55%) saturate(600%) hue-rotate(185deg) brightness(70%)
    drop-shadow(0 1px 3px rgba(30,58,95,.15));
}

.nr-nav {
  display: flex;
  align-items: center;
}

.nr-nav-list,
.nr-nav-mobile__list,
.nr-footer-nav,
.nr-footer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nr-nav-list a,
.nr-nav-mobile__list a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.nr-nav-list a:hover,
.nr-nav-mobile__list a:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nr-site-header.is-scrolled .nr-nav-list a {
  color: var(--nr-navy);
}

.nr-site-header.is-scrolled .nr-nav-list a:hover {
  background: rgba(63, 169, 201, 0.1);
}

/* ── Sottomenu WordPress (classe .sub-menu generata da wp_nav_menu) ── */
.nr-nav-list li { position: relative; }

/* Nascosto di default */
.nr-nav-list .sub-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(20,40,70,.16), 0 0 0 1px rgba(30,58,95,.06);
  padding: 8px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  transform: translateX(-50%) translateY(-6px);
}

/* Visibile su hover del parent */
.nr-nav-list li:hover > .sub-menu,
.nr-nav-list li:focus-within > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Link nei sottomenu */
.nr-nav-list .sub-menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--nr-navy);
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

.nr-nav-list .sub-menu a:hover {
  background: var(--nr-teal-soft);
  color: var(--nr-teal);
  transform: none;
}

/* Header scrolled — link sottomenu stessi colori */
.nr-site-header.is-scrolled .nr-nav-list .sub-menu a {
  color: var(--nr-navy);
}

.nr-site-header.is-scrolled .nr-nav-list .sub-menu a:hover {
  background: var(--nr-teal-soft);
  color: var(--nr-teal);
}

/* Freccia indicatore sottomenu sul parent */
.nr-nav-list .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
  opacity: .6;
}

.nr-nav-list .menu-item-has-children:hover > a::after {
  transform: rotate(-135deg) translateY(-2px);
}

.nr-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nr-lang-switcher,
.nr-lang-list,
.nr-mobile-lang {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nr-lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 42px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
}

.nr-lang-pill.is-current {
  background: rgba(255, 255, 255, 0.90);
  color: var(--nr-navy);
  cursor: default;
  pointer-events: none;
}

.nr-lang-pill:not(.is-current):hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.nr-site-header.is-scrolled .nr-lang-pill {
  background: rgba(63, 169, 201, 0.12);
  color: var(--nr-navy);
}

.nr-site-header.is-scrolled .nr-lang-pill.is-current {
  background: var(--nr-teal);
  color: #fff;
}

.nr-site-header.is-scrolled .nr-lang-pill:not(.is-current):hover {
  background: rgba(63, 169, 201, 0.28);
}

.nr-header-cta,
.nr-footer-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--nr-teal), var(--nr-teal-dark));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  box-shadow: 0 14px 30px rgba(63, 169, 201, 0.22);
  transition:
    transform 0.22s ease,
    filter 0.22s ease,
    box-shadow 0.22s ease;
}

.nr-header-cta:hover,
.nr-footer-cta:hover,
.button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.nr-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  padding: 0;
  position: relative;
}

.nr-menu-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition:
    transform 0.24s ease,
    opacity 0.24s ease,
    top 0.24s ease,
    background 0.24s ease;
}

.nr-menu-toggle span:nth-child(1) {
  top: 16px;
}

.nr-menu-toggle span:nth-child(2) {
  top: 22px;
}

.nr-menu-toggle span:nth-child(3) {
  top: 28px;
}

.nr-site-header.is-scrolled .nr-menu-toggle {
  background: rgba(63, 169, 201, 0.12);
}

.nr-site-header.is-scrolled .nr-menu-toggle span {
  background: var(--nr-navy);
}

.nr-site-header.menu-open .nr-menu-toggle span:nth-child(1) {
  top: 22px;
  transform: rotate(45deg);
}

.nr-site-header.menu-open .nr-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.nr-site-header.menu-open .nr-menu-toggle span:nth-child(3) {
  top: 22px;
  transform: rotate(-45deg);
}

.nr-mobile-panel {
  max-width: var(--nr-container);
  margin: 10px auto 0;
  padding: 0;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(30, 58, 95, 0.12);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--nr-shadow);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    max-height 0.28s ease,
    opacity 0.24s ease,
    transform 0.24s ease,
    padding 0.24s ease;
  pointer-events: auto;
}

.nr-site-header.menu-open .nr-mobile-panel {
  max-height: 100dvh;
  opacity: 1;
  transform: translateY(0);
  padding: 14px;
}

.nr-nav-mobile {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nr-nav-mobile__list {
  flex-direction: column;
  gap: 6px;
}

.nr-nav-mobile__list a {
  width: 100%;
  color: var(--nr-navy);
}

.nr-mobile-cta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--nr-teal), var(--nr-teal-dark));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.page-section {
  padding: 96px 0;
}

.page-entry,
.entry-card {
  padding: 34px;
  border-radius: var(--nr-radius);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--nr-border);
  box-shadow: var(--nr-shadow-soft);
}

.page-entry__header h1,
.entry-card__title {
  margin: 0;
  font-family: var(--nr-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 0.95;
  color: var(--nr-navy);
}

.page-entry__content,
.entry-card__content {
  margin-top: 20px;
  color: var(--nr-muted);
  line-height: 1.8;
}

.entry-card + .entry-card {
  margin-top: 22px;
}

.nr-site-footer {
  margin-top: 0;
  background:
    radial-gradient(circle at top left, rgba(63, 169, 201, 0.12), transparent 28%),
    linear-gradient(180deg, hsl(213 42% 16%) 0%, hsl(214 47% 12%) 100%);
  color: rgba(255, 255, 255, 0.82);
}

.nr-footer-top {
  padding: 72px 0 36px;
}

.nr-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
}

.nr-footer-branding .custom-logo {
  filter: brightness(1.08);
}

.nr-footer-copy {
  max-width: 32ch;
  margin: 18px 0 22px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.8;
}

.nr-footer-title {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.54);
}

.nr-footer-nav,
.nr-footer-links {
  flex-direction: column;
  gap: 12px;
}

.nr-footer-nav a,
.nr-footer-links a,
.nr-footer-links li {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.nr-footer-nav a:hover,
.nr-footer-links a:hover {
  color: #fff;
}

.nr-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nr-footer-bottom__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 13px;
}

@media (max-width: 1080px) {
  .nr-nav-desktop {
    display: none;
  }

  .nr-menu-toggle {
    display: inline-block;
  }

  .nr-header-cta {
    display: none;
  }

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

@media (min-width: 1081px) {
  .nr-mobile-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  body.admin-bar .nr-site-header {
    top: 46px;
  }

  .nr-site-header {
    top: 12px;
    padding: 0 12px;
  }

  .nr-header-shell {
    min-height: 70px;
    padding: 10px 12px;
    border-radius: 24px;
  }

  .nr-brand-logo {
    height: 46px;
  }

  .nr-lang-pill {
    min-width: 42px;
    height: 40px;
    padding: 0 12px;
  }

  .page-section {
    padding: 72px 0;
  }

  .page-entry,
  .entry-card {
    padding: 26px 22px;
  }

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

  .nr-footer-bottom__inner {
    min-height: auto;
    padding: 18px 0;
    flex-direction: column;
    align-items: flex-start;
  }
}
