/*
  Foglio di stile aggiuntivo del sito IFEL HELP.
  Gli stili principali sono incorporati in index.html per garantire che
  la pagina resti funzionante anche su hosting statici molto semplici.
*/

:root {
  --blue: #005978;
  --purple: #8b008b;
  --orange: #ffa600;
  --ink: #171717;
  --paper: #f8f4f1;
  --white: #fff;
}

/* =========================
   BASE
   ========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-family: "Montserrat",sans-serif;
}

p {
  text-align: justify;
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
}


/* =========================
   INSTITUTIONAL BANNER
   ========================= */

.institutional-banner {
  background: #fff;
  border-bottom: 1px solid #e5e8ea;
}

.institutional-inner {
  min-height: 82px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 24px;
  padding: 12px 0;
}

.institutional-home {
  display: block;
  flex: 0 0 auto;
}

.institutional-logo {
  width: 108px;
  height: auto;
}

.institutional-name {
  margin: 0;
  color: var(--blue);
  font-size: clamp(.9rem, 1.6vw, 1.1rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
}


/* =========================
   HERO
   ========================= */

.hero {
  display: grid;
  place-items: center;
  background: #fff;
  padding: 24px;
  overflow: visible;
}

.hero-banner {
  display: block;
  width: min(1280px, 100%);
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
}


/* =========================
   CARDS SECTION
   ========================= */

.cards-section {
  position: relative;
  overflow: hidden;
	padding: 20px 0 80px;
  background-color: #fff;
  background-image: none;
}
.cards {
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  align-items: stretch;
}


/* =========================
   CARD
   ========================= */

.card {
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;

  min-height: 580px;
  padding: 38px 32px 32px;

  color: var(--ink);
  background: #fff;

  border: 4px solid transparent;
  border-radius: 12px;
}

.card h2 {
  margin: 0 0 24px;
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}

.card p {
  margin: 0;
  font-size: .98rem;
  white-space: pre-line;
}


/* =========================
   CARD ACTION
   ========================= */

.card .action {
  position: relative;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  gap: 14px;

  align-self: flex-start;
  margin-top: auto;
  padding: 13px 20px;

  border-radius: 8px;

  font-weight: 800;
  text-decoration: none;

  transition:
    transform .2s,
    box-shadow .2s;
}

.card .action::after {
  content: "›";
  font-size: 1.35rem;
  line-height: 1;
}

.card .action:hover,
.card .action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px #001f2e2b;
  outline: 3px solid currentColor;
  outline-offset: 3px;
}


/* =========================
   INSTRUCTIONS
   ========================= */

.instructions {
  grid-column: 1 / -1;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  min-height: 0;
  padding: 28px 0 58px;

  background: transparent;
  border: 0;
  border-radius: 0;

  overflow: visible;
}

.instructions h2 {
  margin: 0 0 24px;
  color: var(--orange);
  font-size:3.5rem;
}

.instructions p {
  font-size: 1.05rem;
  line-height: 1.75;
}

.instructions .action {
  align-self: center;

  margin: 34px 0 0;
  padding: 22px 48px;

  background: var(--orange);
  color: var(--ink);

  font-size: 1.2rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}


/* =========================
   AGENT CARD
   ========================= */

.agent {
  padding-bottom: 0;
  border-color: var(--purple);
}

.agent-action-row {
  display: grid;
  grid-template-columns:
    minmax(150px, .85fr)
    minmax(180px, 1.15fr);

  align-items: center;
  gap: 14px;

  margin-top: auto;
}

.agent .portrait {
  width: 100%;
  max-height: 260px;

  object-fit: contain;
  object-position: center bottom;

  transform: scaleX(-1);
  transform-origin: center;
}

.agent .action {
  align-self: center;

  margin: 0 0 22px;
  padding: 16px 20px;

  background: var(--purple);
  color: #fff;

  border-radius: 8px;
}

.agent .action::before {
  content: "";

  position: absolute;
  top: 50%;
  left: -15px;

  transform: translateY(-50%);

  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-right: 17px solid var(--purple);
}


/* =========================
   EXPERT CARD
   ========================= */

.expert {
  border-color: var(--blue);
}

.expert .action {
  align-self: center;

  margin: auto;

  background: var(--blue);
  color: #fff;
}


/* =========================
   SPLOTCHES
   ========================= */

.splotches {
  position: absolute;
  inset: 0;
  z-index: 0;

  overflow: hidden;
  pointer-events: none;
}

.splotch-group {
  position: absolute;
}

.splotch-group span {
  position: absolute;
  display: block;
  opacity: .22;
  clip-path: none;
}

.splotch-purple {
  background: var(--purple);
}

.splotch-yellow {
  background: var(--orange);
}

.splotch-blue {
  background: var(--blue);
}


/* Splotch group 1 */

.splotch-group.one {
  left: -36px;
  top: 0px;

  width: 230px;
  height: 190px;
}

.one .splotch-purple {
  left: 0;
  top: 18px;

  width: 145px;
  height: 112px;

  border-radius: 58% 42% 51% 49% / 45% 57% 43% 55%;
  transform: rotate(-8deg);
}

.one .splotch-yellow {
  left: 92px;
  top: 65px;

  width: 118px;
  height: 102px;

  border-radius: 44% 56% 37% 63% / 54% 40% 60% 46%;
  transform: rotate(11deg);
}

.one .splotch-blue {
  left: 50px;
  top: 105px;

  width: 104px;
  height: 76px;

  border-radius: 63% 37% 58% 42% / 39% 52% 48% 61%;
  transform: rotate(-4deg);
}


/* Splotch group 2 */

.splotch-group.two {
  right: -48px;
  top: 46%;

  width: 270px;
  height: 210px;
}

.two .splotch-yellow {
  right: 0;
  top: 0;

  width: 168px;
  height: 126px;

  border-radius: 38% 62% 48% 52% / 61% 44% 56% 39%;
  transform: rotate(7deg);
}

.two .splotch-blue {
  right: 105px;
  top: 58px;

  width: 132px;
  height: 118px;

  border-radius: 55% 45% 64% 36% / 42% 63% 37% 58%;
  transform: rotate(-12deg);
}

.two .splotch-purple {
  right: 38px;
  top: 105px;

  width: 142px;
  height: 92px;

  border-radius: 47% 53% 39% 61% / 56% 38% 62% 44%;
  transform: rotate(5deg);
}


/* Splotch group 3 */

.splotch-group.three {
  left: -24px;
  bottom: 64px;

  width: 230px;
  height: 170px;
}

.three .splotch-blue {
  left: 0;
  top: 0;

  width: 151px;
  height: 126px;

  border-radius: 61% 39% 46% 54% / 48% 58% 42% 52%;
  transform: rotate(-6deg);
}

.three .splotch-purple {
  left: 95px;
  top: 63px;

  width: 122px;
  height: 96px;

  border-radius: 41% 59% 57% 43% / 62% 46% 54% 38%;
  transform: rotate(9deg);
}


/* Single splotch */

.splotch-single {
  position: absolute;
  right: 9%;
  bottom: 25px;

  width: 94px;
  height: 72px;

  background: var(--orange);
  opacity: .18;

  border-radius: 57% 43% 62% 38% / 44% 59% 41% 56%;

  clip-path: none;
  transform: rotate(-7deg);
}


/* =========================
   FOOTER
   ========================= */

footer {
  padding: 48px 0 24px;

  background: #003f59;
  color: #fff;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-brand img {
  width: 150px;
  height: auto;

  padding: 8px;

  background: #fff;
  border-radius: 10px;
}

.footer-brand p {
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 26px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #fff;

  font-weight: 700;
  text-decoration: none;

  border-bottom: 1px solid #ffffff80;
}

.footer-links a:hover,
.footer-links a:focus {
  border-color: #fff;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;

  border-top: 1px solid #ffffff38;

  color: #d9e7ec;
  font-size: .85rem;
}


/* =========================
   TABLET
   ========================= */

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

  .card {
    min-height: auto;
  }

  .instructions {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .instructions .action {
    white-space: normal;
  }

  .agent {
    padding-bottom: 0;
  }

  .agent .portrait {
    max-height: 300px;
  }

  .hero {
    min-height: auto;
  }
}


/* =========================
   MOBILE
   ========================= */

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

  .footer-links {
    justify-content: flex-start;
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-brand img {
    width: 120px;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: calc(100% - 28px);
  }
.instructions h2 {
  font-size:2.5rem;
}
  .institutional-inner {
    min-height: 0;
    gap: 14px;
    padding: 10px 0;
    align-items: flex-end;
  }

  .institutional-logo {
    width: 64px;
  }

  .institutional-name {
    font-size: .76rem;
    line-height: 1.2;
  }

  .hero {
    padding: 14px 0;
  }

  .cards-section {
    padding: 58px 0;
  }

  .card {
    padding: 30px 24px;
  }

  .agent {
    padding-bottom: 0;
  }

  .agent-action-row {
    grid-template-columns:
      minmax(105px, .8fr)
      minmax(150px, 1.2fr);

    gap: 6px;
  }

  .agent .action {
    margin-bottom: 12px;
    padding: 12px 14px;
    font-size: .8rem;
  }
}


/* =========================
   ACCESSIBILITY
   ========================= */

@media (prefers-reduced-motion: reduce) {
  .card .action {
    transition: none;
  }
}