/* ----- Watermark logo sfumato ----- */
.footer-watermark {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, rgba(0,0,0,0.5) 58%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 30%, rgba(0,0,0,0.5) 58%, transparent 78%);
}
.footer-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.18;
  filter: none;
}

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

footer {
  background: linear-gradient(170deg, var(--deep-blue) 0%, var(--navy) 100%);
  padding: 3.5rem 8% 2rem;
  color: var(--accent-glow);
  position: relative;
  overflow: hidden;
}
footer::before {
  content: ''; position: absolute;
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(228,47,53,0.07), transparent 70%);
  bottom: -180px; left: -80px; border-radius: 50%;
}

/* ----- Top row ----- */
.footer-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 2.5rem;
  position: relative; z-index: 3;
}

/* ----- Brand / Logo ----- */
.footer-logo {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; margin-bottom: 0.8rem;
}
.footer-logo-img   { height: 32px; width: auto; object-fit: contain; }
.footer-logo-text  { font-family: 'Nunito', sans-serif; font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: 0.3px; }
.footer-logo-text span { color: var(--accent); }

.footer-brand > p  { font-size: 0.85rem; color: rgba(148,163,184,0.75); max-width: 300px; line-height: 1.65; }

/* ----- Link columns ----- */
.footer-links { display: flex; gap: 3.5rem; position: relative; z-index: 2; }
.footer-col:last-child { padding-left: 3rem; }

.footer-col h5 {
  font-size: 0.76rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.8); margin-bottom: 0.9rem;
}
.footer-col a {
  display: block; font-size: 0.84rem;
  color: rgba(148,163,184,0.75); text-decoration: none;
  margin-bottom: 0.5rem; transition: color 0.3s;
}
.footer-col a:hover { color: var(--accent-light); }

/* ----- Bottom bar ----- */
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.75rem; color: rgba(148,163,184,0.45);
  position: relative; z-index: 2;
}
.footer-bottom a       { color: rgba(148,163,184,0.55); text-decoration: none; transition: color 0.3s; }
.footer-bottom a:hover { color: var(--accent-light); }

/* ----- Social icon ----- */
.social-links { display: flex; gap: 0.6rem; }
.social-links a {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(148,163,184,0.65); text-decoration: none;
  font-size: 0.8rem; font-weight: 600; transition: all 0.3s;
}
.social-links a:hover {
  border-color: var(--accent-light); color: var(--accent-light);
  background: rgba(228,47,53,0.1);
}

/* Logo clean footer */
.logo-clean-footer {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* Iubenda modal */
#iubenda-iframe,
.iubenda-iframe {
  top: 50% !important;
  transform: translateY(-50%) !important;
  height: min(78vh, 760px) !important;
  max-height: min(78vh, 760px) !important;
}

#iubenda-iframe iframe,
.iubenda-iframe iframe,
#iubenda-iframe-content,
.iubenda-iframe-content {
  height: 100% !important;
  max-height: 100% !important;
}

@media (max-width: 768px) {
  footer {
    padding: 2.8rem 6% 1.5rem;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-brand > p {
    text-align: center;
  }

  .footer-watermark {
    width: 210px;
    height: 210px;
    bottom: 70px;
  }

  .footer-top {
    gap: 1.8rem;
    margin-bottom: 1.8rem;
  }

  .footer-brand > p {
    max-width: none;
    font-size: 0.83rem;
  }

  .footer-links {
    width: 100%;
    gap: 1.8rem;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .footer-col {
    min-width: 130px;
  }

  .footer-col:last-child {
    padding-left: 0;
  }

  .footer-bottom {
    gap: 0.8rem;
  }

  .footer-bottom > div {
    justify-content: center;
    flex-wrap: wrap;
  }

  #iubenda-iframe,
  .iubenda-iframe {
    height: 72vh !important;
    max-height: 72vh !important;
    width: calc(100vw - 24px) !important;
  }
}

@media (max-width: 480px) {
  footer {
    padding: 2.4rem 5% 1.35rem;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1.5rem;
    justify-content: space-between;
    width: 100%;
  }

  .footer-col {
    min-width: 0;
  }

  .footer-col:last-child {
    padding-left: 0;
    text-align: right;
  }

  .footer-bottom {
    font-size: 0.72rem;
  }

  .social-links a {
    width: 30px;
    height: 30px;
  }
}