body.sed-home {
  background: #f3f6fb;
  --sed-ui-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-family: var(--sed-ui-font);
}

.sed-home-landing h1,
.sed-home-landing h2,
.sed-guest-card h1 {
  font-family: var(--sed-ui-font);
}

body.sed-home-index .header.container-header.full-width {
  background: #fff;
  background-image: none;
  border-bottom: 1px solid #e6ebf1;
  box-shadow: 0 2px 12px rgba(16, 40, 70, 0.04);
  color: #17304c;
}

body.sed-home-index .header .brand-logo {
  width: auto;
  height: auto;
  border-radius: 0;
}

body.sed-home-index .header .navbar-brand img {
  display: block;
  width: 136px;
  max-width: none;
  height: auto;
}

body.sed-home-index .mod-menu--split-header .split-menu--top {
  background: transparent;
  border-color: transparent;
}

body.sed-home-index .mod-menu--split-header .split-menu--top .split-menu__link,
body.sed-home-index .mod-menu--split-header .split-menu--top .split-menu__summary,
body.sed-home-index .mod-menu--split-header .split-menu--top .split-menu__text {
  min-height: 28px;
  color: #17304c;
  font-size: 1rem;
  text-transform: uppercase;
}

body.sed-home-index .mod-menu--split-header .split-menu--top .split-menu__link:hover,
body.sed-home-index .mod-menu--split-header .split-menu--top .split-menu__link:focus-visible,
body.sed-home-index .mod-menu--split-header .top-main .split-menu__item--current > .split-menu__link,
body.sed-home-index .mod-menu--split-header .top-main .split-menu__item--active-trail > .split-menu__link {
  background: #edf3f8;
  color: #123454;
}

body.sed-home-index .header .navbar-toggler {
  border-color: #d8e1eb;
  color: #17304c;
}

body.sed-home-index .header .sed-nav-home {
  color: #17304c;
}

body.sed-home-index .header .sed-nav-home:hover,
body.sed-home-index .header .sed-nav-home[aria-current="page"] {
  background: #edf3f8;
}

body.sed-home-index .sed-header-account {
  min-height: 52px;
  color: #17304c;
}

body.sed-home-index .sed-header-account__avatar {
  border-color: #dbe8f2;
  background: #edf3f8;
  color: #005f9e;
}

/* La sezione e alta 100svh: qualsiasi spaziatura dei wrapper Joomla farebbe comparire lo scroll. */
body.sed-home-guest .site-grid,
body.sed-home-guest .container-component,
body.sed-home-guest .container-component > main {
  margin: 0;
  padding: 0;
}

body.sed-home-guest .site-grid {
  display: block;
}

body.sed-home-guest #system-message-container:empty {
  display: none;
}

.sed-circuit-bg {
  position: fixed;
  inset: 0;
  background-color: #eef5fb;
  background-image: url('../images/sed-circuit-bg.jpg');
  background-image: image-set(
    url('../images/sed-circuit-bg.webp') type('image/webp'),
    url('../images/sed-circuit-bg.jpg') type('image/jpeg')
  );
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

.sed-circuit-bg::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    97% 64% at 50% 0%,
    rgba(11, 167, 223, 0.099) 0%,
    rgba(11, 167, 223, 0.033) 46%,
    rgba(11, 167, 223, 0) 76%
  );
  content: '';
}

/* Flex + "margin: auto" sul figlio centra la card ma, quando non ci sta,
   i margini automatici si azzerano invece di tagliarne la parte alta. */
.sed-guest-landing {
  display: flex;
  min-height: 100svh;
  padding: clamp(16px, 3svh, 40px) 20px clamp(16px, 4svh, 64px);
  box-sizing: border-box;
}

.sed-guest-card {
  position: relative;
  width: min(100%, 500px);
  overflow: hidden;
  padding: clamp(20px, 3.4svh, 46px) clamp(24px, 5vw, 46px);
  box-sizing: border-box;
  border: 1px solid #e4eaf1;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 40, 70, 0.08);
  text-align: center;
}

.sed-guest-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, #009fe3, #005f9e);
  content: '';
}

.sed-guest-logo {
  display: block;
  width: min(100%, clamp(150px, 30svh, 240px));
  height: auto;
  margin: 0 auto clamp(12px, 2.6svh, 26px);
}

.sed-guest-card .sed-home-eyebrow {
  margin-bottom: clamp(6px, 1.6svh, 15px);
  color: #005f9e;
  font-size: clamp(0.95rem, 1.9svh, 1.1rem);
  letter-spacing: 0.1em;
}

.sed-guest-card h1 {
  margin: 0;
  color: #142b49;
  font-size: clamp(1.45rem, min(4vw, 3.6svh), 2.6rem);
  font-weight: 700;
  line-height: 1.15;
}

.sed-guest-subtitle {
  margin: clamp(6px, 1.2svh, 12px) 0 clamp(14px, 3svh, 30px);
  color: #52677f;
  font-size: 1rem;
  line-height: 1.5;
}

.sed-guest-login {
  display: grid;
  gap: clamp(4px, 1svh, 9px);
  text-align: left;
}

.sed-guest-login label {
  margin-top: clamp(2px, 0.8svh, 8px);
  color: #263d55;
  font-size: 0.9rem;
  font-weight: 600;
}

.sed-guest-login input {
  width: 100%;
  min-height: clamp(38px, 5.2svh, 46px);
  padding: 10px 13px;
  box-sizing: border-box;
  border: 1px solid #cbd6e2;
  border-radius: 9px;
  background: #fff;
  color: #142b49;
  font: inherit;
}

.sed-guest-login input:focus-visible {
  border-color: #0065a3;
  outline: 3px solid rgba(0, 101, 163, 0.16);
}

.sed-guest-login button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: clamp(40px, 5.4svh, 48px);
  margin-top: clamp(10px, 2svh, 18px);
  border: 0;
  border-radius: 9px;
  background: #005f9e;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sed-guest-login button:hover,
.sed-guest-login button:focus-visible {
  background: #004b7d;
}

.sed-guest-login button:focus-visible {
  outline: 3px solid rgba(0, 101, 163, 0.25);
  outline-offset: 3px;
}

.sed-guest-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: clamp(12px, 2.6svh, 24px);
  font-size: 0.88rem;
}

.sed-guest-links a {
  color: #315b80;
  text-decoration: none;
}

.sed-guest-links a:hover,
.sed-guest-links a:focus-visible {
  text-decoration: underline;
}

/* Form nativi di com_users (reset, remind, registrazione) resi come quello di accesso. */
.sed-guest-card--form {
  text-align: left;
}

.sed-guest-card--form h1 {
  margin: 0 0 clamp(12px, 2.4svh, 20px);
  font-size: clamp(1.25rem, min(3vw, 2.8svh), 1.9rem);
  text-align: center;
}

/* Il page header del componente ripete il titolo della voce di menu ("Home"): usiamo il nostro. */
.sed-guest-card--form .page-header {
  display: none;
}

.sed-guest-card--form form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.sed-guest-card--form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.sed-guest-card--form p {
  margin: 0 0 20px;
  color: #52677f;
  font-size: 0.95rem;
  line-height: 1.5;
}

.sed-guest-card--form .control-group {
  margin-bottom: 14px;
}

.sed-guest-card--form label {
  display: block;
  margin-bottom: 8px;
  color: #263d55;
  font-size: 0.9rem;
  font-weight: 600;
}

.sed-guest-card--form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  box-sizing: border-box;
  border: 1px solid #cbd6e2;
  border-radius: 9px;
  background: #fff;
  color: #142b49;
  font: inherit;
}

.sed-guest-card--form input:focus-visible {
  border-color: #0065a3;
  outline: 3px solid rgba(0, 101, 163, 0.16);
}

.sed-guest-card--form .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  padding: 10px 16px;
  border: 0;
  border-radius: 9px;
  background: #005f9e;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sed-guest-card--form .btn:hover,
.sed-guest-card--form .btn:focus-visible {
  background: #004b7d;
}

.sed-login-shell {
  position: relative;
  width: min(100%, 500px);
  margin: auto;
}

.sed-login-shell .sed-guest-card {
  width: 100%;
}

.sed-login-messages {
  position: absolute;
  right: 0;
  bottom: calc(100% + 16px);
  left: 0;
}

/* Joomla 5 genera <joomla-alert>; .alert copre eventuali messaggi in markup classico. */
.sed-login-messages joomla-alert,
.sed-login-messages .alert {
  position: relative;
  display: block;
  margin: 0 0 10px;
  padding: 13px 42px 13px 16px;
  border: 1px solid #e4eaf1;
  border-left: 4px solid #005f9e;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 40, 70, 0.08);
  color: #1d4468;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: left;
}

.sed-login-messages joomla-alert:last-child,
.sed-login-messages .alert:last-child {
  margin-bottom: 0;
}

.sed-login-messages joomla-alert[type="danger"] { border-left-color: #c0392b; color: #7d2820; }
.sed-login-messages joomla-alert[type="warning"] { border-left-color: #d98b00; color: #6f4b00; }
.sed-login-messages joomla-alert[type="success"] { border-left-color: #14785f; color: #0f5646; }

/* L'icona dipende da FontAwesome, caricato in differita: la nascondo e lascio
   il bordo colorato a indicare il tipo. L'etichetta resta per gli screen reader. */
.sed-login-messages .alert-heading span[aria-hidden="true"] {
  display: none;
}

.sed-login-messages .alert-message {
  margin: 0;
}

.sed-login-messages joomla-alert button {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.5;
  cursor: pointer;
}

.sed-login-messages joomla-alert button:hover,
.sed-login-messages joomla-alert button:focus-visible {
  background: rgba(16, 40, 70, 0.06);
  opacity: 1;
}

.sed-login-page .com-users-login {
  text-align: left;
}

.sed-login-page .com-users-login .page-header {
  display: none;
}

.sed-login-page .com-users-login__form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.sed-login-page .com-users-login__form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.sed-login-page .com-users-login__form .control-group {
  margin-bottom: 16px;
}

.sed-login-page .com-users-login__form label:not(.form-check-label) {
  display: block;
  margin-bottom: 9px;
  color: #263d55;
  font-size: 0.9rem;
  font-weight: 600;
}

.sed-login-page .com-users-login__form input:not([type="checkbox"]):not([type="hidden"]) {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd6e2;
  border-radius: 9px;
  background: #fff;
  color: #142b49;
  box-sizing: border-box;
}

.sed-login-page .com-users-login__form .input-group {
  display: flex;
  flex-wrap: nowrap;
}

.sed-login-page .com-users-login__form .input-group input:not([type="checkbox"]):not([type="hidden"]) {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  border-radius: 9px 0 0 9px;
}

.sed-login-page .com-users-login__form .input-group button {
  flex: 0 0 46px;
  border-radius: 0 9px 9px 0;
}

.sed-login-page .com-users-login__form input:focus-visible {
  border-color: #0065a3;
  outline: 3px solid rgba(0, 101, 163, 0.16);
}

.sed-login-page .com-users-login__remember {
  margin: 4px 0 16px;
  color: #263d55;
  font-size: 0.9rem;
}

.sed-login-page .com-users-login__form .com-users-login__submit {
  margin: 0 0 10px;
}

.sed-login-page .com-users-login__form .com-users-login__submit .controls {
  width: 100%;
}

.sed-login-page .com-users-login__form .com-users-login__submit button {
  width: 100%;
  min-height: 46px;
  border-radius: 9px;
  font-weight: 600;
}

.sed-login-page .com-users-login__form .com-users-login__submit button[type="submit"] {
  margin-top: 8px;
  border-color: #005f9e;
  background: #005f9e;
  color: #fff;
}

.sed-login-page .com-users-login__form .com-users-login__submit button[type="submit"]:hover,
.sed-login-page .com-users-login__form .com-users-login__submit button[type="submit"]:focus-visible {
  border-color: #004b7d;
  background: #004b7d;
}

.sed-login-page .com-users-login__options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  margin-top: 24px;
  border: 0;
  font-size: 0.88rem;
  text-align: center;
}

.sed-login-page .com-users-login__options a {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #315b80;
  text-decoration: none;
}

.sed-login-page .com-users-login__options a:hover,
.sed-login-page .com-users-login__options a:focus-visible {
  background: transparent;
  color: #005f9e;
  text-decoration: underline;
}

@media (max-height: 800px) {
  .sed-login-messages {
    position: static;
  }

  .sed-login-messages:has(joomla-alert),
  .sed-login-messages:has(.alert) {
    margin-bottom: 16px;
  }
}

body.sed-area-ute .header { background-color: #005f9e; }
body.sed-area-produzione .header { background-color: #8a2b2b; }
body.sed-area-plm .header { background-color: #173865; }
body.sed-area-utenti .header { background-color: #14785f; }
body.sed-area-commerciale .header { background-color: #8d6436; }
body.sed-area-impostazioni .header { background-color: #435a72; }
body.sed-area-sistemi .header { background-color: #b4531f; }

body.sed-home .site-grid,
body.sed-home .container-component,
body.sed-home .container-component main {
  min-width: 0;
  width: 100%;
  max-width: none;
}

.sed-home-landing {
  --sed-landing-top-space: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - 110px);
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(32px, 5vh, 70px) 24px;
  box-sizing: border-box;
}

body.sed-home-index .sed-home-landing {
  justify-content: flex-start;
  min-height: calc(100svh - var(--sed-header-height, 79px));
  padding-top: var(--sed-landing-top-space);
}

body.sed-home-index .sed-home-intro h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  letter-spacing: 0.045em;
}

.sed-home-intro {
  display: grid;
  grid-template-rows: 52px 72px 42px;
  justify-items: center;
  margin-bottom: 48px;
  text-align: center;
}

.sed-area-page.sed-home-area--dipendenti:not(.sed-area-page--submenu) .sed-home-intro {
  margin-bottom: 24px;
}

.sed-home-eyebrow {
  margin: 0 0 12px;
  color: #49627e;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sed-home-intro h1 {
  grid-row: 2;
  align-self: end;
  margin: 0;
  color: #142b49;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
}

.sed-home-intro > p:last-child {
  grid-row: 3;
  align-self: center;
  margin: 0;
  color: #54677d;
  font-size: 1.05rem;
}

.sed-home-areas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  gap: 18px;
}

.sed-home-areas--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Sei aree: due righe da tre. */
.sed-home-areas--six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sed-home-area {
  --area-color: #1f456f;
}

.sed-home-area,
.sed-area-function-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 248px;
  overflow: hidden;
  padding: 28px;
  box-sizing: border-box;
  border: 1px solid rgba(19, 43, 70, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 40, 70, 0.06);
  color: #263d55;
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sed-home-area::before,
.sed-area-function-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 8px;
  background: var(--area-color);
  content: '';
}

.sed-home-area--ute { --area-color: #005f9e; }
.sed-home-area--produzione { --area-color: #8a2b2b; }
.sed-home-area--plm { --area-color: #173865; }
.sed-home-area--dipendenti { --area-color: #14785f; }
.sed-home-area--commerciale { --area-color: #8d6436; }
.sed-home-area--impostazioni { --area-color: #435a72; }
.sed-home-area--sistemi { --area-color: #b4531f; }

a.sed-home-area:hover,
a.sed-home-area:focus-visible,
.sed-area-function-card:hover,
.sed-area-function-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(16, 40, 70, 0.09);
  color: #263d55;
  text-decoration: none;
}

a.sed-home-area:focus-visible,
.sed-area-function-card:focus-visible {
  outline: 3px solid var(--area-color);
  outline-offset: 3px;
}

.sed-home-area__name {
  margin: 0 0 10px;
  color: var(--area-color);
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.sed-home-areas--five .sed-home-area {
  padding-inline: 16px;
}

.sed-home-areas--five .sed-home-area__name {
  font-size: clamp(1.3rem, 1.7vw, 1.5rem);
  letter-spacing: -0.015em;
  overflow-wrap: normal;
  white-space: nowrap;
}

.sed-home-area__description {
  font-size: 0.95rem;
  line-height: 1.5;
}

.sed-home-area__availability {
  margin-top: 16px;
  color: var(--area-color);
  font-size: 0.95rem;
  font-weight: 600;
}

.sed-home-area--unavailable {
  opacity: 0.56;
}

.sed-area-page {
  justify-content: flex-start;
  padding-top: var(--sed-landing-top-space);
}

.sed-area-empty--construction {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 560px);
  margin-inline: auto;
  padding: 36px 40px;
  box-sizing: border-box;
  border: 1px solid rgba(19, 43, 70, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 40, 70, 0.06);
  text-align: center;
}

.sed-area-empty__accent {
  width: 48px;
  height: 4px;
  margin-bottom: 24px;
  border-radius: 4px;
  background: var(--area-color);
}

.sed-area-empty--construction h2 {
  margin: 0 0 10px;
  color: #142b49;
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  font-weight: 600;
}

.sed-area-empty--construction p {
  max-width: 40ch;
  margin: 0;
  color: #52657a;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* La fila delle card UTENTI si allinea alla prima fila della Home. */
.sed-area-page.sed-home-area--dipendenti:not(.sed-area-page--submenu) {
  --sed-landing-top-space: 18px;
}

.sed-area-page .sed-home-intro h1 {
  color: var(--area-color);
  text-transform: uppercase;
}

.sed-area-page--submenu .sed-home-intro h1 {
  font-size: clamp(1.9rem, 3vw, 2.25rem);
}

.sed-area-home-link {
  grid-row: 1;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #718397;
  text-decoration: none;
}

.sed-area-home-link svg {
  width: 28px;
  height: 28px;
}

.sed-area-home-link:hover,
.sed-area-home-link:focus-visible {
  background: color-mix(in srgb, var(--area-color) 8%, white);
  color: var(--area-color);
}

.sed-area-home-link:focus-visible {
  outline: 2px solid var(--area-color);
  outline-offset: 2px;
}

.sed-area-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  gap: 40px;
}

.sed-area-groups--columns {
  --sed-area-column-gap: 30px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  max-width: 1020px;
  margin-inline: auto;
  gap: var(--sed-area-column-gap);
}

.sed-area-groups--columns.sed-area-groups--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 670px;
}

.sed-area-groups--columns.sed-area-groups--count-1 {
  grid-template-columns: minmax(0, 1fr);
  max-width: 320px;
}

.sed-area-group {
  min-width: 0;
}

.sed-area-groups--columns .sed-area-group {
  position: relative;
}

.sed-area-groups--columns .sed-area-group:not(:last-child)::after {
  position: absolute;
  top: 0;
  right: calc(var(--sed-area-column-gap) / -2);
  bottom: 0;
  width: 1px;
  background: #d2dfe2;
  content: '';
}

.sed-area-group h2 {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 20px;
  color: #142b49;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
}

.sed-area-group h2::after {
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.18;
  content: '';
}

.sed-area-groups--columns .sed-area-group h2 {
  justify-content: center;
  margin: 0 0 44px;
  font-size: 1.35rem;
  text-align: center;
}

.sed-area-groups--columns .sed-area-group h2::after {
  display: none;
}

.sed-area-group h2 a {
  color: inherit;
  text-decoration: none;
}

.sed-area-group h2 a:hover,
.sed-area-group h2 a:focus-visible {
  color: color-mix(in srgb, var(--area-color) 70%, #142b49);
  text-decoration: none;
}

.sed-area-function-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 18px;
}

.sed-area-card-separator {
  flex: none;
  width: 100%;
  height: 1px;
  margin: 4px 0;
  border: 0;
  background: color-mix(in srgb, var(--area-color) 25%, #cbd5e1);
  opacity: 1;
}

.sed-area-group:has(h2) .sed-area-function-cards {
  justify-content: flex-start;
}

.sed-area-function-card {
  flex: 0 1 var(--sed-card-width, calc(25% - 13.5px));
  min-width: 0;
  max-width: 270px;
  min-height: 160px;
  color: #142b49;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.sed-area-function-card--described {
  padding: 20px 16px;
}

.sed-area-function-card__description {
  display: -webkit-box;
  overflow: hidden;
  max-width: 29ch;
  margin-top: 8px;
  color: #52657a;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sed-area-groups--columns .sed-area-function-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

.sed-area-groups--columns .sed-area-function-card {
  display: flex;
  flex: none;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 120px;
  padding: 18px;
  border: 1px solid rgba(19, 43, 70, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 40, 70, 0.06);
  font-size: 1.05rem;
  text-align: center;
}

.sed-area-groups--columns .sed-area-function-card::before {
  display: block;
}

.sed-area-groups--columns .sed-area-function-card:hover,
.sed-area-groups--columns .sed-area-function-card:focus-visible {
  border-color: color-mix(in srgb, var(--area-color) 22%, #e0e7ed);
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 40, 70, 0.09);
}

.sed-area-group--nested .sed-area-function-card {
  max-width: 245px;
  min-height: 132px;
  font-size: 1.05rem;
}

.sed-area-groups--columns .sed-area-group--nested .sed-area-function-card {
  max-width: none;
  min-height: 120px;
  font-size: 1.05rem;
}

.sed-area-page--submenu .sed-area-function-card {
  max-width: 230px;
  min-height: 112px;
  font-size: 1rem;
}

.sed-area-function-card:hover,
.sed-area-function-card:focus-visible {
  color: color-mix(in srgb, var(--area-color) 70%, #142b49);
}

@media (max-width: 1050px) {
  .sed-home-areas--five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sed-home-areas--five > * { grid-column: span 2; }
  .sed-home-areas--five > :nth-child(4) { grid-column: 2 / span 2; }
  .sed-home-areas--five > :nth-child(5) { grid-column: 4 / span 2; }
}

@media (max-width: 850px) {
  .sed-home-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sed-home-areas--five,
  .sed-home-areas--six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sed-home-areas--five > * { grid-column: auto; }
  .sed-home-areas--five > :nth-child(4) { grid-column: auto; }
  .sed-home-areas--five > :nth-child(5) { grid-column: 1 / -1; justify-self: center; width: calc((100% - 18px) / 2); }
  .sed-area-function-card { flex-basis: calc((100% - 18px) / 2); }
  .sed-area-groups--columns { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }
  .sed-area-groups--columns .sed-area-group:nth-child(2n)::after { display: none; }
}

@media (max-width: 620px) {
  .sed-area-groups--columns,
  .sed-area-groups--columns.sed-area-groups--count-2 { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
  .sed-area-groups--columns.sed-area-groups--count-1 { max-width: 320px; }
  .sed-area-groups--columns .sed-area-group::after { display: none; }
}

@media (max-width: 620px) {
  .sed-home-landing { min-height: auto; padding: 36px 16px 64px; }
  body.sed-home-index .sed-home-landing,
  .sed-area-page { min-height: auto; padding-top: 44px; }
  .sed-home-intro { grid-template-rows: 40px 60px 42px; margin-bottom: 32px; }
  .sed-area-page.sed-home-area--dipendenti:not(.sed-area-page--submenu) .sed-home-intro { margin-bottom: 24px; }
  .sed-area-groups--columns .sed-area-group h2 { margin-bottom: 24px; }
  body.sed-home-index .header .navbar-brand img { width: 120px; }
  .sed-home-areas { grid-template-columns: 1fr; }
  .sed-home-areas--five,
  .sed-home-areas--six { grid-template-columns: 1fr; }
  .sed-home-areas--five > :nth-child(5) { grid-column: auto; width: 100%; }
  .sed-home-area { min-height: 190px; }
  .sed-area-function-card,
  .sed-area-group--nested .sed-area-function-card,
  .sed-area-page--submenu .sed-area-function-card { flex-basis: 100%; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sed-home-area,
  .sed-area-function-card { transition: none; }
}
