/* =========================================
   Studio Rivetta – stylesheet
   ========================================= */

/* =========================================
   AVVISO TEMPORANEO
   ========================================= */
/* overlay */
.notice-bar {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
/* box centrato */
.notice-bar__box {
  background: #fff;
  color: var(--navy);
  border-top: 5px solid var(--gold);
  border-radius: 8px;
  max-width: 480px;
  width: 100%;
  padding: 2rem 2rem 1.5rem;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  text-align: center;
  line-height: 1.6;
  font-size: .95rem;
  font-weight: 500;
}
.notice-bar__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--navy);
  cursor: pointer;
  opacity: .5;
  line-height: 1;
  padding: .2rem .4rem;
}
.notice-bar__close:hover { opacity: 1; }

/* ---- TOKENS ---- */
:root {
  --navy:    #0f1f3d;
  --navy-md: #1a3260;
  --navy-lt: #243d74;
  --gold:    #c8a96e;
  --gold-lt: #d9bf97;
  --white:   #ffffff;
  --off-white: #f7f6f2;
  --gray-50: #f9fafb;
  --gray-100:#f1f3f5;
  --gray-200:#e5e7eb;
  --gray-400:#9ca3af;
  --gray-600:#4b5563;
  --gray-800:#1f2937;
  --text:    #1a2032;
  --text-lt: #4b5563;

  --radius:  12px;
  --radius-lg: 20px;
  --shadow:  0 4px 24px rgba(15,31,61,.10);
  --shadow-lg: 0 20px 64px rgba(15,31,61,.46);

  --transition: .25s cubic-bezier(.4,0,.2,1);

  --container: 1180px;
  --nav-h: 72px;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ---- UTILITY ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section { padding-block: 6rem; }

.section__header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 4rem;
}

.section__eyebrow {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}

.section__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section__subtitle {
  font-size: 1.0625rem;
  color: var(--text-lt);
  line-height: 1.7;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8125rem 1.875rem;
  border-radius: 50px;
  font-size: .9375rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(15,31,61,.25);
}
.btn--primary:hover {
  background: var(--navy-md);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,31,61,.32);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.6);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--white);
}

.btn--gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 4px 16px rgba(200,169,110,.35);
}
.btn--gold:hover {
  background: var(--gold-lt);
  transform: translateY(-2px);
}

.btn--full { width: 100%; justify-content: center; }

/* =========================================
   HEADER
   ========================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background var(--transition), box-shadow var(--transition);
}
.header.scrolled {
  background: rgba(10,18,38,.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(0,0,0,.25);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.nav__logo-icon {
  width: 40px; height: 40px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .05em;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.nav__logo-icon--img {
  object-fit: cover;
  background: transparent;
  padding: 0;
}
.nav__logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 2px 6px;
}
.nav__logo-text {
  color: var(--white);
  font-size: 1rem;
  font-weight: 400;
}
.nav__logo-text strong { font-weight: 700; }

.nav__logo-img {
  height: 74px;
  width: auto;
  display: block;
  object-fit: contain;
}

.footer__logo-img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: invert(1);
  mix-blend-mode: screen;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__link {
  color: rgba(255,255,255,.82);
  font-size: .9375rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transition: width var(--transition);
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after { width: 100%; }

.nav__link--cta {
  background: var(--gold);
  color: var(--navy) !important;
  padding: .5rem 1.25rem;
  border-radius: 50px;
  font-weight: 600;
}
.nav__link--cta::after { display: none; }
.nav__link--cta:hover {
  background: var(--gold-lt);
  transform: translateY(-1px);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: all var(--transition);
}

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    url('../img/hero-bg.jpg') center center / cover no-repeat,
    linear-gradient(135deg, var(--navy) 0%, var(--navy-lt) 100%);
  transform: scale(1.05);
  transition: transform 8s ease;

}
.hero__bg.loaded { transform: scale(1); }

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,18,38,.88) 0%,
    rgba(15,31,61,.72) 60%,
    rgba(15,31,61,.50) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-h);
  max-width: 760px;
}

.hero__eyebrow {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero__title span { color: var(--gold); }

.hero__subtitle {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(255,255,255,.78);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.5);
  animation: bounce 2s infinite;
  z-index: 1;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* =========================================
   STATS
   ========================================= */
.stats {
  background: var(--navy);
  padding-block: 3.5rem;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.stats__item {
  text-align: center;
  position: relative;
}
.stats__item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,.12);
}
.stats__number {
  font-family: 'Playfair Display', serif;
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stats__plus {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}
.stats__label {
  font-size: .875rem;
  color: rgba(255,255,255,.62);
  margin-top: .4rem;
  font-weight: 500;
}

/* =========================================
   SERVIZI
   ========================================= */
.servizi { background: var(--off-white); }

.servizi__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.card--service {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(0,0,0,.04);
}
.card--service:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card__icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-lt) 100%);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.card__icon svg { color: var(--gold); }

.card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .625rem;
  line-height: 1.3;
}
.card__text {
  font-size: .9375rem;
  color: var(--text-lt);
  line-height: 1.65;
}

/* =========================================
   PERCHÉ
   ========================================= */
.perche { background: var(--white); }

.perche__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.perche__img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
}

.perche__img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Fallback when no image */
.perche__img-wrap:not(:has(img[src])),
.perche__img[src="img/studio.jpg"]  {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-lt) 100%);
  min-height: 480px;
  border-radius: var(--radius-lg);
}

.perche__badge {
  position: absolute;
  bottom: -1.25rem;
  right: -1.25rem;
  background: var(--white);
  border-radius: 12px;
  padding: .875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .625rem;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: .9375rem;
  color: var(--navy);
}
.perche__badge svg { color: var(--gold); }

.perche__text {
  font-size: 1.0625rem;
  color: var(--text-lt);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.perche__list {
  display: flex;
  flex-direction: column;
  gap: .875rem;
}
.perche__list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .9375rem;
  color: var(--text);
  line-height: 1.55;
}
.perche__list-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px; height: 22px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 800;
  margin-top: .125rem;
}

/* =========================================
   PORTALE
   ========================================= */
.portale {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-lt) 100%);
  position: relative;
  overflow: hidden;
}
.portale::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 60%;
  padding-bottom: 60%;
  background: radial-gradient(circle, rgba(200,169,110,.08) 0%, transparent 70%);
  pointer-events: none;
}

.portale__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.portale__text {
  font-size: 1.0625rem;
  color: rgba(255,255,255,.75);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.portale__features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.portale__features li {
  display: flex;
  align-items: center;
  gap: .875rem;
  color: rgba(255,255,255,.85);
  font-size: .9375rem;
}
.portale__feat-icon {
  width: 34px; height: 34px;
  background: rgba(200,169,110,.15);
  border: 1px solid rgba(200,169,110,.25);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

/* Mock screen */
.portale__visual { perspective: 1000px; }
.portale__screen {
  background: #1a2744;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.08);
  transform: rotateY(-4deg) rotateX(2deg);
  transition: transform var(--transition);
}
.portale__screen:hover {
  transform: rotateY(0) rotateX(0);
}
.portale__screen-bar {
  background: #111d35;
  padding: .75rem 1rem;
  display: flex;
  gap: .375rem;
}
.portale__screen-bar span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
}
.portale__screen-content { padding: 1.25rem; }

.portale__screen-row--header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.portale__screen-logo {
  width: 32px; height: 32px;
  background: var(--gold);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .625rem;
  font-weight: 800;
  color: var(--navy);
}
.portale__screen-title {
  font-weight: 700;
  color: var(--white);
  font-size: .9375rem;
}
.portale__screen-card {
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  padding: .875rem 1rem;
  margin-bottom: .75rem;
  border: 1px solid rgba(255,255,255,.05);
}
.portale__screen-label {
  font-size: .6875rem;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .25rem;
}
.portale__screen-value {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--gold);
}
.portale__screen-card--docs .portale__screen-label { margin-bottom: .625rem; }
.portale__screen-doc {
  font-size: .8125rem;
  color: rgba(255,255,255,.7);
  padding: .3125rem 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.portale__screen-doc:last-child { border-bottom: none; }

/* =========================================
   TEAM
   ========================================= */
.team { background: var(--gray-50); }

.team__grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.card--team {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 320px;
  width: 100%;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(0,0,0,.04);
}
.card--team:hover,
.card--team.visible:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card__avatar {
  height: 200px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-lt) 100%);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.card__body { padding: 1.5rem; }
.card__name {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .25rem;
}
.card__role {
  font-size: .875rem;
  color: var(--text-lt);
  margin-bottom: 1rem;
}
.card__desc {
  font-size: .875rem;
  color: var(--text-lt);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card__avatar-initials {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .05em;
}

.card__badges {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.badge {
  background: var(--navy);
  color: var(--gold);
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: 50px;
  letter-spacing: .04em;
}

.team__note {
  text-align: center;
  max-width: 600px;
  margin: 3rem auto 0;
  font-size: .9375rem;
  color: var(--text-lt);
  line-height: 1.7;
}

/* =========================================
   CONTATTI
   ========================================= */
.contatti { background: var(--white); }

.contatti__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: start;
}

.contatti__intro {
  font-size: 1.0625rem;
  color: var(--text-lt);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.contatti__details {
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
  margin-bottom: 2rem;
}
.contatti__detail {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.contatti__detail-icon {
  width: 40px; height: 40px;
  background: var(--off-white);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  flex-shrink: 0;
}
.contatti__detail strong {
  display: block;
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--navy);
  margin-bottom: .25rem;
}
.contatti__detail p, .contatti__detail a {
  font-size: .9375rem;
  color: var(--text-lt);
  line-height: 1.5;
}
.contatti__detail a:hover { color: var(--navy); text-decoration: underline; }

.contatti__piva {
  font-size: .8125rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* ---- MAPPA ---- */
.contatti__map-wrap {
  position: relative;
  margin-top: 3.5rem;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}
.contatti__map {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}
.contatti__map-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--white);
  color: var(--navy);
  font-size: .875rem;
  font-weight: 600;
  padding: .625rem 1.125rem;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  transition: transform var(--transition), box-shadow var(--transition);
}
.contatti__map-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}

/* ---- FORM ---- */
.form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}
.form__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.75rem;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form__group {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  margin-bottom: 1rem;
}
.form__group--check {
  flex-direction: row;
  align-items: flex-start;
  gap: .625rem;
}
.form__group--check input { margin-top: .2rem; accent-color: var(--navy); }
.form__group--check label {
  font-size: .875rem;
  color: var(--text-lt);
  line-height: 1.5;
}
.form__group--check a { color: var(--navy); font-weight: 600; text-decoration: underline; }

.form__label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: .02em;
}
.form__input {
  padding: .75rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font: inherit;
  font-size: .9375rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}
.form__input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15,31,61,.08);
}
.form__input::placeholder { color: var(--gray-400); }
.form__select { appearance: none; cursor: pointer; }
.form__textarea { resize: vertical; min-height: 130px; }

.form__feedback {
  margin-top: 1rem;
  font-size: .9375rem;
  font-weight: 500;
  text-align: center;
  min-height: 1.5rem;
}
.form__feedback.success { color: #16a34a; }
.form__feedback.error   { color: #dc2626; }

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--navy);
  padding-block: 2.5rem;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: .875rem;
}
.footer__brand strong {
  display: block;
  color: var(--white);
  font-weight: 700;
}
.footer__brand p {
  font-size: .8125rem;
  color: rgba(255,255,255,.5);
}
.footer__links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.footer__links a {
  color: rgba(255,255,255,.6);
  font-size: .875rem;
  transition: color var(--transition);
  position: relative;
}
.footer__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}
.footer__links a:hover { color: var(--white); }
.footer__links a:hover::after { width: 100%; }
.footer__legal {
  text-align: center;
  padding-top: 1.25rem;
  margin-top: .5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer__legal p {
  font-size: .8125rem;
  color: rgba(255,255,255,.45);
  line-height: 1.6;
}
.footer__bottom {
  display: flex;
  justify-content: center;
  gap: .75rem;
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer__pill {
  font-size: .75rem;
  color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .25rem .875rem;
  transition: color var(--transition), border-color var(--transition);
}
.footer__pill:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .servizi__grid { grid-template-columns: repeat(2, 1fr); }
  .perche__grid  { gap: 3rem; }
  .portale__inner { gap: 3rem; }
  .contatti__grid { gap: 3rem; }
}

@media (max-width: 900px) {
  .perche__grid  { grid-template-columns: 1fr; }
  .portale__inner { grid-template-columns: 1fr; }
  .contatti__grid { grid-template-columns: 1fr; }
  .stats__grid   { grid-template-columns: repeat(2, 1fr); }
  .stats__item::after { display: none; }
}

@media (max-width: 768px) {
  .nav__list {
    position: fixed;
    inset: 0 0 0 25%;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.75rem;
    background: rgba(10,18,38,.97);
    backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 200;
  }
  .nav__list.open { transform: translateX(0); }
  .nav__link { font-size: 1.1rem; }
  .nav__link--cta { padding: .625rem 1.5rem; }
  .nav__burger { display: flex; z-index: 201; }

  .servizi__grid { grid-template-columns: 1fr; }

  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: fit-content; }

  .form__row { grid-template-columns: 1fr; }

  .footer__links { justify-content: center; }
}

@media (max-width: 480px) {
  .section { padding-block: 4rem; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .portale__screen { transform: none; }
}

/* ---- ANIMATIONS ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: .1s; }
.reveal--delay-2 { transition-delay: .2s; }
.reveal--delay-3 { transition-delay: .3s; }
.reveal--delay-4 { transition-delay: .4s; }
.reveal--delay-5 { transition-delay: .5s; }

/* =========================================
   COOKIE BANNER
   ========================================= */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 600;
  background: var(--navy);
  border-top: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,.25);
  transform: translateY(0);
  transition: transform .35s ease;
}
.cookie-banner.hidden {
  transform: translateY(110%);
}
.cookie-banner__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner__text p {
  font-size: .875rem;
  color: rgba(255,255,255,.8);
  line-height: 1.6;
}
.cookie-banner__text a {
  color: var(--gold);
  text-decoration: underline;
  font-weight: 600;
}
.cookie-banner__actions {
  display: flex;
  gap: .625rem;
  flex-shrink: 0;
}
.cookie-btn {
  padding: .5rem 1.25rem;
  border-radius: 50px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  border: none;
}
.cookie-btn--refuse {
  background: transparent;
  color: rgba(255,255,255,.7);
  border: 1.5px solid rgba(255,255,255,.3);
}
.cookie-btn--refuse:hover {
  border-color: rgba(255,255,255,.7);
  color: var(--white);
}
.cookie-btn--accept {
  background: var(--gold);
  color: var(--navy);
}
.cookie-btn--accept:hover {
  background: var(--gold-lt);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .cookie-banner__inner { flex-direction: column; align-items: flex-start; }
  .cookie-banner__actions { width: 100%; justify-content: flex-end; }
}

/* =========================================
   CHATBOT
   ========================================= */
.chatbot {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .875rem;
}

/* Toggle button */
.chatbot__toggle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 6px 24px rgba(200,169,110,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  flex-shrink: 0;
  position: relative;
}
.chatbot__toggle:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 32px rgba(200,169,110,.55);
}
.chatbot__toggle:active { transform: scale(.96); }

.chatbot__icon-open,
.chatbot__icon-close {
  position: absolute;
  transition: opacity .2s ease, transform .2s ease;
}
.chatbot__icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(.7);
}
.chatbot--open .chatbot__icon-open {
  opacity: 0;
  transform: rotate(90deg) scale(.7);
}
.chatbot--open .chatbot__icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Notification badge */
.chatbot__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: #e53e3e;
  color: #fff;
  border-radius: 50%;
  font-size: .625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  animation: chatbot-pulse 2s infinite;
}
@keyframes chatbot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,62,62,.5); }
  50%       { box-shadow: 0 0 0 6px rgba(229,62,62,0); }
}

/* Window */
.chatbot__window {
  width: 360px;
  max-height: 640px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 56px rgba(15,31,61,.22);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  overflow: hidden;

  opacity: 0;
  transform: translateY(16px) scale(.97);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.chatbot--open .chatbot__window {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header */
.chatbot__header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-lt) 100%);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chatbot__header-info {
  display: flex;
  align-items: center;
  gap: .75rem;
}.chatbot__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--gold);
}
.chatbot__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.chatbot__name {
  color: var(--white);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.2;
}
.chatbot__status {
  color: rgba(255,255,255,.65);
  font-size: .75rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .1rem;
}
.chatbot__dot {
  width: 7px;
  height: 7px;
  background: #48bb78;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Messages */
.chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .625rem;
  scroll-behavior: smooth;
}
.chatbot__messages::-webkit-scrollbar { width: 4px; }
.chatbot__messages::-webkit-scrollbar-track { background: transparent; }
.chatbot__messages::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 2px; }

/* Bubble */
.chatbot__bubble {
  max-width: 82%;
  padding: .625rem .9rem;
  border-radius: 16px;
  font-size: .9rem;
  line-height: 1.55;
  word-break: break-word;
}
.chatbot__bubble--bot {
  background: var(--gray-100);
  color: var(--text);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.chatbot__bubble--user {
  background: var(--navy);
  color: var(--white);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.chatbot__bubble a {
  color: var(--gold);
  text-decoration: underline;
}

/* Typing indicator */
.chatbot__typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: .625rem .9rem;
  background: var(--gray-100);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  width: 52px;
}
.chatbot__typing span {
  width: 7px;
  height: 7px;
  background: var(--gray-400);
  border-radius: 50%;
  animation: chatbot-typing .9s infinite ease-in-out;
}
.chatbot__typing span:nth-child(2) { animation-delay: .15s; }
.chatbot__typing span:nth-child(3) { animation-delay: .30s; }
@keyframes chatbot-typing {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40%           { transform: translateY(-5px); opacity: 1; }
}

/* Quick replies */
.chatbot__quick-replies {
  padding: .375rem .875rem .5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  flex-shrink: 0;
  border-top: 1px solid var(--gray-100);
}
.chatbot__quick-replies:empty { display: none; }
.chatbot__chip {
  background: var(--off-white);
  color: var(--navy);
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  padding: .2rem .6rem;
  font-size: .72rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  font-family: inherit;
}
.chatbot__chip:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  transform: translateY(-1px);
}

/* Input */
.chatbot__input-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
}
.chatbot__input {
  flex: 1;
  border: 1.5px solid var(--gray-200);
  border-radius: 50px;
  padding: .5rem 1rem;
  font: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--gray-50);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.chatbot__input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15,31,61,.07);
}
.chatbot__input::placeholder { color: var(--gray-400); }

.chatbot__send {
  width: 38px;
  height: 38px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}
.chatbot__send:hover {
  background: var(--navy-md);
  transform: scale(1.08);
}

@media (max-width: 480px) {
  .chatbot {
    bottom: 1rem;
    right: 1rem;
  }
  .chatbot__window {
    width: calc(100vw - 2rem);
    max-height: 80svh;
  }
}

/* =========================================
   NEWS
   ========================================= */
.news { background: var(--off-white); }

.news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 3px solid var(--navy);
  border-left: 1px solid rgba(15,31,61,.15);
}

/* --- Barra ricerca news --- */
.news__search-wrap {
  position: relative;
  max-width: 380px;
  margin: 0 auto 2rem;
}
.news__search-icon {
  position: absolute;
  left: .875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}
.news__search {
  width: 100%;
  padding: .625rem 1rem .625rem 2.5rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 50px;
  font-size: .875rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.news__search:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15,31,61,.08);
}
.news__search::placeholder { color: var(--gray-400); }
.news__search-empty {
  text-align: center;
  font-size: .875rem;
  color: var(--text-lt);
  margin-top: 1rem;
  min-height: 1.25rem;
}
.news__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2rem;
}
.news__page-btn {
  background: none;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-size: .875rem;
  font-weight: 600;
  padding: .5rem 1.25rem;
  border-radius: 50px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.news__page-btn:hover:not(:disabled) {
  background: var(--navy);
  color: var(--white);
}
.news__page-btn:disabled {
  opacity: .3;
  cursor: default;
}
.news__page-info {
  font-size: .875rem;
  color: var(--text-lt);
  min-width: 80px;
  text-align: center;
}

/* --- Card news stile giornale --- */
.card--news {
  background: var(--off-white);
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-right: 1px solid rgba(15,31,61,.15);
  border-bottom: 1px solid rgba(15,31,61,.15);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: background var(--transition);
}
.card--news:hover {
  background: #f0ede6;
}

.card__news-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.card__news-date {
  font-size: .675rem;
  color: var(--text-lt);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.card__news-tag {
  font-size: .625rem;
  font-weight: 700;
  color: var(--navy);
  background: none;
  padding: 0;
  border-radius: 0;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-left: 2px solid var(--gold);
  padding-left: .4rem;
  white-space: nowrap;
}
.card--news .card__title {
  font-family: 'Playfair Display', serif;
  font-size: .925rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: .5rem;
  color: var(--navy);
  border-top: 1px solid rgba(15,31,61,.15);
  padding-top: .5rem;
}
.card--news .card__text {
  flex: 1;
  font-size: .8rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.card__news-btn {
  align-self: flex-start;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color var(--transition);
}
.card__news-btn:hover { color: var(--gold); }

/* btn outline */
.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  padding: .625rem 1.375rem;
}
.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* =========================================
   NEWS MODAL
   ========================================= */
.news-modal {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.news-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.news-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,18,38,.72);
  backdrop-filter: blur(4px);
}
.news-modal__box {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  transform: translateY(16px) scale(.98);
  transition: transform .25s ease;
}
.news-modal.open .news-modal__box {
  transform: translateY(0) scale(1);
}
.news-modal__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--gray-100);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
.news-modal__close:hover { background: var(--gray-200); }
.news-modal__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.news-modal__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 1.75rem;
  padding-right: 2.5rem;
}
.news-modal__body {
  font-size: .9375rem;
  color: var(--text-lt);
  line-height: 1.8;
}
.news-modal__body p { margin-bottom: 1rem; }
.news-modal__body p:last-child { margin-bottom: 0; }
.news-modal__body strong { color: var(--navy); }

@media (max-width: 1024px) {
  .news__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .news__grid { grid-template-columns: 1fr; }
  .news-modal__box { padding: 1.75rem 1.25rem; }
  .news-modal__title { font-size: 1.25rem; }
}
/* btn--outline usato altrove */


/* ===== ORARI ===== */
.orari { background: var(--gray-50, #f8f9fb); }
.orari__grid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 520px;
  margin: 0 auto;
}
.orari__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .875rem 1.25rem;
  background: #fff;
  border-radius: 10px;
  border-left: 4px solid var(--gold);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .2s ease, transform .2s ease;
}
.orari__item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.13);
  transform: translateY(-2px);
}
.orari__giorno {
  font-weight: 600;
  color: var(--navy);
  min-width: 110px;
}
.orari__ore {
  color: var(--text-lt, #555);
  font-size: .95rem;
}
@media (max-width: 480px) {
  .orari__item { flex-direction: column; align-items: flex-start; gap: .25rem; }
}
