/* Corsi AFA: regole attive, nello stesso ordine di precedenza. */
:root {
  color-scheme: light;
  --bg: #f6f7f3;
  --card: #fff;
  --ink: #18382f;
  --mute: #52665e;
  --blue: #176747;
  --blue-ink: #fff;
  --yel: #f2d9e6;
  --yel-ink: #6c144d;
  --line: #d9e3dc;
  --hi: #ecf6ef;
  --hi-line: #237d58;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.6 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}

a {
  color: var(--blue);
  font-weight: 650;
  text-underline-offset: 4px;
}

.wrap {
  max-width: 1120px;
  margin: auto;
  padding: 0 28px 32px;
}

header {
  padding: 38px 0 24px;
}

.announcement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  border: 1px solid #dfbbd1;
  border-left: 5px solid #81165b;
  border-radius: 16px;
  background: #fcf3f8;
  margin: 8px 0 34px;
}

.announcement p {
  margin: 3px 0;
}

.announcement b {
  color: #741452;
}

.announcement a {
  color: #741452;
  white-space: nowrap;
}

h2 {
  font: 600 34px/1.2 Georgia,serif;
  margin: 0 0 10px;
}

.intro {
  color: var(--mute);
  margin: 0 0 22px;
}

.filters {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
}

.lbl {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 750;
  color: var(--mute);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  min-height: 46px;
  padding: 8px 15px;
  border: 1px solid #b9ccc0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 600 16px/1.4 system-ui,sans-serif;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--blue);
  background: #f0f6f1;
}

.chip[aria-pressed=true] {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.chip.today:after {
  content: ' · oggi';
  font-size: 12px;
}

.grp {
  font: 600 25px/1.3 Georgia,serif;
  padding: 0 0 12px;
  margin: 28px 0 16px;
  border-bottom: 1px solid #c8d8cd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grp small {
  font: 500 14px system-ui,sans-serif;
  color: var(--mute);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card:target {
  outline: 3px solid #9c477b;
  outline-offset: 4px;
}

.city {
  font-size: 13px;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--blue);
  margin: 0 0 7px;
}

.card h3 {
  font-size: 21px;
  line-height: 1.35;
  margin: 0;
}

.ad {
  font-size: 16px;
  color: var(--mute);
  margin: 8px 0 16px;
}

.start {
  display: inline-block;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 700;
  color: #741452;
  background: #f8e8f1;
  padding: 3px 10px;
  border-radius: 6px;
  margin: 12px 0 4px;
}

.slot {
  background: #f3f7f3;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  margin: 8px 0 18px;
}

.slot b {
  display: block;
  font-weight: 650;
}

.slot.hi {
  background: var(--hi);
  border-color: var(--hi-line);
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #e9eeea;
}

.acts a {
  font-size: 16px;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.acts a:hover {
  text-decoration: underline;
}

.note {
  font-size: 16px;
  color: var(--mute);
  margin: 28px 0;
  padding: 18px 20px;
  background: #eaf0e9;
  border-radius: 12px;
}

.empty {
  padding: 28px;
  border: 1px dashed #93ad9c;
  border-radius: 16px;
  color: var(--mute);
}

footer {
  background: #183e30;
  color: #fff;
  border-radius: 22px;
  padding: 30px;
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  font-size: 16px;
}

footer a {
  color: white;
}

footer b {
  font: 600 25px Georgia,serif;
}

footer p {
  margin: 8px 0;
}

footer .contactlinks {
  display: grid;
  gap: 8px;
  align-content: start;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid #a32474;
  outline-offset: 4px;
}

@media(max-width:760px) {
  .wrap {
    padding: 0 18px 24px;
  }

  header {
    padding: 28px 0 20px;
  }

  .filters {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .announcement {
    display: block;
    padding: 20px;
  }

  .announcement a {
    display: inline-block;
    margin-top: 10px;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px;
  }

  .card {
    padding: 22px;
  }

  h2 {
    font-size: 30px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
}

:root {
  --bg: #fff;
  --ink: #1b2950;
  --mute: #4a5e91;
  --blue: #2c60ad;
  --blue-ink: #fff;
  --yel: #ffc34d;
  --yel-ink: #1d315f;
  --line: #d8e3f2;
  --hi: #fff8c7;
  --hi-line: #e5ab25;
}

body {
  font-family: Arial,Helvetica,sans-serif;
  background: #fff;
}

.wrap {
  max-width: 1120px;
}

h2, .grp, footer b {
  font-family: Arial,Helvetica,sans-serif;
  font-weight: 800;
  letter-spacing: -.035em;
}

header {
  padding: 12px 0 0;
}

.announcement {
  background: #edf4ff;
  border: 1px solid #cfddf4;
  border-left: 6px solid #ffc34d;
  border-radius: 18px;
  margin: 0 0 30px;
  color: #254b91;
}

.announcement b, .announcement a {
  color: #345fa6;
}

.announcement b {
  font-size: 21px;
}

.announcement p {
  font-size: 18px;
}

h2 {
  color: #4765ad;
  text-transform: uppercase;
  font-size: 32px;
}

h2:after {
  content: '';
  display: block;
  width: 130px;
  height: 7px;
  background: #ffc34d;
  border-radius: 99px;
  margin: 14px 0;
}

.intro {
  color: #4864a7;
}

.filters {
  border-color: #dbe5f3;
  background: #f7faff;
  border-radius: 18px;
}

.lbl {
  color: #425e9c;
}

.chip {
  border-color: #bdcfe9;
  color: #2a4b85;
  border-radius: 10px;
}

.chip:hover {
  background: #e7f0ff;
  border-color: #456bb1;
}

.chip[aria-pressed=true] {
  background: #315fac;
  border-color: #315fac;
  color: #fff;
}

.grp {
  color: #4665ac;
  font-size: 25px;
  border-bottom: 3px solid #ffca50;
  text-transform: uppercase;
  letter-spacing: -.02em;
}

.grp small {
  color: #526a9e;
  text-transform: none;
  letter-spacing: normal;
}

.card {
  background: #eaf3ff;
  border: 0;
  border-radius: 22px;
  box-shadow: none;
}

.card[data-zone="T"] {
  background: #fffbd0;
}

.card h3 {
  color: #14223e;
  font-size: 22px;
  font-weight: 750;
}

.city {
  color: #355a9c;
  font-size: 15px;
}

.ad {
  color: #334a70;
}

.slot {
  background: #ffffffa6;
  border: 1px solid #ffffffbd;
  color: #192d53;
}

.slot.hi {
  background: #fff5b6;
  border-color: #e4ac30;
}

.acts {
  border-color: #d0dbec;
}

.acts a {
  color: #305c9f;
}

.start {
  background: #ffce54;
  color: #253f76;
}

.note {
  background: #f3f7ff;
  color: #466095;
  border-left: 5px solid #ffc34d;
  border-radius: 12px;
}

.note strong {
  display: block;
  margin-top: 7px;
}

footer {
  position: relative;
  background: #5e7ab7;
  color: #fff;
  border-radius: 48% 9% 0 0 / 24px 12px 0 0;
  padding-top: 42px;
}

footer b {
  font-size: 25px;
}

footer .contactlinks {
  border-left: 6px solid #ffc34d;
  padding-left: 25px;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid #b87400;
}

@media(max-width:760px) {
  header {
    padding-top: 12px;
  }

  .announcement {
    margin-top: 24px;
  }

  h2 {
    font-size: 29px;
  }

  .card {
    border-radius: 20px;
  }

  .cards {
    gap: 14px;
  }

  footer {
    border-radius: 24px 24px 0 0;
    padding-top: 30px;
  }

  footer .contactlinks {
    padding-left: 15px;
    border-left-width: 4px;
  }

  .grp {
    font-size: 23px;
  }
}

.filters[hidden] {
  display: none;
}

header {
  padding-top: 16px;
}

@media(max-width:760px) {
  header {
    padding-top: 16px;
  }
}

.course-enroll {
  display: block;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #315fac;
  color: white;
  text-align: center;
  text-decoration: none;
  font-size: 17px;
  min-height: 48px;
}

.course-enroll:hover {
  background: #244a88;
}

.province-enroll {
  font-size: 15px;
  color: #3e5882;
  margin: 12px 0 0;
}

@media(max-width:760px) {
  .announcement {
    margin-top: 0;
  }
}

header.app-header {
  padding: 0;
  margin: 16px 0 -5%;
  background: #fff;
}

.app-header > img.flyer-header {
  display: block;
  position: static;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  transform: none;
}

@media(max-width:760px) {
  header.app-header {
    padding: 0;
    margin-top: 12px;
  }
}

.org-legal {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  border-top: 1px solid #ffffff66;
  padding-top: 22px;
  margin-top: 4px;
}

.org-legal h3 {
  font: 700 18px/1.4 Arial,Helvetica,sans-serif;
  margin: 0 0 8px;
  color: #fff;
  letter-spacing: 0;
  text-transform: none;
}

.org-legal p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  overflow-wrap: anywhere;
}

@media(max-width:760px) {
  .org-legal {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

[hidden] {
  display: none!important;
}

.course-overview {
  position: relative;
  margin: 0 0 20px;
  padding: 18px 24px;
  border-left: 5px solid #ffca50;
  border-radius: 12px;
  background: #eaf3ff;
  color: #213e77;
}

.course-overview h2 {
  margin: 0 0 12px;
  color: #213e77;
  font-size: 24px;
  line-height: 1.3;
  text-transform: none;
}

.course-overview ul {
  margin: 0;
  padding-left: 22px;
  font-size: 20px;
  line-height: 1.6;
}

.course-overview li + li {
  margin-top: 4px;
}

@media(max-width:760px) {
  .course-overview {
    padding: 16px 18px;
  }

  .course-overview ul {
    font-size: 18px;
  }
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 28px;
  padding: 4px 0 10px;
  position: relative;
  border-bottom: 1px solid #d8e3f2;
}

.app-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #ffca50;
  color: #213e77;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  text-align: center;
  min-height: 48px;
}

.app-nav a:hover {
  background: #f2b833;
}

.app-nav a[aria-current="page"] {
  background: #213e77;
  color: #fff;
  border-color: #213e77;
  box-shadow: 0 0 0 1px #213e77;
}

.partner-page {
  padding: 8px 0 20px;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

.partner-card {
  padding: 24px;
  background: #eaf3ff;
  border-radius: 20px;
}

.partner-card h3 {
  font-size: 22px;
  line-height: 1.35;
  margin: 0 0 12px;
  color: #213e77;
}

.partner-card p {
  font-size: 17px;
  margin: 0 0 16px;
}

.partner-back {
  margin: 26px 0 0;
}

@media(max-width:760px) {
  .partner-grid {
    grid-template-columns: 1fr;
  }
}

.support-page {
  max-width: 850px;
  padding: 8px 0 28px;
}

.support-page p {
  font-size: 18px;
  line-height: 1.7;
}

.support-purpose {
  background: #eaf3ff;
  border-left: 5px solid #315fac;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}

.support-purpose h3 {
  color: #213e77;
  margin: 0 0 10px;
  font-size: 22px;
}

.support-purpose p {
  margin: 0;
}

.support-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.support-contact a {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 9px;
  background: #315fac;
  color: #fff;
  text-decoration: none;
}

.support-paypal {
  margin: 20px 0 28px;
}

.support-paypal .paypal-donate {
  display: inline-block;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  background: #ffca50;
  color: #213e77;
  border: 0;
  border-radius: 9px;
  padding: 14px 20px;
  cursor: pointer;
  min-height: 48px;
}

.support-paypal .paypal-donate:hover {
  background: #ffd775;
}

.support-bank {
  padding: 24px;
  background: #eaf3ff;
  border-radius: 16px;
  margin: 24px 0;
}

.support-bank h3 {
  color: #213e77;
  margin-top: 0;
}

.support-bank p:last-child {
  margin-bottom: 0;
}

.bank-iban, .bank-reference {
  overflow-wrap: anywhere;
  font-weight: 700;
}
