:root {
  --red: #d7161f;
  --orange: #ee7d2e;
  --yellow: #fbc02d;
  --ink: #272624;
  --muted: #5f5b56;
  --line: #e4e1dc;
  --band: #f1f0ee;
  --link: #a8501a;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  overflow-wrap: anywhere;
}
img, iframe, video { max-width: 100%; }
img { height: auto; }
a { color: var(--link); }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.25; margin: 1.2em 0 .5em; }
h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: absolute; z-index: 10; background: #fff; padding: 8px 12px; }

/* Testata */
.site-header { background: #fff; position: relative; }
.site-header__inner {
  max-width: 1120px; margin: 0 auto; padding: 12px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-logo img { display: block; width: auto; height: 72px; }
.site-login { order: 2; margin-left: auto; text-decoration: none; }
.nav-toggle {
  order: 3; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  background: none; border: 1px solid var(--line); border-radius: 4px; font: inherit; color: inherit; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; content: '';
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }

.site-nav { display: none; border-top: 1px solid var(--line); }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 8px var(--gutter);
  color: var(--ink); text-decoration: none; text-transform: uppercase; font-size: .9rem; letter-spacing: .03em;
}
.site-nav .is-active > a { color: var(--red); }
.site-nav__sub a { padding-left: calc(var(--gutter) + 16px); text-transform: none; font-size: .95rem; letter-spacing: 0; }

@media (min-width: 900px) {
  .site-header__inner { justify-content: center; position: relative; }
  .site-logo img { height: 110px; }
  .site-login { position: absolute; right: var(--gutter); top: 18px; }
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; border-top: 0; }
  .site-nav__list { display: flex; flex-wrap: wrap; justify-content: center; }
  .site-nav a { padding: 8px 14px; }
  .site-nav__item { position: relative; }
  .site-nav__sub {
    position: absolute; left: 0; top: 100%; z-index: 20; min-width: 230px; padding: 6px 0;
    background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 20px rgb(0 0 0 / .08);
    opacity: 0; visibility: hidden; transition: opacity .15s;
  }
  .site-nav__item:hover > .site-nav__sub,
  .site-nav__item:focus-within > .site-nav__sub { opacity: 1; visibility: visible; }
  .site-nav__sub a { padding: 8px 16px; }
}

/* Fascia titolo */
.page-band { background: var(--band); padding: clamp(28px, 6vw, 56px) 0; text-align: center; }
.page-band h1 { margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.quote {
  margin: 0 auto; max-width: 780px; font-family: var(--serif);
  font-size: clamp(1.15rem, 3vw, 1.5rem); line-height: 1.4; text-transform: uppercase;
}

.site-main { padding: clamp(24px, 5vw, 56px) 0; min-height: 40vh; }
.site-main .frame:first-child > :first-child,
.site-main .frame:first-child header > :first-child { margin-top: 0; }

.columns { display: grid; gap: 0 48px; margin-top: 24px; }
@media (min-width: 768px) { .columns { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; } }

/* Tre riquadri home */
.pillars { display: grid; gap: 40px; text-align: center; }
.pillars .frame { margin: 0; }
.pillars .ce-gallery { float: none; margin: 0 auto 16px; max-width: 220px; }
.pillars header h2, .pillars header h3 { margin: 0 0 8px; text-transform: lowercase; }
.pillars .frame:nth-child(1) h2 { color: var(--red); }
.pillars .frame:nth-child(2) h2 { color: var(--orange); }
.pillars .frame:nth-child(3) h2 { color: #b98600; }
@media (min-width: 768px) { .pillars { grid-template-columns: repeat(3, 1fr); } }

/* Elenco ergoterapisti */
.directory { display: grid; gap: 24px; }
.dir-tree { border: 1px solid var(--line); border-radius: 4px; padding: 0 14px; }
.dir-tree summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.dir-tree ul { list-style: none; margin: 0; padding: 0 0 0 14px; }
.dir-tree nav > ul { padding: 0 0 10px; }
.dir-tree a { display: block; padding: 7px 0; text-decoration: none; }
.dir-tree [aria-current] { color: var(--red); font-weight: 600; }
@media (min-width: 900px) {
  .directory { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 48px; }
  .directory__nav { order: 2; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .directory__list { order: 1; }
  .dir-tree summary { pointer-events: none; list-style: none; }
  .dir-tree summary::-webkit-details-marker { display: none; }
}
.people {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.person { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.person p { margin: 0; }
.person__name { margin: 0 0 4px; font-size: 1.1rem; }
.person__city { color: var(--muted); }

/* Moduli: login, profilo, contatti */
form fieldset { border: 0; margin: 0; padding: 0; }
form legend { font-family: var(--serif); font-size: 1.3rem; padding: 0; margin-bottom: 10px; }
form label, .control-label { display: block; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], select, textarea {
  width: 100%; max-width: 520px; min-height: 44px; padding: 8px 10px; font: inherit;
  color: inherit; background: #fff; border: 1px solid #a8a39b; border-radius: 4px;
}
textarea { min-height: 160px; max-width: 100%; }
.form-group, .frame-type-felogin_login form > fieldset > div { margin-bottom: 14px; }
input[type=submit], button[type=submit], .btn {
  min-height: 44px; padding: 8px 22px; background: var(--ink); color: #fff; border: 0;
  border-radius: 4px; font: inherit; cursor: pointer;
}
input[type=submit]:hover, button[type=submit]:hover, .btn:hover { background: var(--red); color: #fff; }
.femanager_edit .col-sm-2, .femanager_edit .col-sm-10 { width: auto; float: none; padding: 0; }

/* Download riservati e contenuti */
.ce-uploads { list-style: none; margin: 0; padding: 0; }
.ce-uploads li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ce-uploads img { display: none; }
.ce-uploads-fileName { display: inline; }
table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
iframe { display: block; width: 100%; border: 0; }

@media (max-width: 639px) {
  .ce-intext.ce-right .ce-gallery, .ce-intext.ce-left .ce-gallery,
  .ce-left .ce-gallery, .ce-right .ce-gallery { float: none; margin: 0 0 16px; }
  .ce-gallery, .ce-outer, .ce-inner, .ce-row, .ce-column { width: 100% !important; float: none !important; left: 0 !important; right: 0 !important; }
  .ce-gallery figure, .ce-gallery img { width: 100%; max-width: 100%; }
}

.site-footer { background: var(--band); padding: 32px 0; text-align: center; font-size: .9rem; }
.site-footer img { display: block; margin: 0 auto 10px; }
.site-footer p { margin: 0; }
