/* Rebuild responsive - Albo Nazionale Avvocati
   Versione più conservativa: layout esterno moderno, controlli ASP.NET intatti. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  font-family: "lucida sans", "lucida grande", tahoma, verdana, arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: #333;
  /* background: #fff; */
    background: linear-gradient(
        to bottom,
        #f8fafc 0%,
        #eef2f7 100%
    );
}

img { border: 0; height: auto; }
a { overflow-wrap: anywhere; }
form { margin: 0; padding: 0; }

.ana-page {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 0 14px 24px;
}

.ana-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid #e6e6e6;
}

.ana-navbar-logo { display: inline-block; flex: 0 0 auto; }
.ana-navbar-logo img {
  display: block;
  width: auto;
  max-width: 330px;
  max-height: none;
}

.ana-nav {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
}

.ana-nav a { display: inline-block; padding: 7px 0; }

.ana-brand {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 22px 0;
}

.ana-logo { display: block; }
.ana-logo img {
  display: block;
  width: auto;
  max-width: 380px;
}

.ana-hero { text-align: right; }
.ana-hero h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  color: #333;
}

.ana-hero p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #555;
}

.ana-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 26px;
  align-items: stretch;
}

.ana-card {
  min-width: 0;
  height: 100%;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.04);
}

.ana-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  margin-bottom: 16px;
  padding-bottom: 7px;
  border-bottom: 1px solid #d0d0d0;
  background: #f5f5f5;
  padding: 6px 8px;
}

.ana-title-img,
.ana-member-title img {
  display: inline-block;
  width: auto;
  max-width: none;
  height: auto;
  flex: 0 0 auto;
}

.ana-geo-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: #808080;
}

.ana-geo-link img,
.ana-link-row img {
  width: auto;
  max-width: none;
  height: auto;
  vertical-align: middle;
}

.ana-region-list { line-height: 1.7; }
.ana-region-list table { max-width: 100%; }
.ana-region-list a { display: inline-block; padding: 1px 0; }

.ana-link-row { margin-top: 12px; line-height: 1.5; }
.ana-link-row img { margin-right: 5px; }

.ana-divider { height: 1px; background: #eee; margin: 26px 0; }

.ana-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 0;
}

.ana-tab {
  display: block;
  text-align: center;
  padding: 9px 8px;
  background: #efefef;
  border: 1px solid #ccc;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  font-weight: 600;
  color: #333 !important;
}

.ana-search-panel {
  min-height: 235px;
  border: 1px solid #ccc;
  background: #fafafa;
  padding: 18px;
  border-radius: 0 0 7px 7px;
}

.ana-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  align-items: end;
}

.ana-field { min-width: 0; }
.ana-field-full { grid-column: 1 / -1; }

.ana-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 700;
}

.ana-search-panel input[type="text"],
.ana-search-panel select,
.ana-search-panel textarea {
  width: 100% !important;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
}

.ana-search-panel select[multiple],
.ana-search-panel select[size] { min-height: 78px; }

.ana-submit { text-align: right; }
.ana-submit input[type="image"] {
  width: auto !important;
  max-width: 64px !important;
  min-width: 42px;
  height: auto !important;
}

.ana-advanced { margin-top: 18px; }
.ana-member-links { margin-top: 24px; }
.ana-member-title {
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #d0d0d0;
}

.ana-footer { margin-top: 28px; }
.ana-footer iframe {
  display: block;
  width: 100%;
  min-height: 230px;
  border: 0;
}

.clear { clear: both; }

@media (max-width: 900px) {
  .ana-brand {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
  }
  .ana-logo img { max-width: 320px; }
  .ana-main { grid-template-columns: minmax(0, 1fr) 360px; }
}

@media (max-width: 760px) {
  .ana-page { padding-left: 12px; padding-right: 12px; }

  .ana-topbar,
  .ana-brand,
  .ana-main {
    display: block;
  }

  .ana-navbar-logo img,
  .ana-logo img {
    margin-left: auto;
    margin-right: auto;
  }

  .ana-navbar-logo img { max-width: min(330px, 92vw); }
  .ana-logo img { max-width: min(360px, 92vw); }

  .ana-nav {
    justify-content: center;
    margin-top: 10px;
  }

  .ana-hero {
    margin-top: 16px;
    text-align: center;
  }

  .ana-hero h1 { font-size: 26px; }
  .ana-hero p { font-size: 14px; }

  .ana-search { margin-top: 22px; }
  .ana-card { height: auto; padding: 16px; }
}

@media (max-width: 520px) {
  .ana-nav { display: block; text-align: center; }
  .ana-nav a { display: block; padding: 9px 4px; }

  .ana-section-title {
    display: block;
    text-align: left;
  }
  .ana-geo-link { margin-bottom: 6px; }

  .ana-form-grid { grid-template-columns: 1fr; }
  .ana-field-full { grid-column: auto; }

  .ana-tabs { display: block; }
  .ana-tab {
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 6px;
  }

  .ana-search-panel { border-radius: 7px; min-height: 0; }
  .ana-submit { text-align: center; }

  .ana-hero h1 { font-size: 23px; }
}

/* Ritocchi v3: proporzioni, blocco materia separato, immagini più leggibili */
.ana-page {
  width: min(1120px, 100%);
}

.ana-navbar-logo img {
  /* min-width: 310px;
  max-width: 420px; */
  min-width: 210px;
  max-width: 240px;
}

.ana-brand {
  grid-template-columns: 420px minmax(0, 1fr);
  padding: 26px 0 28px;
}

.ana-logo img {
  max-width: 420px;
}

.ana-hero h1 {
  font-size: 32px;
}

.ana-main {
  grid-template-columns: minmax(0, 55fr) minmax(390px, 45fr);
  align-items: start;
}

.ana-left-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  min-width: 0;
}

.ana-card {
  height: auto;
}

.ana-regions {
  min-height: 0;
}

.ana-materia {
  padding-top: 16px;
  padding-bottom: 16px;
}

.ana-materia .ana-section-title {
  margin-bottom: 12px;
}

.ana-materia-link {
  margin-top: 0;
  font-size: 15px;
}

.ana-materia-link a {
  font-weight: 700;
}

.ana-search-panel {
  min-height: 250px;
}

.ana-search-panel input[type="text"],
.ana-search-panel select,
.ana-search-panel textarea {
  min-height: 38px;
  font-size: 14px;
}

.ana-submit input[type="image"] {
  max-width: 78px !important;
  min-width: 58px;
}

.ana-footer {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.ana-footer iframe {
  min-height: 270px;
}

@media (max-width: 900px) {
  .ana-brand {
    grid-template-columns: 360px minmax(0, 1fr);
  }

  .ana-logo img {
    max-width: 360px;
  }

  .ana-main {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
}

@media (max-width: 760px) {
  .ana-navbar-logo img {
    min-width: 0;
    max-width: min(420px, 94vw);
  }

  .ana-logo img {
    max-width: min(420px, 94vw);
  }

  .ana-left-column {
    gap: 16px;
  }

  .ana-materia {
    margin-bottom: 0;
  }
}


/* Ritocchi v4: colonna sinistra uniforme, testi coerenti, footer nuovo */
.ana-main {
  align-items: stretch;
}

.ana-left-column {
  display: block;
  height: 100%;
}

.ana-left-card,
.ana-search {
  height: 100%;
  min-height: 0;
}

.ana-left-card {
  display: flex;
  flex-direction: column;
}

.ana-region-list,
.ana-region-list table,
.ana-region-list td,
.ana-region-list a,
.ana-worldwide,
.ana-materia-link,
.ana-materia-link a {
  font-size: 15px;
  line-height: 1.65;
}

.ana-region-list a,
.ana-worldwide a,
.ana-materia-link a {
  color: inherit;
  text-decoration: none;
}

.ana-region-list a:hover,
.ana-worldwide a:hover,
.ana-materia-link a:hover {
  text-decoration: underline;
}

.ana-inner-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e1e1e1;
}

.ana-section-title-small {
  margin-bottom: 12px;
}

.ana-materia-link {
  margin-top: 6px;
  font-weight: normal;
}

.ana-materia-link a {
  font-weight: normal;
}

.ana-search {
  display: flex;
  flex-direction: column;
}

.ana-search-panel {
  min-height: 235px;
}

.ana-footer {
  margin: 30px auto 0;
  padding: 18px 14px 20px;
  max-width: 980px;
  border-top: 1px solid #dcdcdc;
  text-align: center;
  color: #555;
  background: #fff;
}

.ana-footer iframe {
  display: none;
}

.ana-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.8;
}

.ana-footer-links a {
  color: #444;
  text-decoration: none;
  padding: 0 8px;
  border-right: 1px solid #bbb;
}

.ana-footer-links a:last-child {
  border-right: 0;
}

.ana-footer-links a:hover {
  text-decoration: underline;
}

.ana-footer-copy {
  padding-top: 10px;
  border-top: 8px solid #e5e5e5;
  font-size: 13px;
  color: #666;
}

@media (max-width: 760px) {
  .ana-left-card,
  .ana-search {
    height: auto;
  }

  .ana-region-list,
  .ana-region-list table,
  .ana-region-list td,
  .ana-region-list a,
  .ana-worldwide,
  .ana-materia-link,
  .ana-materia-link a {
    font-size: 16px;
    line-height: 1.7;
  }

  .ana-inner-section {
    margin-top: 20px;
    padding-top: 16px;
  }

  .ana-footer-links {
    display: block;
  }

  .ana-footer-links a {
    display: block;
    border-right: 0;
    padding: 4px 0;
  }
}

/* Ritocchi v5: rifinitura prudente layout, font e footer */
.ana-page {
  width: min(1200px, 100%);
}

.ana-main {
  grid-template-columns: minmax(0, 56fr) minmax(410px, 44fr);
  gap: 28px;
}

.ana-card {
  padding: 22px;
}

.ana-region-list,
.ana-region-list table,
.ana-region-list td,
.ana-region-list a,
.ana-worldwide,
.ana-worldwide a,
.ana-materia-link,
.ana-materia-link a,
.ana-advanced,
.ana-advanced a,
.ana-member-links,
.ana-member-links a {
  font-size: 16px;
  line-height: 1.72;
}

.ana-materia-link a {
  font-weight: normal;
  color: inherit;
}

.ana-section-title {
  margin-bottom: 18px;
}

.ana-section-title-small {
  margin-bottom: 12px;
}

.ana-inner-section {
  margin-top: 26px;
  padding-top: 20px;
}

.ana-search-panel {
  min-height: 245px;
}

.ana-field label {
  font-size: 14px;
  line-height: 1.45;
}

.ana-search-panel input[type="text"],
.ana-search-panel select,
.ana-search-panel textarea {
  font-size: 14px;
  min-height: 38px;
}

.ana-footer {
  max-width: none;
  margin-top: 44px;
  padding: 26px 22px 24px;
  border-top: 1px solid #d7d7d7;
  background: #f7f7f7;
  text-align: center;
}

.ana-footer-links {
  max-width: 980px;
  margin: 0 auto 16px;
  gap: 8px 0;
  font-size: 15px;
  line-height: 1.8;
}

.ana-footer-links a {
  font-size: 15px;
  padding: 0 10px;
  color: #333;
}

.ana-footer-copy {
  max-width: 980px;
  margin: 0 auto;
  padding-top: 14px;
  border-top: 1px solid #dedede;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .ana-page { width: min(1120px, 100%); }
  .ana-main { grid-template-columns: minmax(0, 1fr) 390px; gap: 22px; }
}

@media (max-width: 760px) {
  .ana-main { display: block; }
  .ana-card { padding: 18px; }
  .ana-region-list,
  .ana-region-list table,
  .ana-region-list td,
  .ana-region-list a,
  .ana-worldwide,
  .ana-worldwide a,
  .ana-materia-link,
  .ana-materia-link a,
  .ana-advanced,
  .ana-advanced a,
  .ana-member-links,
  .ana-member-links a {
    font-size: 16px;
    line-height: 1.72;
  }
  .ana-footer { margin-top: 32px; padding: 24px 16px; }
  .ana-footer-links a { display: block; border-right: 0; padding: 5px 0; }
}


/* Ritocchi v7: elenco regioni a 2 colonne, senza distorsioni sui nomi lunghi */
.ana-region-list {
  width: 100%;
}

.ana-region-list .ana-region-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 42px;
  row-gap: 4px;
  width: 100%;
}

.ana-region-list .ana-region-item {
  min-width: 0;
  font-size: 16px;
  line-height: 1.72;
  white-space: normal;
}

.ana-region-list .ana-region-item a,
.ana-region-list .ana-region-item span {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.ana-region-arrow {
  display: inline-block;
  margin-right: 5px;
}

@media (max-width: 520px) {
  .ana-region-list .ana-region-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
}

/* Pagina comuni - rebuild responsive */
.ana-inner-page {
  width: min(1200px, 100%);
}

.ana-inner-brand {
  grid-template-columns: 360px minmax(0, 1fr);
  padding-bottom: 24px;
}

.ana-inner-brand .ana-logo img {
  max-width: 360px;
}

.ana-inner-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.ana-directory-card,
.ana-side-card {
  height: auto;
}

.ana-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.5;
}

.ana-breadcrumb img {
  width: auto;
  max-width: none;
}

.ana-page-title-row {
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid #dcdcdc;
  background: #f7f7f7;
}

.ana-page-title-row h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: #333;
}

.ana-page-subtitle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  line-height: 1.5;
  color: #555;
}

.ana-page-subtitle img {
  width: auto;
  max-width: none;
}

.ana-city-list {
  font-size: 15px;
  line-height: 1.7;
}

.ana-city-list table {
  width: 100% !important;
  max-width: 100%;
}

.ana-city-list td {
  font-size: 15px;
  line-height: 1.7;
  vertical-align: top;
  padding: 3px 10px 3px 0;
}

.ana-city-list a {
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: normal;
  word-break: normal;
}

.ana-side-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.ana-side-card p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}

.ana-signup-link {
  display: block;
  text-align: center;
}

.ana-signup-link img {
  width: auto;
  max-width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .ana-inner-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .ana-side-card {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .ana-inner-brand {
    display: block;
  }

  .ana-page-title-row h2 {
    font-size: 20px;
  }

  .ana-city-list,
  .ana-city-list td,
  .ana-city-list a {
    font-size: 16px;
    line-height: 1.75;
  }
}

/* Pagina materia - rebuild responsive */
.ana-subject-page .ana-inner-main {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.ana-subject-actions {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #e1e1e1;
  background: #fbfbfb;
  font-size: 15px;
  line-height: 1.5;
}

.ana-subject-actions a {
  font-weight: 700;
}

.ana-subject-list {
  width: 100%;
  font-size: 15px;
  line-height: 1.65;
}

.ana-subject-list > div {
  width: 100% !important;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 8px;
}

.ana-subject-list > div > div {
  float: none !important;
  width: auto !important;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: normal;
  word-break: normal;
}

.ana-subject-list input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 3px;
}

.ana-subject-submit {
  margin-top: 22px;
  text-align: right;
}

.ana-subject-submit input[type="image"] {
  width: auto !important;
  max-width: 78px !important;
  min-width: 58px;
  height: auto !important;
}

@media (max-width: 980px) {
  .ana-subject-list > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ana-subject-page .ana-inner-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .ana-subject-list > div {
    grid-template-columns: 1fr;
  }

  .ana-subject-actions,
  .ana-subject-list,
  .ana-subject-list > div > div {
    font-size: 16px;
    line-height: 1.65;
  }

  .ana-subject-submit {
    text-align: center;
  }
}

/* Pagina subscriber advocate - rebuild responsive */
.ana-subscriber-page .ana-inner-main {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.ana-subscriber-content {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.ana-subscriber-content table {
  max-width: 100%;
}

.ana-subscriber-content input[type="text"],
.ana-subscriber-content input[type="password"],
.ana-subscriber-content textarea,
.ana-subscriber-content select {
  max-width: 100%;
  box-sizing: border-box;
}

.ana-subscriber-content textarea {
  width: 100%;
}

.ana-subscriber-content img {
  max-width: 100%;
  height: auto;
}

.ana-subscriber-side-card h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .ana-subscriber-page .ana-inner-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .ana-subscriber-content,
  .ana-subscriber-content table,
  .ana-subscriber-content tbody,
  .ana-subscriber-content tr,
  .ana-subscriber-content td {
    max-width: 100% !important;
  }

  .ana-subscriber-content td {
    box-sizing: border-box;
  }

  .ana-subscriber-content input[type="text"],
  .ana-subscriber-content input[type="password"],
  .ana-subscriber-content textarea,
  .ana-subscriber-content select {
    width: 100%;
  }
}

/* Subscriber advocate - correzione responsive effettiva del modulo legacy */
.ana-subscriber-page .ana-inner-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.ana-subscriber-card,
.ana-subscriber-content,
.ana-subscriber-content * {
  max-width: 100%;
}

.ana-subscriber-content {
  width: 100%;
  overflow-x: hidden;
}

.ana-subscriber-content table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: auto;
  border-collapse: collapse;
}

.ana-subscriber-content td,
.ana-subscriber-content th {
  max-width: 100% !important;
  box-sizing: border-box;
  vertical-align: top;
}

.ana-subscriber-content input[type="text"],
.ana-subscriber-content input[type="password"],
.ana-subscriber-content input[type="file"],
.ana-subscriber-content textarea,
.ana-subscriber-content select {
  max-width: 100% !important;
  box-sizing: border-box;
}

.ana-subscriber-content textarea {
  width: 100% !important;
  min-height: 90px;
}

.ana-subscriber-content input[type="submit"],
.ana-subscriber-content input[type="button"],
.ana-subscriber-content button,
.ana-subscriber-content a {
  max-width: 100%;
}

.ana-subscriber-content img {
  max-width: 100% !important;
  height: auto !important;
}

@media (max-width: 900px) {
  .ana-subscriber-page .ana-inner-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .ana-subscriber-side-card {
    order: -1;
  }
}

@media (max-width: 640px) {
  .ana-subscriber-page .ana-page-title-row h2 {
    font-size: 22px;
  }

  .ana-subscriber-content table,
  .ana-subscriber-content tbody,
  .ana-subscriber-content tr,
  .ana-subscriber-content td,
  .ana-subscriber-content th {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
  }

  .ana-subscriber-content tr {
    margin-bottom: 10px;
  }

  .ana-subscriber-content td,
  .ana-subscriber-content th {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .ana-subscriber-content input[type="file"],
  .ana-subscriber-content textarea,
  .ana-subscriber-content select {
    width: 100% !important;
  }

  .ana-subscriber-content input[type="text"],
  .ana-subscriber-content input[type="password"] {
    max-width: 100% !important;
  }

  .ana-subscriber-content input[type="checkbox"],
  .ana-subscriber-content input[type="radio"] {
    width: auto !important;
  }
}

/* Subscriber: testo checkbox cliccabile */
.ana-subscriber-content .ana-checkbox-click-label {
  cursor: pointer;
  display: inline;
}

/* Standard campi modulo - stile sobrio e uniforme.
   Nota: non forziamo width:100% su tutti gli input legacy, perché alcuni campi
   sono composti da più caselle affiancate, ad esempio giorno/mese/anno. */
.ana-search-panel input[type="text"],
.ana-search-panel input[type="email"],
.ana-search-panel input[type="password"],
.ana-search-panel select,
.ana-search-panel textarea,
.ana-login-card input[type="text"],
.ana-login-card input[type="email"],
.ana-login-card input[type="password"],
.ana-login-card select,
.ana-login-card textarea,
.ana-subscriber-content input[type="text"],
.ana-subscriber-content input[type="email"],
.ana-subscriber-content input[type="password"],
.ana-subscriber-content select,
.ana-subscriber-content textarea {
  max-width: 100% !important;
  padding: 8px 10px !important;
  border: 1px solid #cccccc !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #333333;
}

/* Larghezza piena solo nei contenitori in cui il campo deve realmente occupare tutta la riga. */
.ana-search-panel .ana-field input[type="text"],
.ana-search-panel .ana-field input[type="email"],
.ana-search-panel .ana-field input[type="password"],
.ana-search-panel .ana-field select,
.ana-search-panel .ana-field textarea,
.ana-login-card input[type="text"],
.ana-login-card input[type="email"],
.ana-login-card input[type="password"],
.ana-login-card select,
.ana-login-card textarea {
  width: 100% !important;
}

.ana-search-panel input[type="text"]:focus,
.ana-search-panel input[type="email"]:focus,
.ana-search-panel input[type="password"]:focus,
.ana-search-panel select:focus,
.ana-search-panel textarea:focus,
.ana-login-card input[type="text"]:focus,
.ana-login-card input[type="email"]:focus,
.ana-login-card input[type="password"]:focus,
.ana-login-card select:focus,
.ana-login-card textarea:focus,
.ana-subscriber-content input[type="text"]:focus,
.ana-subscriber-content input[type="email"]:focus,
.ana-subscriber-content input[type="password"]:focus,
.ana-subscriber-content select:focus,
.ana-subscriber-content textarea:focus {
  border-color: #999999 !important;
  outline: none !important;
  box-shadow: none !important;
}

.ana-subscriber-content textarea {
  min-height: 90px;
  resize: vertical;
}

.ana-subscriber-content input[type="checkbox"],
.ana-subscriber-content input[type="radio"] {
  width: auto !important;
  max-width: none !important;
  margin-right: 5px;
}


/* Fix risultati_responsive: il contenuto prodotto dallo XSLT usa float inline;
   si forza il clear per mantenere pagination e footer dopo l'elenco. */
.ana-results-list {
  display: block;
  width: 100%;
}

.ana-results-list::after {
  content: "";
  display: block;
  clear: both;
}

.ana-paging-bottom {
  clear: both;
  display: block;
  width: 100%;
  margin-top: 24px;
  padding-top: 16px;
  text-align: center;
}

.ana-footer {
  clear: both;
}

/* Fix subscriber_advocate_responsive mobile: i campi input legacy composti
   da più caselle, come giorno/mese/anno, non devono essere forzati a width:100%.
   Restano fluidi textarea, select e file; gli input testuali conservano la larghezza
   generata dal controllo ASP.NET, con max-width prudente per non uscire dal layout. */
@media (max-width: 640px) {
  .ana-subscriber-content input[type="text"],
  .ana-subscriber-content input[type="email"],
  .ana-subscriber-content input[type="password"] {
    width: auto !important;
    max-width: 100% !important;
  }

  .ana-subscriber-content textarea,
  .ana-subscriber-content select,
  .ana-subscriber-content input[type="file"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Pagina incentiva - area personale iscritti */
.ana-incentiva-page .ana-inner-main {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.ana-incentiva-card,
.ana-incentiva-card * {
  max-width: 100%;
  box-sizing: border-box;
}

.ana-incentiva-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  background: #fbfbfb;
  font-size: 16px;
  line-height: 1.5;
}

.ana-incentiva-actions a {
  font-weight: 700;
}

.ana-incentiva-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eeeeee;
  color: #777777;
  font-size: 18px;
  line-height: 1;
}

.ana-incentiva-frame {
  clear: both;
  width: 100%;
  margin-top: 18px;
  overflow-x: auto;
}

.ana-incentiva-frame iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  border: 0;
}

.ana-incentiva-side-card h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .ana-incentiva-page .ana-inner-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .ana-incentiva-actions {
    align-items: flex-start;
    font-size: 16px;
  }
}

/* Fix login_responsive: spaziatura e larghezza controllata dei campi nell'area riservata */
.ana-login-card {
  padding: 22px 24px;
}

.ana-login-card .ana-login-form,
.ana-login-form {
  margin-top: 16px;
  padding: 18px 22px;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: #ffffff;
}

.ana-login-card .ana-login-row,
.ana-login-row {
  margin-bottom: 12px;
  line-height: 1.45;
}

.ana-login-card input[type="text"],
.ana-login-card input[type="email"],
.ana-login-card input[type="password"] {
  width: 100% !important;
  max-width: 720px !important;
  min-height: 34px;
}

.ana-login-card input[type="checkbox"] {
  width: auto !important;
  max-width: none !important;
  margin: 0 6px 0 2px;
  vertical-align: middle;
}

.ana-login-card input[type="submit"],
.ana-login-card input[type="button"],
.ana-login-card button {
  margin-top: 6px;
}

@media (max-width: 760px) {
  .ana-login-card {
    padding: 18px;
  }

  .ana-login-card .ana-login-form,
  .ana-login-form {
    padding: 16px;
  }

  .ana-login-card input[type="text"],
  .ana-login-card input[type="email"],
  .ana-login-card input[type="password"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Fix login_responsive v2: campi meno larghi su desktop e spaziatura più ariosa.
   La regola precedente usava width:100% con max-width:720px; nel box login il contenitore
   era circa della stessa larghezza, quindi l'effetto visivo restava quasi invariato. */
.ana-login-card .ana-login-form {
  margin-top: 18px;
  padding: 20px 26px;
}

.ana-login-card .ana-login-row {
  margin-bottom: 13px;
}

.ana-login-card .ana-login-row label {
  display: block;
  margin-bottom: 5px;
}

.ana-login-card .ana-login-row input[type="text"],
.ana-login-card .ana-login-row input[type="email"],
.ana-login-card .ana-login-row input[type="password"] {
  width: 68% !important;
  min-width: 280px;
  max-width: 540px !important;
}

.ana-login-card .ana-login-submit-row,
.ana-login-card .ana-login-remember-row,
.ana-login-card .ana-login-recovery {
  margin-top: 6px;
}

@media (max-width: 760px) {
  .ana-login-card .ana-login-form {
    padding: 16px;
  }

  .ana-login-card .ana-login-row input[type="text"],
  .ana-login-card .ana-login-row input[type="email"],
  .ana-login-card .ana-login-row input[type="password"] {
    width: 100% !important;
    min-width: 0;
    max-width: 100% !important;
  }
}

/* Pagina SediSecondarie - gestione sedi secondarie area iscritti */
.ana-secondary-page .ana-inner-main {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.ana-secondary-card,
.ana-secondary-card * {
  max-width: 100%;
  box-sizing: border-box;
}

.ana-secondary-summary {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  background: #fbfbfb;
  font-size: 15px;
  line-height: 1.6;
}

.ana-secondary-form-wrap {
  width: 100%;
  overflow-x: auto;
}

.ana-secondary-form-table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse;
  table-layout: auto;
}

.ana-secondary-form-table td,
.ana-secondary-form-table th {
  box-sizing: border-box;
  vertical-align: top;
  padding: 5px 8px 5px 0;
  font-size: 14px;
  line-height: 1.45;
}

.ana-secondary-form-table td:first-child {
  width: 170px;
  white-space: nowrap;
}

.ana-secondary-form-table input[type="text"],
.ana-secondary-form-table input[type="email"],
.ana-secondary-form-table input[type="password"],
.ana-secondary-form-table select,
.ana-secondary-form-table textarea {
  max-width: 100% !important;
  padding: 8px 10px !important;
  border: 1px solid #cccccc !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #333333;
}

.ana-secondary-form-table input[type="text"],
.ana-secondary-form-table input[type="email"],
.ana-secondary-form-table input[type="password"],
.ana-secondary-form-table select {
  min-height: 34px;
}

.ana-secondary-form-table textarea {
  min-height: 90px;
  resize: vertical;
}

.ana-secondary-note {
  color: #666666;
  font-size: 13px;
  line-height: 1.45;
}

.ana-secondary-actions {
  padding-top: 12px !important;
}

.ana-secondary-actions img,
.ana-secondary-form-table img {
  max-width: 100%;
  height: auto;
}

.ana-secondary-viewer {
  clear: both;
  width: 100%;
  margin-top: 24px;
  overflow-x: auto;
}

.ana-secondary-viewer::after {
  content: "";
  display: block;
  clear: both;
}

.ana-secondary-viewer table {
  max-width: 100%;
}

.ana-secondary-side-card h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .ana-secondary-page .ana-inner-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .ana-secondary-form-wrap {
    overflow-x: hidden;
  }

  .ana-secondary-form-table,
  .ana-secondary-form-table tbody,
  .ana-secondary-form-table tr,
  .ana-secondary-form-table td,
  .ana-secondary-form-table th {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
  }

  .ana-secondary-form-table tr {
    margin-bottom: 10px;
  }

  .ana-secondary-form-table td,
  .ana-secondary-form-table th {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .ana-secondary-form-table td:first-child {
    width: 100% !important;
    white-space: normal;
    padding-bottom: 3px !important;
  }

  .ana-secondary-form-table input[type="text"],
  .ana-secondary-form-table input[type="email"],
  .ana-secondary-form-table input[type="password"],
  .ana-secondary-form-table select,
  .ana-secondary-form-table textarea {
    width: 100% !important;
    max-width: 100% !important;
  }

  .ana-secondary-note br {
    display: none;
  }
}


/* Pagina estero - allineamento tipografico al layout rebuild */
.ana-estero-page .ana-inner-main {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.ana-estero-card,
.ana-estero-list,
.ana-estero-list * {
  max-width: 100%;
  box-sizing: border-box;
}

.ana-estero-list {
  width: 100%;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: auto;
}

.ana-estero-list table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse;
}

.ana-estero-list td,
.ana-estero-list th,
.ana-estero-list div,
.ana-estero-list span,
.ana-estero-list p,
.ana-estero-list a {
  font-size: 15px !important;
  line-height: 1.7 !important;
}

.ana-estero-list td,
.ana-estero-list th {
  vertical-align: top;
  padding: 4px 12px 4px 0;
}

.ana-estero-list a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: normal;
  word-break: normal;
}

.ana-estero-list a:hover {
  text-decoration: underline;
}

.ana-estero-list img {
  width: auto;
  max-width: none;
  height: auto;
  vertical-align: middle;
}

.ana-estero-side h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .ana-estero-page .ana-inner-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .ana-estero-list,
  .ana-estero-list td,
  .ana-estero-list th,
  .ana-estero-list div,
  .ana-estero-list span,
  .ana-estero-list p,
  .ana-estero-list a {
    font-size: 16px !important;
    line-height: 1.75 !important;
  }
}

@media (max-width: 520px) {
  .ana-estero-list {
    overflow-x: hidden;
  }

  .ana-estero-list table,
  .ana-estero-list tbody,
  .ana-estero-list tr,
  .ana-estero-list td,
  .ana-estero-list th {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
  }

  .ana-estero-list td,
  .ana-estero-list th {
    padding-right: 0;
  }
}

/* Fix estero_responsive: uniforma la lista nazioni alla tipografia delle altre pagine rebuild.
   Il contenuto è generato da WucViewer/XSLT e può contenere tabelle/classi legacy,
   quindi la regola deve essere specifica e posta in fondo al CSS comune. */
.ana-estero-page .ana-estero-list,
.ana-estero-page .ana-estero-list table,
.ana-estero-page .ana-estero-list tbody,
.ana-estero-page .ana-estero-list tr,
.ana-estero-page .ana-estero-list td,
.ana-estero-page .ana-estero-list th,
.ana-estero-page .ana-estero-list div,
.ana-estero-page .ana-estero-list span,
.ana-estero-page .ana-estero-list p,
.ana-estero-page .ana-estero-list a,
.ana-estero-page .ana-estero-list font {
  font-size: 16px !important;
  line-height: 1.72 !important;
}

.ana-estero-page .ana-estero-list table {
  width: 100% !important;
  border-collapse: collapse;
}

.ana-estero-page .ana-estero-list td,
.ana-estero-page .ana-estero-list th {
  padding: 4px 24px 4px 0 !important;
  vertical-align: top !important;
}

.ana-estero-page .ana-estero-list a {
  color: inherit !important;
  text-decoration: none;
  overflow-wrap: normal;
  word-break: normal;
}

.ana-estero-page .ana-estero-list a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .ana-estero-page .ana-estero-list,
  .ana-estero-page .ana-estero-list table,
  .ana-estero-page .ana-estero-list tbody,
  .ana-estero-page .ana-estero-list tr,
  .ana-estero-page .ana-estero-list td,
  .ana-estero-page .ana-estero-list th,
  .ana-estero-page .ana-estero-list div,
  .ana-estero-page .ana-estero-list span,
  .ana-estero-page .ana-estero-list p,
  .ana-estero-page .ana-estero-list a,
  .ana-estero-page .ana-estero-list font {
    font-size: 16px !important;
    line-height: 1.75 !important;
  }
}

/* Pagina altri_estremi - ricerca avanzata */
.ana-altri-estremi-page .ana-inner-main {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.ana-altri-estremi-card,
.ana-altri-estremi-card * {
  max-width: 100%;
  box-sizing: border-box;
}

.ana-advanced-search-form {
  width: 100%;
  font-size: 16px;
  line-height: 1.6;
}

.ana-advanced-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.ana-radio-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.ana-radio-line input[type="radio"] {
  width: auto !important;
  max-width: none !important;
  margin-right: 4px;
}

.ana-radio-line label {
  margin-right: 12px;
}

.ana-form-separator {
  height: 1px;
  margin: 18px 0 20px;
  background: #dedede;
}

.ana-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
  align-items: end;
}

.ana-advanced-field {
  min-width: 0;
}

.ana-advanced-field-full {
  grid-column: 1 / -1;
}

.ana-advanced-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
  color: #333333;
}

.ana-advanced-field input[type="text"],
.ana-advanced-field input[type="email"],
.ana-advanced-field input[type="password"],
.ana-advanced-field select,
.ana-advanced-field textarea {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 38px;
  padding: 8px 10px !important;
  border: 1px solid #cccccc !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #333333;
}

.ana-advanced-field input[type="text"]:focus,
.ana-advanced-field input[type="email"]:focus,
.ana-advanced-field input[type="password"]:focus,
.ana-advanced-field select:focus,
.ana-advanced-field textarea:focus {
  border-color: #999999 !important;
  outline: none !important;
  box-shadow: none !important;
}

.ana-advanced-submit {
  margin-top: 22px;
}

.ana-advanced-submit input[type="image"] {
  width: auto !important;
  max-width: 78px !important;
  min-width: 58px;
  height: auto !important;
}

.ana-advanced-submit p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #777777;
}

.ana-side-links {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.7;
}

.ana-side-links li {
  padding: 7px 0;
  border-bottom: 1px solid #eeeeee;
}

.ana-side-links img {
  width: auto;
  max-width: none;
  height: auto;
  vertical-align: middle;
  margin-right: 5px;
}

.ana-side-links a {
  color: inherit;
  text-decoration: none;
}

.ana-side-links a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .ana-altri-estremi-page .ana-inner-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .ana-advanced-search-form {
    font-size: 16px;
    line-height: 1.7;
  }

  .ana-radio-line {
    display: block;
  }

  .ana-radio-line span,
  .ana-radio-line label {
    display: inline-block;
    margin-bottom: 7px;
  }

  .ana-advanced-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .ana-advanced-field-full {
    grid-column: auto;
  }

  .ana-advanced-submit {
    text-align: center;
  }
}

/* Fix chisiamo_advocate_responsive: contenuto profilo generato da XSLT.
   Mantiene il blocco riepilogo dentro la card e separa la biografia dal riepilogo superiore. */
.ana-advocate-page .ana-profile-card {
  overflow: hidden;
}

.ana-advocate-page .ana-profile-summary {
  clear: both;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  background: #f7f7f7;
  overflow: hidden;
  box-sizing: border-box;
}

.ana-advocate-page .ana-profile-summary::after {
  content: "";
  display: block;
  clear: both;
}

.ana-advocate-page .ana-profile-summary table,
.ana-advocate-page .ana-profile-summary tbody,
.ana-advocate-page .ana-profile-summary tr,
.ana-advocate-page .ana-profile-summary td,
.ana-advocate-page .ana-profile-summary div {
  max-width: 100%;
  box-sizing: border-box;
}

.ana-advocate-page .ana-profile-summary img {
  max-width: 90px;
  height: auto;
}

.ana-advocate-page .ana-profile-content {
  clear: both;
  margin-top: 18px;
  padding-top: 4px;
  font-size: 15px;
  line-height: 1.72;
  overflow-wrap: normal;
  word-break: normal;
}

.ana-advocate-page .ana-profile-content p,
.ana-advocate-page .ana-profile-content div,
.ana-advocate-page .ana-profile-content td {
  font-size: 15px;
  line-height: 1.72;
}

.ana-advocate-page .ana-profile-panel-maps,
.ana-advocate-page .ana-profile-panel-image {
  max-width: 100% !important;
  overflow: auto;
}

@media (max-width: 640px) {
  .ana-advocate-page .ana-profile-summary {
    padding: 12px;
  }

  .ana-advocate-page .ana-profile-summary img {
    max-width: 80px;
  }

  .ana-advocate-page .ana-profile-content,
  .ana-advocate-page .ana-profile-content p,
  .ana-advocate-page .ana-profile-content div,
  .ana-advocate-page .ana-profile-content td {
    font-size: 16px;
    line-height: 1.72;
  }
}

/* Fix chisiamo_advocate_responsive: riepilogo profilo XSLT.
   Lo XSLT legacy genera un contenitore inline con width:300px; qui lo si
   neutralizza per usare tutta la larghezza della card e mantenere i link
   del profilo su una sola riga in desktop. */
.ana-advocate-page .ana-profile-summary > div {
  width: 100% !important;
  max-width: 100% !important;
}

.ana-advocate-page .ana-profile-summary .advocateSfondo,
.ana-advocate-page .ana-profile-summary dl,
.ana-advocate-page .ana-profile-summary dt {
  max-width: 100% !important;
  box-sizing: border-box;
}

.ana-advocate-page .ana-profile-summary dl {
  width: 100% !important;
  margin: 0;
  padding: 0;
}

.ana-advocate-page .ana-profile-summary dt {
  display: block;
}

.ana-advocate-page .ana-profile-summary dt:last-child {
  white-space: nowrap;
}

.ana-advocate-page .ana-profile-summary a.linksP {
  white-space: nowrap;
}

.ana-advocate-page .ana-profile-content {
  margin-top: 22px;
}

@media (max-width: 640px) {
  .ana-advocate-page .ana-profile-summary dt:last-child {
    white-space: normal;
  }
}

/* Fix contattaci_advocate_responsive: spaziature modulo e campi legacy.
   Aggiunto in coda per non alterare le correzioni specifiche delle altre pagine. */
.ana-contact-main {
  align-items: start;
}

.ana-contact-card {
  padding: 24px;
}

.ana-contact-card .ana-page-title-row {
  margin-bottom: 20px;
}

.ana-contact-summary {
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  background: #f8f8f8;
  overflow: hidden;
}

.ana-contact-summary::after {
  content: "";
  display: block;
  clear: both;
}

.ana-contact-form-wrap {
  clear: both;
  margin-top: 8px;
}

.ana-contact-form-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.ana-contact-label {
  width: 135px;
  padding: 8px 14px 8px 0;
  vertical-align: top;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.5;
}

.ana-contact-control {
  padding: 0;
  vertical-align: top;
}

.ana-contact-control input[type="text"],
.ana-contact-control input[type="email"],
.ana-contact-control input[type="password"] {
  width: min(430px, 100%) !important;
  max-width: 100% !important;
  padding: 8px 10px !important;
  border: 1px solid #cccccc !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #333333;
}

.ana-contact-control textarea,
.ana-contact-control .textareaContattaci {
  width: 100% !important;
  max-width: 620px !important;
  min-height: 170px;
  padding: 9px 10px !important;
  border: 1px solid #cccccc !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #333333;
  resize: vertical;
}

.ana-contact-control input:focus,
.ana-contact-control textarea:focus,
.ana-contact-control .textareaContattaci:focus {
  border-color: #999999 !important;
  outline: none !important;
  box-shadow: none !important;
}

.ana-contact-privacy {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dotted #cccccc;
  font-size: 13px;
  line-height: 1.6;
  color: #555555;
}

.ana-contact-privacy p {
  margin: 0 0 8px;
}

.ana-contact-submit {
  margin-top: 18px;
}

.ana-contact-submit input[type="submit"],
.ana-contact-submit input[type="button"] {
  max-width: 100%;
  padding: 8px 14px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .ana-contact-card {
    padding: 18px;
  }

  .ana-contact-form-table,
  .ana-contact-form-table tbody,
  .ana-contact-form-table tr,
  .ana-contact-form-table td {
    display: block;
    width: 100% !important;
  }

  .ana-contact-form-table {
    border-spacing: 0;
  }

  .ana-contact-form-table tr {
    margin-bottom: 14px;
  }

  .ana-contact-label {
    padding: 0 0 5px;
    white-space: normal;
    font-size: 15px;
  }

  .ana-contact-control input[type="text"],
  .ana-contact-control input[type="email"],
  .ana-contact-control input[type="password"],
  .ana-contact-control textarea,
  .ana-contact-control .textareaContattaci {
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* Banner laterale AdSense sotto il box informativo.
   Aggiunta conservativa: non modifica le sezioni CSS esistenti. */
.ana-side-ads {
  margin-top: 18px;
  padding: 18px;
  text-align: center;
  min-height: 120px;
}

.ana-side-ads .adsbygoogle {
  display: block;
  width: 100%;
  min-height: 100px;
}

@media (max-width: 900px) {
  .ana-side-ads {
    margin-top: 18px;
  }
}

/* Legal notice responsive page - added conservatively */
.ana-legal-page .ana-directory-card {
  min-width: 0;
}

.ana-legal-content {
  font-size: 16px;
  line-height: 1.7;
  color: #222;
}

.ana-legal-content h3 {
  margin: 28px 0 10px;
  font-size: 20px;
  line-height: 1.35;
  color: #4b2f11;
}

.ana-legal-content p {
  margin: 0 0 18px;
}

.ana-legal-content ul {
  margin: 0 0 18px 22px;
  padding: 0;
}

.ana-legal-content li {
  margin-bottom: 8px;
}

.ana-legal-highlight {
  margin: 18px 0 26px;
  padding: 18px 20px;
  border: 1px solid #e2d4bc;
  border-radius: 12px;
  background: #fffaf1;
}

.ana-legal-highlight h3 {
  margin-top: 0;
}

@media (max-width: 700px) {
  .ana-legal-content {
    font-size: 15px;
    line-height: 1.65;
  }

  .ana-legal-content h3 {
    font-size: 18px;
  }

  .ana-legal-highlight {
    padding: 15px;
  }
}

/* Chisiamo advocate profile link panel - added conservatively */
.ana-profile-link-page {
  display: block;
  width: 100%;
  clear: both;
}

.ana-profile-link-panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 0 8px 8px;
}

.ana-profile-link-input-wrap {
  width: 100%;
  box-sizing: border-box;
}

.ana-profile-link-input {
  display: block;
  width: calc(100% - 16px);
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  background: #fff;
  color: #1d5fbf;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 640px) {
  .ana-profile-link-panel {
    padding-left: 0;
    padding-right: 0;
  }

  .ana-profile-link-input {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 13px;
  }
}


/* Pagina risultati_full.aspx - risultati completi */
.ana-results-page .ana-inner-main,
.ana-results-full-page .ana-inner-main {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.ana-results-card,
.ana-results-card * {
  max-width: 100%;
  box-sizing: border-box;
}

.ana-results-title-row {
  margin-bottom: 18px;
}

.ana-results-admin-search {
  width: 100%;
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fbfbfb;
  overflow-x: auto;
}

.ana-results-admin-search table {
  max-width: 100%;
}

.ana-results-admin-search input[type="text"],
.ana-results-admin-search input[type="email"],
.ana-results-admin-search input[type="password"],
.ana-results-admin-search select,
.ana-results-admin-search textarea {
  max-width: 100% !important;
  box-sizing: border-box;
}

.ana-results-list {
  display: block;
  width: 100%;
  clear: both;
  overflow-x: auto;
}

.ana-results-list::after {
  content: "";
  display: block;
  clear: both;
}

.ana-results-list table {
  max-width: 100%;
}

.ana-results-list img {
  max-width: 100%;
  height: auto;
}

.ana-paging-bottom {
  clear: both;
  display: block;
  width: 100%;
  margin-top: 24px;
  padding-top: 16px;
  text-align: center;
}

.ana-results-side-card h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .ana-results-page .ana-inner-main,
  .ana-results-full-page .ana-inner-main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .ana-results-admin-search {
    padding: 12px;
    overflow-x: hidden;
  }

  .ana-results-admin-search table,
  .ana-results-admin-search tbody,
  .ana-results-admin-search tr,
  .ana-results-admin-search td,
  .ana-results-admin-search th {
    max-width: 100% !important;
  }

  .ana-results-list {
    overflow-x: hidden;
  }

  .ana-paging-bottom {
    font-size: 15px;
    line-height: 1.6;
  }
}


/* Fix risultati_full_responsive.aspx - link azioni risultato su un'unica riga.
   Il markup è generato dallo XSLT come:
   <dt><a class="linksP">...</a> | <a class="linksP">...</a> ...</dt>.
   Regola aggiunta in coda al CSS aggiornato, senza rimuovere sezioni esistenti. */
.ana-results-full-page .ana-results-list dt:has(a.linksP),
.ana-results-page .ana-results-list dt:has(a.linksP) {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.ana-results-full-page .ana-results-list dt:has(a.linksP) a.linksP,
.ana-results-page .ana-results-list dt:has(a.linksP) a.linksP {
  display: inline !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

/* Fallback per browser senza :has(): applicato solo ai link azione dei risultati. */
.ana-results-full-page .ana-results-list a.linksP,
.ana-results-page .ana-results-list a.linksP {
  display: inline !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

@media (max-width: 700px) {
  .ana-results-full-page .ana-results-list dt:has(a.linksP),
  .ana-results-page .ana-results-list dt:has(a.linksP) {
    white-space: normal;
  }

  .ana-results-full-page .ana-results-list a.linksP,
  .ana-results-page .ana-results-list a.linksP {
    white-space: normal !important;
  }
}
