/* =====================================================
   Studio Legale GPG — custom.css
   Palette: blu notte desaturato + avorio caldo + oro discreto
   Font: Lora (titoli, serif) + Inter (testo, sans)
   ===================================================== */

:root {
  --primary-color: #1B2A44;      /* blu notte desaturato */
  --primary-dark: #121D31;       /* footer / overlay */
  --secondary-color: #2E4468;    /* blu intermedio (fondi) */
  --accent-color: #B08D57;       /* oro desaturato discreto */
  --accent-soft: #C7A874;
  --text-dark: #2A2E35;
  --text-light: #ffffff;
  --text-muted: #6c757d;
  --bg-ivory: #F6F1E8;           /* avorio caldo */
  --bg-light: #FBF8F2;
  --bg-dark: #121D31;
  --border-soft: rgba(27, 42, 68, 0.12);
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--sans);
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.7;
  font-size: 1rem;
}

h1, h2, h3, h4, .brand-name { font-family: var(--serif); }

a { color: var(--secondary-color); }
a:hover { color: var(--accent-color); }

::selection { background: var(--accent-color); color: #fff; }

/* ================= NAVBAR ================= */
.navbar#mainNav {
  background: transparent;
  padding: 0.9rem 0;
  transition: background .3s ease, padding .3s ease, box-shadow .3s ease;
}
.navbar#mainNav.scrolled {
  background: var(--primary-color);
  padding: 0.5rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
}
.brand-logo { height: 70px; width: auto; display: block; filter: brightness(0) invert(1); }

.navbar#mainNav .nav-link {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  font-size: .95rem;
  padding: .5rem 1rem;
  position: relative;
}
.navbar#mainNav .nav-link::after {
  content: '';
  position: absolute;
  left: 1rem; right: 1rem; bottom: .3rem;
  height: 2px;
  background: var(--accent-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.navbar#mainNav .nav-link:hover::after,
.navbar#mainNav .nav-link.active::after { transform: scaleX(1); }
.navbar#mainNav .nav-link:hover,
.navbar#mainNav .nav-link.active { color: #fff; }

.btn-nav-call {
  background: var(--accent-color);
  color: var(--primary-dark) !important;
  border: none;
  font-weight: 600;
  border-radius: 999px;
  padding: .5rem 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.btn-nav-call:hover { background: var(--accent-soft); }
.navbar-toggler { border-color: rgba(255,255,255,0.4); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(176,141,87,.4); }

@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--primary-color);
    margin-top: .6rem;
    border-radius: 10px;
    padding: .6rem 1rem;
  }
  .navbar#mainNav .nav-link::after { display: none; }
}

/* ================= HERO ================= */
.hero {
  position: relative;
  color: #fff;
  /* Layer sottostante: foto dello studio */
  background-color: var(--primary-dark);
  background-image: url('../img/3d65be4b-25b7-44a4-ae75-028ecc80ecf6.webp?v=20260813-1946');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 11rem 0 6rem;
  overflow: hidden;
}
/* Overlay blu sempre attivo sopra la foto */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(176,141,87,0.20), transparent 60%),
    linear-gradient(160deg, rgba(27,42,68,0.92) 0%, rgba(18,29,49,0.88) 55%, rgba(13,22,38,0.93) 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 70%);
  opacity: .5;
}
.hero-inner { position: relative; z-index: 2; max-width: 860px; }
.hero-eyebrow {
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.18;
  margin-bottom: 1.3rem;
}
.hero-sub {
  font-size: clamp(1.02rem, 2.2vw, 1.25rem);
  color: rgba(255,255,255,0.85);
  max-width: 680px;
  margin-bottom: 1.1rem;
}
.hero-motto {
  font-family: var(--serif);
  color: var(--accent-soft);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.8rem; }
.btn-hero-primary, .btn-hero-wa, .btn-contact-primary, .btn-contact-wa {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 999px;
  padding: .8rem 1.8rem;
  font-size: 1.02rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-hero-primary {
  background: var(--accent-color);
  color: var(--primary-dark);
  border: 2px solid var(--accent-color);
}
.btn-hero-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(176,141,87,.35); }
.btn-hero-wa {
  background: #25D366;
  color: #fff;
  border: 2px solid #25D366;
}
.btn-hero-wa:hover { background: #1da851; border-color: #1da851; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37,211,102,.35); }
.hero-reassure {
  color: rgba(255,255,255,0.78);
  font-size: .95rem;
  margin: 0;
}
.hero-sep { margin: 0 .75rem; color: var(--accent-color); }

/* ================= SECTIONS ================= */
.section { padding: 5rem 0; }
.section-ivory { background: var(--bg-ivory); }
.section-light { background: var(--bg-light); }
.section-dark {
  background:
    radial-gradient(900px 400px at 90% 0%, rgba(176,141,87,0.16), transparent 60%),
    linear-gradient(160deg, var(--secondary-color) 0%, var(--primary-color) 60%, var(--primary-dark) 100%);
  color: #fff;
}
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: .6rem;
}
.section-eyebrow.light { color: var(--accent-soft); }
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  position: relative;
}
.section-title.light { color: #fff; }
.section-desc { color: var(--text-muted); font-size: 1.05rem; max-width: 620px; margin: 0 auto; }
.section-dark .section-desc { color: rgba(255,255,255,0.8); }
.lead-text { font-size: 1.15rem; color: #3a4250; line-height: 1.85; }

/* ================= AREE ================= */
.area-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.area-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(27,42,68,0.12);
  border-color: var(--accent-color);
}
.area-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  border-radius: 12px;
  background: rgba(176,141,87,0.12);
  color: var(--accent-color);
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}
.area-title { font-size: 1.3rem; font-weight: 600; color: var(--primary-color); margin-bottom: .5rem; }
.area-text { color: var(--text-muted); font-size: .98rem; margin: 0; }

/* ================= PROFESSIONISTI ================= */
.pro-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pro-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(27,42,68,0.14); }
.pro-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  background:
    radial-gradient(circle at 50% 35%, rgba(176,141,87,0.22), transparent 60%),
    linear-gradient(160deg, var(--secondary-color), var(--primary-color));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.pro-initials {
  font-family: var(--serif);
  font-size: 3.4rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent-soft);
  border: 2px solid rgba(199,168,116,0.55);
  border-radius: 50%;
  width: 112px; height: 112px;
  display: flex; align-items: center; justify-content: center;
}
.pro-photo.has-photo { background: var(--secondary-color); }
.pro-photo.has-photo picture { position: absolute; inset: 0; }
.pro-photo.has-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.pro-photo-note {
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.pro-body { padding: 1.5rem 1.5rem 1.75rem; display: flex; flex-direction: column; }
.pro-name { font-size: 1.35rem; font-weight: 600; color: var(--primary-color); margin-bottom: .25rem; }
.pro-role {
  color: var(--accent-color);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .3px;
  text-transform: uppercase;
  margin-bottom: .9rem;
}
.pro-bio { color: var(--text-muted); font-size: .95rem; line-height: 1.7; margin-bottom: 1rem; }
.pro-contact { margin: auto 0 0; }
.pro-contact a {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--secondary-color);
  text-decoration: none;
  min-height: 44px;
}
.pro-contact a:hover { color: var(--accent-color); }

/* ================= METODO ================= */
.metodo-text { font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: rgba(255,255,255,0.9); line-height: 1.8; margin: 1rem 0 1.75rem; }
.metodo-values {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: #fff;
  margin: 0;
}
.metodo-values i { font-size: .35rem; color: var(--accent-color); }
.metodo-values span { letter-spacing: 1px; }

/* ================= CONTATTI ================= */
.contact-info {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 2rem;
}
.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.contact-list li {
  display: flex;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.contact-list li:last-child { border-bottom: none; }
.contact-ic {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(27,42,68,0.06);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}
.contact-list a { color: var(--secondary-color); text-decoration: none; font-weight: 500; }
.contact-list a:hover { color: var(--accent-color); }
.contact-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn-contact-primary {
  background: var(--primary-color);
  color: #fff;
  border: 2px solid var(--primary-color);
  flex: 1 1 auto;
}
.btn-contact-primary:hover { background: var(--secondary-color); border-color: var(--secondary-color); color: #fff; }
.btn-contact-wa {
  background: #25D366;
  color: #fff;
  border: 2px solid #25D366;
  flex: 1 1 auto;
}
.btn-contact-wa:hover { background: #1da851; border-color: #1da851; color: #fff; }

/* Map lazy */
.map-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.map-wrap iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; }
.map-loader {
  position: absolute;
  inset: 0;
  width: 100%;
  border: none;
  cursor: pointer;
  color: #fff;
  background:
    radial-gradient(600px 300px at 70% 10%, rgba(176,141,87,0.2), transparent 60%),
    linear-gradient(160deg, var(--secondary-color), var(--primary-dark));
}
.map-loader-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 1.5rem; text-align: center; }
.map-loader-inner > i { font-size: 2.6rem; color: var(--accent-soft); margin-bottom: 1rem; }
.map-loader-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.map-loader-sub { color: rgba(255,255,255,0.75); font-size: .9rem; margin: .35rem 0 1.2rem; }
.map-loader-btn {
  background: var(--accent-color);
  color: var(--primary-dark);
  font-weight: 600;
  padding: .6rem 1.5rem;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.map-loader:hover .map-loader-btn { background: var(--accent-soft); }
.map-note a { color: var(--secondary-color); text-decoration: none; font-weight: 500; font-size: .9rem; }
.map-note a:hover { color: var(--accent-color); }

/* ================= FOOTER ================= */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 3.5rem 0 0;
  font-size: .95rem;
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 1rem; }
.footer-logo { height: 70px; width: auto; display: block; filter: brightness(0) invert(1); }
.footer-about { color: rgba(255,255,255,0.68); font-size: .92rem; max-width: 320px; }
.footer-h {
  color: #fff;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.footer-links, .footer-contacts, .footer-policy { list-style: none; padding: 0; margin: 0; }
.footer-links li, .footer-contacts li { margin-bottom: .6rem; }
.footer-links a, .footer-contacts a, .footer-policy a { color: rgba(255,255,255,0.72); text-decoration: none; }
.footer-links a:hover, .footer-contacts a:hover, .footer-policy a:hover { color: var(--accent-soft); }
.footer-contacts i { color: var(--accent-color); }
.footer-policy { display: flex; gap: 1.2rem; margin-top: 1rem; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2.5rem;
  padding: 1.5rem 0 .5rem;
  font-size: .8rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
}
.footer-copy {
  padding: .5rem 0 1.5rem;
  font-size: .82rem;
  color: rgba(255,255,255,0.5);
}

/* ================= WHATSAPP FAB ================= */
.wa-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 9998;
  transition: transform .2s;
  text-decoration: none;
  animation: wa-pulse 2.4s infinite;
}
.wa-fab:hover { transform: scale(1.08); color: #fff; }
@keyframes wa-pulse {
  0% { box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 0 0 0 rgba(37,211,102,0.45); }
  70% { box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 0 0 0 rgba(37,211,102,0); }
}
@media (max-width: 576px) {
  .wa-fab { width: 50px; height: 50px; font-size: 24px; right: 15px; bottom: 15px; }
}

/* Cookie settings icon: accent oro (mai warning rosso) */
#cookie-settings-icon { background: var(--accent-color) !important; }

/* ================= REVEAL ANIM ================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .wa-fab { animation: none; }
}

/* ================= FORM VALIDATION (evergreen) ================= */
.form-control.is-invalid, .form-check-input.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220,53,69,0.25) !important;
}
.form-check-input.is-invalid ~ .form-check-label { color: #dc3545; }

/* ================= RESPONSIVE ================= */
@media (max-width: 767px) {
  .section { padding: 3.5rem 0; }
  .hero { padding: 10.5rem 0 4.5rem; }
  .hero-reassure { line-height: 2; }
  .hero-sep { display: block; height: 0; overflow: hidden; }
  .contact-info { padding: 1.5rem; }
  .footer-policy { margin-bottom: 1rem; }
}
@media (max-width: 400px) {
  .brand-logo { height: 40px; }
}
