/* ===== L'Avvocato Risponde - Brand Modern (Draft 14) ===== */
:root {
  --blue: #1a7bb5;
  --blue-dark: #0d4a75;
  --orange: #ec671b;
  --orange-hover: #d55a12;
  --dark-footer: #1a2332;
  --gray-bg: #f5f7fa;
  --text-dark: #1a2332;
  --text-gray: #5a6a7a;
}

html { scroll-behavior: smooth; }
html { height: 100%; }
body { font-family: 'Plus Jakarta Sans', sans-serif; color: var(--text-dark); line-height: 1.6; padding-top: 70px; display: flex; flex-direction: column; min-height: 100%; }
main { flex: 1 0 auto; }
.lar-footer { flex-shrink: 0; }
body.has-hero { padding-top: 0; }

/* Override Bootstrap colors to match brand */
.btn-primary { background-color: var(--blue); border-color: var(--blue); }
.btn-primary:hover { background-color: var(--blue-dark); border-color: var(--blue-dark); }
.btn-outline-primary { color: var(--blue); border-color: var(--blue); }
.btn-outline-primary:hover { background-color: var(--blue); border-color: var(--blue); }
.btn-success { background-color: #27ae60; border-color: #27ae60; }
.btn-info { background-color: var(--blue); border-color: var(--blue); color: #fff; }
.btn-info:hover { background-color: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-warning { background-color: var(--orange); border-color: var(--orange); color: #fff; }
.btn-warning:hover { background-color: var(--orange-hover); border-color: var(--orange-hover); color: #fff; }
.bg-primary { background-color: var(--blue) !important; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
.text-primary { color: var(--blue) !important; }
.badge.bg-primary { background-color: var(--blue) !important; }
.badge.bg-warning { background-color: var(--orange) !important; color: #fff !important; }
.page-link { color: var(--blue); }
.page-item.active .page-link { background-color: var(--blue); border-color: var(--blue); }
.form-check-input:checked { background-color: var(--blue); border-color: var(--blue); }
.nav-tabs .nav-link.active { color: var(--blue); border-bottom-color: var(--blue); }
.nav-tabs .nav-link { color: var(--text-gray); }
.nav-tabs .nav-link:hover { color: var(--blue-dark); }

/* NAVBAR */
.lar-navbar {
  padding: 0 1rem; height: 70px;
  background: rgba(13, 74, 117, 0.85);
  backdrop-filter: blur(12px);
  transition: background 0.3s, box-shadow 0.3s;
}
.lar-navbar.scrolled {
  background: rgba(13, 74, 117, 0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.lar-navbar .navbar-brand img { height: 42px; }
.lar-navbar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.lar-navbar .nav-link:hover { color: #fff !important; }

/* Dynamic header menu - nav5 style */
.lnav-link {
  display: flex !important; align-items: center; gap: 7px;
  padding: 8px 18px !important; position: relative;
  font-size: 14px !important; font-weight: 500 !important;
  transition: color 0.2s !important;
}
.lnav-icon { font-size: 12px; color: #ec671b; }
.lnav-link::after {
  content: ''; position: absolute; bottom: 0; left: 18px; right: 18px;
  height: 2px; background: #ec671b; border-radius: 2px;
  transform: scaleX(0); transition: transform 0.25s ease;
}
.lnav-link:hover::after { transform: scaleX(1); }
.lnav-link.active::after { transform: scaleX(1); }
.lnav-link.active { color: #fff !important; font-weight: 600 !important; }

.lar-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.lar-navbar .navbar-toggler {
  border: none !important; padding: 0 !important;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.08) !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: background 0.2s;
}
.lar-navbar .navbar-toggler:hover { background: rgba(255,255,255,0.15) !important; }
.lar-navbar .navbar-toggler:focus { box-shadow: none !important; }
.lar-navbar .navbar-toggler .navbar-toggler-icon { display: none; }
.lar-navbar .navbar-toggler::before,
.lar-navbar .navbar-toggler::after,
.lar-navbar .navbar-toggler .toggler-line {
  content: ''; display: block; width: 18px; height: 2px;
  background: #fff; border-radius: 2px; transition: all 0.3s;
}
.lar-navbar .navbar-toggler[aria-expanded="true"] { background: #ec671b !important; }
.lar-navbar .navbar-toggler[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.lar-navbar .navbar-toggler[aria-expanded="true"] .toggler-line { opacity: 0; }
.lar-navbar .navbar-toggler[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

/* Hide burger on desktop — navbar-expand-lg shows menu inline */
@media (min-width: 992px) {
  .lar-navbar .navbar-toggler { display: none !important; }
}

/* MOBILE: accordion dropdown from top (menu-A style) */
@media (max-width: 991px) {
  /* Dropdown panel positioned below navbar, same blue as navbar */
  .lar-navbar .navbar-collapse {
    position: fixed !important;
    top: 70px !important; left: 0; right: 0;
    background: #0d4a75;
    z-index: 999;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    padding: 0;
  }
  /* Bootstrap controls visibility via .collapse / .collapsing / .show */

  /* Nav list */
  .lar-navbar .navbar-nav {
    padding: 0 !important;
    gap: 0 !important;
    display: flex !important; flex-direction: column;
    width: 100%;
    margin: 0 !important;
  }
  .lar-navbar .navbar-nav > li { width: 100%; }
  /* Hide desktop dividers */
  .lar-navbar .navbar-nav > li > span[style*="width:1px"],
  .lar-navbar .navbar-nav > li:not(.nav-item) {
    display: none !important;
  }

  /* Mobile link style */
  .lar-navbar .lnav-link {
    display: flex !important; align-items: center; gap: 14px !important;
    padding: 16px 24px !important;
    color: rgba(255,255,255,0.85) !important;
    font-size: 15px !important; font-weight: 600 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    transition: all 0.2s !important;
    position: relative;
  }
  .lar-navbar .lnav-link::after { display: none !important; }
  .lar-navbar .lnav-link::before { display: none !important; }
  .lar-navbar .lnav-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff !important;
    padding-left: 28px !important;
  }
  .lar-navbar .lnav-link.active {
    background: rgba(236,103,27,0.15);
    color: #fff !important;
    border-left: 3px solid #ec671b !important;
    padding-left: 21px !important;
  }
  .lar-navbar .lnav-icon {
    width: 20px !important; height: auto !important;
    background: transparent !important;
    color: #ec671b !important;
    font-size: 13px !important;
    flex-shrink: 0;
    border-radius: 0 !important;
    display: inline-flex; align-items: center; justify-content: center;
  }

  /* Buttons footer — horizontal like menu-A */
  .lar-navbar .navbar-collapse > .d-flex.align-items-center.gap-2 {
    padding: 16px 24px;
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    align-items: stretch !important;
    background: rgba(0,0,0,0.15);
  }
  .lar-navbar .btn-pill-orange,
  .lar-navbar .btn-pill-outline {
    flex: 1; text-align: center; padding: 12px !important;
    border-radius: 10px !important; font-size: 13px !important;
  }
  .lar-navbar .btn-pill-outline {
    background: transparent !important; color: #fff !important;
    border: 1.5px solid rgba(255,255,255,0.25) !important;
  }
  .lar-navbar .btn-pill-outline:hover {
    border-color: #fff !important; color: #fff !important; background: rgba(255,255,255,0.08) !important;
  }
  /* User dropdown becomes full-width block */
  .lar-navbar .navbar-collapse .dropdown { flex: 1; }
  .lar-navbar .navbar-collapse .dropdown-toggle { width: 100%; }
  .lar-navbar .navbar-collapse .dropdown-menu {
    position: static !important; transform: none !important;
    background: rgba(0,0,0,0.25); border: none; margin-top: 6px;
    width: 100%;
  }
  .lar-navbar .navbar-collapse .dropdown-item { color: rgba(255,255,255,0.85); }
  .lar-navbar .navbar-collapse .dropdown-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
}

/* PILL BUTTONS */
.btn-pill-orange {
  background: var(--orange); color: #fff !important; border: none;
  padding: 0.5rem 1.4rem; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600;
  text-decoration: none; transition: background 0.2s, transform 0.2s;
}
.btn-pill-orange:hover { background: var(--orange-hover); color: #fff; transform: translateY(-1px); }
.btn-pill-outline {
  background: transparent; color: #fff !important;
  border: 1.5px solid rgba(255,255,255,0.5);
  padding: 0.45rem 1.4rem; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
}
.btn-pill-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); color: #fff; }

/* HERO */
.lar-hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--blue-dark) 0%, var(--blue) 100%);
  position: relative; overflow: hidden; padding: 70px 1rem 3rem;
}
.lar-hero-map {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  max-width: 750px; width: 95%; opacity: 0.95;
  pointer-events: none;
}
.lar-hero-content {
  position: relative; z-index: 2; text-align: center; max-width: 720px; width: 100%;
}
.lar-hero-content h1 {
  font-size: 3.2rem; font-weight: 800; color: #fff;
  margin-bottom: 0.5rem; line-height: 1.15;
}
.lar-hero-content h1 .text-orange { color: var(--orange); }
.lar-hero-subtitle {
  font-size: 1.25rem; color: rgba(255,255,255,0.85);
  margin-bottom: 0.3rem; font-weight: 400;
}
.lar-hero-note {
  font-size: 0.95rem; color: rgba(255,255,255,0.6);
  margin-bottom: 2.5rem; font-style: italic;
}

/* SEARCH CARD */
.lar-search-card {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px; padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.lar-search-form { display: flex; gap: 0.75rem; align-items: center; }
.lar-search-form .form-select {
  flex: 1; padding: 0.9rem 1.2rem; border: none; border-radius: 10px;
  font-size: 1rem; background-color: #fff; color: var(--text-dark);
}
.lar-search-form .btn-search {
  background: var(--orange); color: #fff; border: none;
  padding: 0.9rem 2.2rem; border-radius: 10px;
  font-size: 1rem; font-weight: 700;
  transition: background 0.2s, transform 0.2s; white-space: nowrap;
}
.lar-search-form .btn-search:hover { background: var(--orange-hover); transform: translateY(-1px); }

/* SECTIONS */
.lar-section { padding: 5rem 0; }
.lar-section-title {
  text-align: center; font-size: 2.2rem; font-weight: 800; margin-bottom: 0.5rem;
}
.lar-section-subtitle {
  text-align: center; color: var(--text-gray); font-size: 1.05rem; margin-bottom: 3rem;
}

/* STEP CARDS */
.lar-step-card {
  background: #fff; border-radius: 16px; padding: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative; overflow: hidden; height: 100%;
}
.lar-step-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue));
}
.lar-step-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.lar-step-number {
  width: 48px; height: 48px; border-radius: 50%; background: var(--orange);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; margin-bottom: 1.2rem;
}
.lar-step-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.lar-step-card p { color: var(--text-gray); font-size: 0.95rem; }

/* MATERIA CARDS */
.lar-materia-card {
  background: #fff; border-radius: 16px; padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  border-left: 4px solid transparent;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  height: 100%;
}
.lar-materia-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,0.1); }
.lar-materia-card.admin { border-left-color: var(--blue); }
.lar-materia-card.penale { border-left-color: #c0392b; }
.lar-materia-card.civile { border-left-color: #27ae60; }
.lar-materia-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff; margin-bottom: 1.2rem;
}
.lar-materia-icon.admin-bg { background: var(--blue); }
.lar-materia-icon.penale-bg { background: #c0392b; }
.lar-materia-icon.civile-bg { background: #27ae60; }
.lar-materia-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.lar-materia-card p { color: var(--text-gray); font-size: 0.93rem; margin-bottom: 1rem; }

/* FOOTER */
.lar-footer {
  background: var(--dark-footer); color: rgba(255,255,255,0.7);
  padding: 4rem 0 0; margin-top: 0;
}
.lar-footer h5 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.lar-footer ul li { margin-bottom: 0.5rem; }
.lar-footer ul a {
  color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.9rem;
  transition: color 0.2s;
}
.lar-footer ul a:hover { color: var(--orange); }
.lar-footer .fs-4 { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.lar-footer .fs-4:hover { color: var(--orange); }
.lar-footer p { font-size: 0.9rem; line-height: 1.7; }
.lar-footer-grid { padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.lar-footer-bottom {
  padding: 1.5rem 0; display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: rgba(255,255,255,0.45);
}
.lar-footer-bottom a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.lar-footer-bottom a:hover { color: var(--orange); }

/* HERO PARTICLES */
.lar-particles {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1;
}
.lar-particle {
  position: absolute; border-radius: 50%; background: rgba(255,255,255,0.15);
  animation: particleDrift linear infinite;
}
@keyframes particleDrift {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}
.lar-particle:nth-child(1) { width: 6px; height: 6px; left: 8%; animation-duration: 18s; animation-delay: 0s; }
.lar-particle:nth-child(2) { width: 4px; height: 4px; left: 15%; animation-duration: 22s; animation-delay: 2s; }
.lar-particle:nth-child(3) { width: 8px; height: 8px; left: 25%; animation-duration: 16s; animation-delay: 4s; }
.lar-particle:nth-child(4) { width: 5px; height: 5px; left: 35%; animation-duration: 24s; animation-delay: 1s; }
.lar-particle:nth-child(5) { width: 3px; height: 3px; left: 45%; animation-duration: 20s; animation-delay: 6s; }
.lar-particle:nth-child(6) { width: 7px; height: 7px; left: 55%; animation-duration: 17s; animation-delay: 3s; }
.lar-particle:nth-child(7) { width: 4px; height: 4px; left: 65%; animation-duration: 21s; animation-delay: 5s; }
.lar-particle:nth-child(8) { width: 6px; height: 6px; left: 75%; animation-duration: 19s; animation-delay: 7s; }
.lar-particle:nth-child(9) { width: 5px; height: 5px; left: 85%; animation-duration: 23s; animation-delay: 2s; }
.lar-particle:nth-child(10) { width: 3px; height: 3px; left: 92%; animation-duration: 15s; animation-delay: 4s; }
.lar-particle:nth-child(11) { width: 4px; height: 4px; left: 12%; animation-duration: 25s; animation-delay: 8s; }
.lar-particle:nth-child(12) { width: 6px; height: 6px; left: 42%; animation-duration: 20s; animation-delay: 10s; }

/* ANIMATIONS */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .lar-hero-content h1 { font-size: 2.2rem; }
  .lar-search-form { flex-direction: column; }
  .lar-search-form .form-select, .lar-search-form .btn-search { width: 100%; }
  .lar-footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ==========================================================================
   FOOTER MOBILE LAYOUT — v2-D "compact ordered"
   Logo + description top · 2 columns Link Utili + Informazioni legali ·
   Seguici centered between borders · copyright below. Scoped to <=767px.
   ========================================================================== */
@media (max-width: 767px) {
  .lar-footer { padding: 30px 24px 10px !important; }
  .lar-footer .container { padding: 0 !important; }

  /* Kill bootstrap row gutters AND the .mb-4 !important baked into each col */
  .lar-footer .lar-footer-grid { margin: 0 !important; padding-bottom: 0 !important; border-bottom: none !important; }
  .lar-footer .lar-footer-grid > [class*="col-"] {
    padding: 0 !important;
    margin-top: 0 !important; margin-bottom: 0 !important;
  }

  /* 1) BRAND — logo above description, 24px separator below */
  .lar-footer .lar-footer-grid > :nth-child(1) {
    flex: 0 0 100% !important; max-width: 100% !important;
    margin-bottom: 24px !important;
    padding-bottom: 24px !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .lar-footer .lar-footer-grid > :nth-child(1) img {
    height: 36px !important; margin-bottom: 12px !important;
  }
  .lar-footer .lar-footer-grid > :nth-child(1) p {
    font-size: 14px; line-height: 1.6;
    color: rgba(255,255,255,0.6); margin: 0;
  }

  /* 2 + 3) Link Utili + Informazioni legali — 2 columns side-by-side, 24px gap */
  .lar-footer .lar-footer-grid > :nth-child(2),
  .lar-footer .lar-footer-grid > :nth-child(3) {
    flex: 0 0 calc(50% - 12px) !important; max-width: calc(50% - 12px) !important;
    margin-bottom: 24px !important;
  }
  .lar-footer .lar-footer-grid > :nth-child(2) { margin-right: 24px !important; }
  .lar-footer .lar-footer-grid > :nth-child(2) h5,
  .lar-footer .lar-footer-grid > :nth-child(3) h5 {
    font-size: 14.5px !important; font-weight: 700 !important;
    color: #fff !important; margin-bottom: 12px !important;
  }
  .lar-footer .lar-footer-grid > :nth-child(2) ul,
  .lar-footer .lar-footer-grid > :nth-child(3) ul { margin-bottom: 0 !important; }
  .lar-footer .lar-footer-grid > :nth-child(2) ul li,
  .lar-footer .lar-footer-grid > :nth-child(3) ul li { margin-bottom: 9px; }
  /* Kill trailing margin of last link so col's mb is the only gap to next section */
  .lar-footer .lar-footer-grid > :nth-child(2) ul li:last-child,
  .lar-footer .lar-footer-grid > :nth-child(3) ul li:last-child { margin-bottom: 0 !important; }
  .lar-footer .lar-footer-grid > :nth-child(2) ul a,
  .lar-footer .lar-footer-grid > :nth-child(3) ul a {
    font-size: 14px; display: inline-flex; align-items: center; gap: 8px;
  }
  .lar-footer .lar-footer-grid > :nth-child(2) ul a i,
  .lar-footer .lar-footer-grid > :nth-child(3) ul a i {
    font-size: 11px; color: var(--orange);
  }

  /* 4) SEGUICI — full-width, bordered top+bottom, 18px internal vertical padding */
  .lar-footer .lar-footer-grid > :nth-child(4) {
    flex: 0 0 100% !important; max-width: 100% !important;
    text-align: center;
    padding: 18px 0 !important;
    margin-bottom: 18px !important;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .lar-footer .lar-footer-grid > :nth-child(4) h5 {
    font-size: 14.5px !important; font-weight: 700 !important;
    color: #fff !important; margin-bottom: 14px !important;
  }
  .lar-footer .lar-footer-grid > :nth-child(4) .d-flex {
    justify-content: center !important; gap: 14px !important; margin: 0 !important;
  }
  /* Facebook/social icons — plain Font Awesome glyphs like desktop (no circle bg) */
  .lar-footer .lar-footer-grid > :nth-child(4) .fs-4 {
    color: rgba(255,255,255,0.5) !important;
    transition: color .2s;
  }
  .lar-footer .lar-footer-grid > :nth-child(4) .fs-4:hover {
    color: var(--orange) !important;
  }

  /* Copyright — immediately after seguici's 18px margin, no extra top padding */
  .lar-footer-bottom {
    padding-top: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important;
    border-top: none !important;
    font-size: 12.5px !important; line-height: 1.7 !important;
    color: rgba(255,255,255,0.48) !important;
    text-align: center;
    flex-direction: column !important; gap: 10px !important;
    text-wrap: pretty;
  }
  /* Reset any margin on the copyright children (Developed by credit) */
  .lar-footer-bottom > div { margin: 0 !important; }
}

/* ==========================================================================
   CMS: Perché L'Avvocato Risponde — benefits grid layout (style A)
   Opt-in via .cms-fullwidth.perche-page wrapper in page body.
   ========================================================================== */
.perche-page .perche-wrap { max-width: 1200px; margin: -40px auto 60px; padding: 0 20px; position: relative; z-index: 2; }
.perche-page .perche-hero { background: #fff; border-radius: 18px; padding: 44px 40px; box-shadow: 0 8px 32px rgba(10,35,50,.08); border: 1px solid #e4e9f0; text-align: center; margin-bottom: 28px; position: relative; overflow: hidden; }
.perche-page .perche-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg,#1a7bb5,#ec671b); }
.perche-page .perche-hero .kicker { font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: #ec671b; margin-bottom: 14px; }
.perche-page .perche-hero h2 { font-size: 30px; font-weight: 900; color: #0a3a5c; line-height: 1.2; letter-spacing: -.5px; max-width: 760px; margin: 0 auto 16px; }
.perche-page .perche-hero h2 .accent { color: #ec671b; }
.perche-page .perche-hero p { font-size: 16px; color: #4a5a6a; max-width: 680px; margin: 0 auto; line-height: 1.65; }

.perche-page .perche-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.perche-page .b-card { background: #fff; border-radius: 14px; padding: 28px 26px; border: 1px solid #e4e9f0; transition: all .25s; position: relative; overflow: hidden; }
.perche-page .b-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(13,74,117,.1); border-color: #b7c4d4; }
.perche-page .b-card .icon-wrap { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg,#fff4ee,#ffe5d2); color: #ec671b; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 18px; }
.perche-page .b-card h3 { font-size: 17px; font-weight: 800; color: #0a3a5c; margin-bottom: 8px; letter-spacing: -.2px; }
.perche-page .b-card p { font-size: 14px; color: #5a6a7a; line-height: 1.6; margin: 0; }

.perche-page .perche-cta { background: linear-gradient(135deg,#0a3a5c,#1a6ba8); border-radius: 18px; padding: 40px; color: #fff; text-align: center; overflow: hidden; position: relative; }
.perche-page .perche-cta::before { content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: rgba(236,103,27,.15); }
.perche-page .perche-cta h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; position: relative; color: #fff; }
.perche-page .perche-cta p { font-size: 15px; opacity: .85; margin-bottom: 22px; position: relative; }
.perche-page .perche-cta a { display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px; background: #ec671b; color: #fff !important; text-decoration: none; border-radius: 12px; font-weight: 700; font-size: 14.5px; box-shadow: 0 8px 24px rgba(236,103,27,.4); transition: all .25s; position: relative; }
.perche-page .perche-cta a:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(236,103,27,.5); }

@media (max-width: 900px) { .perche-page .perche-benefits { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .perche-page .perche-hero { padding: 30px 24px; }
  .perche-page .perche-hero h2 { font-size: 22px; }
  .perche-page .perche-benefits { grid-template-columns: 1fr; gap: 14px; }
  .perche-page .b-card { padding: 22px 20px; }
  .perche-page .perche-cta { padding: 28px 22px; }
  .perche-page .perche-cta h3 { font-size: 20px; }
}

/* Legal block separators — apply both on desktop and mobile.
   The `·` sits AFTER each span (not before), so when a span wraps to a new line
   the separator stays with it — no orphan "|" or "·" at the start of a line. */
.lar-legal span {
  white-space: nowrap;
  display: inline-block;
}
.lar-legal span:not(:last-child)::after {
  content: "·";
  margin: 0 6px;
  color: rgba(255,255,255,0.25);
  font-weight: 700;
}

/* ==========================================================================
   CMS: Legenda Materie (3-column layout)
   Opt-in via outer class .legenda-cols (on a .cms-fullwidth wrapper)
   ========================================================================== */
.legenda-cols-wrap { max-width: 1300px; margin: -40px auto 60px; padding: 0 20px; position: relative; z-index: 2; }
.legenda-cols-intro { background: #fff; border-radius: 12px; padding: 18px 22px; box-shadow: 0 2px 12px rgba(0,0,0,.05); border-left: 4px solid #ec671b; margin: 0 auto 28px; max-width: 900px; font-size: 14px; color: #4a5a6a; }
.legenda-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.legenda-cols .col { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 24px rgba(10,35,50,.08); border: 1px solid #e4e9f0; display: flex; flex-direction: column; }
.legenda-cols .col-head { padding: 26px 24px; color: #fff; position: relative; overflow: hidden; }
.legenda-cols .col-head::after { content: ''; position: absolute; right: -20px; top: -20px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.08); }
.legenda-cols .col.civile .col-head { background: linear-gradient(135deg, #1a7bb5, #0d4a75); }
.legenda-cols .col.penale .col-head { background: linear-gradient(135deg, #c0392b, #8b2a1f); }
.legenda-cols .col.amm .col-head { background: linear-gradient(135deg, #27ae60, #1e7a44); }
.legenda-cols .col-icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.legenda-cols .col-title { font-size: 22px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 4px; color: #fff; }
.legenda-cols .col-sub { font-size: 12px; opacity: .75; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.legenda-cols .col-body { padding: 10px 0; flex: 1; }
.legenda-cols .matter { padding: 14px 24px; border-bottom: 1px solid #f0f3f7; cursor: pointer; transition: background .15s; position: relative; }
.legenda-cols .matter:last-child { border-bottom: none; }
.legenda-cols .matter:hover { background: #f8fafc; }
.legenda-cols .matter-title { font-size: 14px; font-weight: 700; color: #0a3a5c; display: flex; align-items: center; gap: 10px; line-height: 1.35; margin: 0; }
.legenda-cols .col.penale .matter-title { color: #8b2a1f; }
.legenda-cols .col.amm .matter-title { color: #1e7a44; }
.legenda-cols .matter-title i { font-size: 11px; opacity: .5; transition: transform .2s; }
.legenda-cols .matter.open .matter-title i.chev { transform: rotate(180deg); opacity: 1; }
.legenda-cols .matter-title .chev { margin-left: auto; }
.legenda-cols .matter-desc { max-height: 0; overflow: hidden; transition: max-height .25s; font-size: 13px; color: #6a7585; line-height: 1.6; }
.legenda-cols .matter.open .matter-desc { max-height: 400px; margin-top: 8px; padding-left: 26px; }
.legenda-cols .matter-desc ol { margin: 6px 0 0 18px; }
.legenda-cols .matter-desc ol li { margin: 3px 0; }
.legenda-cols .col-foot { padding: 14px 24px; background: #f5f7fa; font-size: 11px; color: #8a95a5; text-align: center; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
@media (max-width: 1024px) {
  .legenda-cols { grid-template-columns: 1fr; }
}
