:root {
  --motion-shell-yellow: #f5c518;
  --motion-shell-text: #182232;
  --motion-shell-muted: #667085;
  --motion-shell-line: #dfe5ee;
  --motion-shell-radius: 22px;
  --motion-shell-shadow: 0 24px 70px rgba(13, 20, 33, 0.085);
  --motion-shell-max-width: 1180px;
  --motion-shell-gutter: 48px;
  --motion-header-max-width: 1376px;
  --motion-header-gutter: 64px;
}

.site-header,
.site-header *,
.site-footer,
.site-footer * {
  box-sizing: border-box;
}

.section-shell {
  width: min(var(--motion-shell-max-width), calc(100% - var(--motion-shell-gutter)));
  margin: 0 auto;
}

body.area-personale-page {
  --motion-shell-max-width: 1376px;
  --motion-shell-gutter: 64px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
  backdrop-filter: blur(18px);
  transition: transform 0.22s ease;
  will-change: transform;
}

.site-header.is-scroll-hidden {
  transform: translateY(calc(-100% - 2px));
}

.site-header-inner {
  width: min(var(--motion-header-max-width), calc(100vw - var(--motion-header-gutter)));
  margin: 0 auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-link img {
  display: block;
  width: 176px;
  height: auto;
}

.footer-logo img {
  width: 166px;
}

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-size: 14px;
  font-weight: 760;
}

.main-nav > a,
.nav-dropdown-button,
.header-action-button {
  padding: 12px 15px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav > a:hover,
.nav-dropdown-button:hover,
.header-action-button:hover {
  background: rgba(245, 197, 24, 0.10);
}

.header-action-form {
  margin: 0;
}

.login-link {
  border: 1px solid rgba(20, 30, 45, 0.15);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(20, 30, 45, 0.05);
  cursor: pointer;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  top: 100%;
  z-index: 1;
  height: 18px;
}

.nav-dropdown-button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 2;
  width: 232px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(211, 217, 226, 0.9);
  border-radius: 18px;
  box-shadow: var(--motion-shell-shadow);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 12px 13px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.16), rgba(245, 197, 24, 0.04));
}

.site-footer {
  margin-top: 34px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr;
  gap: 38px;
  padding: 36px;
  border: 1px solid var(--motion-shell-line);
  border-radius: var(--motion-shell-radius);
  background: rgba(255, 255, 255, 0.86);
}

.footer-brand p {
  max-width: 370px;
  color: var(--motion-shell-muted);
  font-size: 14px;
  line-height: 1.65;
}

.footer-col h4 {
  margin: 0 0 15px;
  color: var(--motion-shell-text);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  margin: 10px 0;
  color: var(--motion-shell-muted);
  font-size: 14px;
  text-decoration: none;
}

.footer-col a:hover,
.footer-bottom a:hover {
  color: var(--motion-shell-text);
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--motion-shell-line);
  color: var(--motion-shell-muted);
  font-size: 13px;
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

@media (max-width: 980px) {
  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .section-shell {
    width: min(100% - 28px, var(--motion-shell-max-width));
  }

  .site-header-inner {
    width: min(100% - 28px, var(--motion-header-max-width));
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
  }

  .main-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
