/* Owner-selected Portale composition. Loaded only by the Assoabitare build;
   shared BI source, calculator logic and activation gates remain untouched. */
html[data-association="assoabitare"] body::before { display: none; }

html[data-association="assoabitare"] .header,
html[data-association="assoabitare"] .header.solid {
  position: static;
  flex-wrap: wrap;
  gap: 28px;
  padding: 22px max(40px, calc((100% - 1200px) / 2));
  border-bottom: 1px solid var(--stone);
  background: var(--bg-page);
  box-shadow: none;
  transition: none;
}

html[data-association="assoabitare"] .header .logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  min-height: 44px;
}

html[data-association="assoabitare"] .header .logo img {
  width: 220px;
  height: auto;
  transition: none;
}

html[data-association="assoabitare"] .header .logo .logo-on-dark { display: none; }
html[data-association="assoabitare"] .header .logo .logo-on-light { display: block; }

html[data-association="assoabitare"] .header .nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
  margin: 0;
}

html[data-association="assoabitare"] .header .nav-link,
html[data-association="assoabitare"] .header .nav-login {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  color: var(--bark);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
}

html[data-association="assoabitare"] .header .nav-login:hover,
html[data-association="assoabitare"] .header .nav-login:focus-visible { color: var(--terracotta); }

html[data-association="assoabitare"] .header .nav-cta {
  justify-content: center;
  min-height: 48px;
  font-size: 0.9375rem;
  line-height: 1.3 !important;
  transform: none;
  box-shadow: none;
}

html[data-association="assoabitare"] .header .menu-toggle,
html[data-association="assoabitare"] .header .mobile-nav { display: none; }

html[data-association="assoabitare"] .footer-logo img { width: 220px; height: auto; }
html[data-association="assoabitare"] .footer-main {
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(0, 1fr));
  max-width: 1200px;
  gap: 40px;
  margin-inline: auto;
}
html[data-association="assoabitare"] .footer-bottom { max-width: 1200px; margin-inline: auto; }

.asso-portal-wrap { max-width: 1280px; padding-inline: 40px; margin-inline: auto; }
.asso-portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 72px;
  padding-block: 70px;
}
.asso-portal-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 26px;
}
.asso-portal-eyebrow { color: var(--olive); font-size: 0.9375rem; font-weight: 700; line-height: 1.4; }
.asso-portal h1 {
  max-width: 13ch;
  margin: 0;
  color: var(--fg-heading);
  font-family: var(--font-body);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.035;
  letter-spacing: -0.04em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.asso-portal-intro { max-width: 52ch; margin: 0; color: var(--earth); font-size: 1.25rem; line-height: 1.5; }
.asso-portal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.asso-portal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 22px;
  border-radius: 6px;
  background: var(--terracotta);
  color: var(--cream);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
.asso-portal-cta:hover { background: var(--terracotta-light); color: var(--cream); }
.asso-portal-secondary { display: flex; align-items: center; min-height: 48px; padding-block: 12px; color: var(--bark); font-weight: 700; text-decoration: none; }
.asso-portal-secondary:hover { color: var(--terracotta); }
.asso-portal-city-panel { min-width: 0; padding: 32px; border: 1px solid var(--stone); border-radius: 12px; background: var(--parchment); }
.asso-portal-city-panel h2 { max-width: 15ch; margin: 0; color: var(--fg-heading); font-size: 1.875rem; font-weight: 700; line-height: 1.16; letter-spacing: -0.025em; }
.asso-portal-city-panel > p { margin: 16px 0 0; color: var(--earth); font-size: 1rem; line-height: 1.5; }
.asso-portal-city-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.asso-portal-city-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 88px;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--stone);
  border-radius: 6px;
  background: var(--bg-page);
  color: var(--olive);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}
.asso-portal-city-link:hover { border-color: var(--terracotta); color: var(--terracotta); }
.asso-portal-arrow { flex: none; font-size: 1.35rem; }
.asso-portal-services { padding-block: 12px 28px; border-top: 1px solid var(--stone); background: var(--parchment); }
.asso-portal-service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.asso-portal-service-link { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 30px; padding-block: 16px; color: var(--olive); font-size: 1.125rem; font-weight: 600; text-decoration: none; }
.asso-portal-service-link + .asso-portal-service-link { padding-inline-start: 32px; border-inline-start: 1px solid var(--stone); }
.asso-portal-service-link:hover { color: var(--terracotta); }

@media (max-width: 1100px) {
  html[data-association="assoabitare"] .header,
  html[data-association="assoabitare"] .header.solid { gap: 12px 24px; padding-inline: 28px; }
  html[data-association="assoabitare"] .header .nav { order: 3; flex-basis: 100%; justify-content: space-between; gap: 0 12px; }
  .asso-portal-wrap { padding-inline: 28px; }
  .asso-portal-hero { gap: 36px; }
  .asso-portal h1 { font-size: 3.25rem; }
}

@media (max-width: 700px) {
  html[data-association="assoabitare"] .header,
  html[data-association="assoabitare"] .header.solid { gap: 12px; padding: 16px 22px; }
  html[data-association="assoabitare"] .header .logo img { width: 178px; }
  html[data-association="assoabitare"] .header .nav { justify-content: flex-start; gap: 0 18px; }
  html[data-association="assoabitare"] .header .nav-link,
  html[data-association="assoabitare"] .header .nav-login { min-height: 38px; font-size: 0.875rem; }
  html[data-association="assoabitare"] .header .nav-cta { min-height: 44px; margin: 0; padding: 10px 14px !important; font-size: 0.875rem; }
  html[data-association="assoabitare"] .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  html[data-association="assoabitare"] .footer-logo { grid-column: 1 / -1; }
  .asso-portal-wrap { padding-inline: 22px; }
  .asso-portal-hero { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-block: 34px 38px; }
  .asso-portal-copy { gap: 22px; }
  .asso-portal h1 { max-width: 14ch; font-size: 2.625rem; line-height: 1.06; }
  .asso-portal-intro { font-size: 1.125rem; }
  .asso-portal-city-panel { padding: 24px; }
  .asso-portal-city-panel h2 { max-width: none; font-size: 1.75rem; }
  .asso-portal-city-link { min-height: 76px; padding: 16px; }
  .asso-portal-service-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .asso-portal-service-link { min-height: 60px; padding-block: 14px; font-size: 1rem; }
  .asso-portal-service-link + .asso-portal-service-link { padding-inline-start: 0; border-top: 1px solid var(--stone); border-inline-start: 0; }
}

@media (max-width: 360px) {
  html[data-association="assoabitare"] .header,
  html[data-association="assoabitare"] .header.solid { padding-inline: 18px; }
  html[data-association="assoabitare"] .header .logo img { width: 165px; }
  html[data-association="assoabitare"] .header .nav-cta { padding-inline: 10px !important; font-size: 0.8125rem; }
  .asso-portal-wrap { padding-inline: 18px; }
  .asso-portal h1 { font-size: 2.375rem; }
  .asso-portal-city-panel { padding: 20px; }
  .asso-portal-city-grid { gap: 8px; }
  .asso-portal-city-link { padding: 12px; font-size: 1.125rem; }
}

@media (forced-colors: active) {
  .asso-portal-cta,
  .asso-portal-city-panel,
  .asso-portal-city-link { border: 1px solid CanvasText; }
}
