/* Fabio Cavalieri — tema pro (Bootstrap 5.3) · zona hacker in .fc-hacker-zone */

/* Fallback con metriche simili → meno CLS quando arrivano i font web */
@font-face {
  font-family: "DM Sans Fallback";
  src: local("Segoe UI"), local("Helvetica Neue"), local("Arial");
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 108%;
  ascent-override: 88%;
  descent-override: 22%;
  line-gap-override: 0%;
}

:root {
  --fc-bg: #0f1419;
  --fc-surface: #1a2129;
  --fc-accent: #3d8b7a;
  --fc-accent-hover: #4fa896;
  --fc-accent-soft: rgba(61, 139, 122, 0.12);
  --fc-green-deep: #2d5a4f;
  --fc-glow: rgba(61, 139, 122, 0.07);
  --fc-text: #eef2f5;
  --fc-muted: #8b9aab;
  --fc-border: rgba(255, 255, 255, 0.09);
  --fc-radius: 0.75rem;
  --fc-link: #5eb8a8;
  --fc-link-hover: #7dcec0;
}

html {
  scroll-padding-top: 7.75rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "DM Sans", "DM Sans Fallback", system-ui, sans-serif;
  background: var(--fc-bg);
  color: var(--fc-text);
}

h1, h2, h3 {
  font-family: "Fraunces", "Fraunces Fallback", Georgia, serif;
  letter-spacing: -0.02em;
}

.text-muted {
  color: var(--fc-muted) !important;
}

.logo-nav {
  height: 40px;
  width: auto;
  max-width: min(220px, 62vw);
  display: block;
}

.fc-social-strip {
  background: rgba(15, 20, 25, 0.98);
}

.fc-social-icons a {
  color: var(--fc-muted);
  font-size: 1.35rem;
  line-height: 1;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.15s;
}

.fc-social-icons a i,
.fc-social-icons a .fc-svg-icon {
  width: 1em;
  height: 1em;
  display: block;
  line-height: 1;
}

.fc-svg-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: currentColor;
  flex-shrink: 0;
}

.fc-svg-icon--lg {
  width: 2em;
  height: 2em;
}

.fc-social-icons a:hover {
  color: var(--fc-accent);
  transform: translateY(-2px);
}

.navbar {
  background: rgba(15, 20, 25, 0.94) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fc-border);
}

.navbar .nav-link {
  color: var(--fc-muted) !important;
  font-weight: 500;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--fc-text) !important;
}

.navbar .nav-link.active {
  box-shadow: inset 0 -2px 0 var(--fc-accent);
}

.btn-primary {
  background: var(--fc-accent);
  border-color: var(--fc-accent);
  color: #fff;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--fc-accent-hover);
  border-color: var(--fc-accent-hover);
  color: #fff;
}

.btn-outline-light {
  border-color: var(--fc-border);
  color: var(--fc-text);
}

.btn-outline-light:hover {
  background: var(--fc-accent-soft);
  border-color: rgba(61, 139, 122, 0.35);
  color: var(--fc-text);
}

.btn-success {
  --bs-btn-bg: var(--fc-accent);
  --bs-btn-border-color: var(--fc-accent);
  --bs-btn-hover-bg: var(--fc-accent-hover);
  --bs-btn-hover-border-color: var(--fc-accent-hover);
  --bs-btn-active-bg: var(--fc-green-deep);
  --bs-btn-active-border-color: var(--fc-green-deep);
  --bs-btn-color: #fff;
  font-weight: 600;
}

.btn-outline-success {
  --bs-btn-color: var(--fc-accent);
  --bs-btn-border-color: rgba(61, 139, 122, 0.45);
  --bs-btn-hover-bg: var(--fc-accent-soft);
  --bs-btn-hover-border-color: var(--fc-accent);
  --bs-btn-hover-color: var(--fc-text);
  --bs-btn-active-bg: rgba(61, 139, 122, 0.2);
  --bs-btn-active-border-color: var(--fc-accent);
  --bs-btn-active-color: var(--fc-text);
}

.text-success {
  color: var(--fc-accent) !important;
}

.link-success {
  color: var(--fc-link) !important;
}

.link-success:hover {
  color: var(--fc-link-hover) !important;
}

.hero {
  /* 100dvh: altezza “reale” su mobile (barra indirizzi); fallback 100vh */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 6.75rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 55% at 88% 8%, var(--fc-glow), transparent 52%),
    radial-gradient(ellipse 55% 45% at 0% 100%, rgba(26, 33, 41, 0.65), transparent 58%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Titolo hero: due righe fisse, niente trattino tra nome e servizi */
.fc-hero-title {
  letter-spacing: -0.03em;
  line-height: 1.12;
  min-height: clamp(4.25rem, 11vw, 6.75rem);
}
.fc-hero-title-line1 {
  text-wrap: balance;
}
.fc-hero-title-line2 {
  margin-top: 0.35rem;
  font-size: clamp(1.2rem, 3.6vw, 2.05rem);
  font-weight: 700;
  line-height: 1.22;
  text-wrap: balance;
}

.hero-portrait {
  position: relative;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.hero-portrait::before {
  content: none;
}

.hero-portrait-inner {
  position: relative;
  z-index: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--fc-border);
  aspect-ratio: 1;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hero-portrait-inner picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-portrait-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}

/* Portfolio / Profilo: <picture> dentro .ratio (Bootstrap) */
.ratio > picture {
  display: block;
  width: 100%;
  height: 100%;
}

.ratio > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-portrait {
  max-width: 220px;
  margin: 0 auto 1.5rem;
}

.contact-portrait .hero-portrait-inner {
  border-width: 3px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.card-fc {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  transition: border-color 0.2s, transform 0.2s;
}

.card-fc:hover {
  border-color: rgba(61, 139, 122, 0.32);
  transform: translateY(-2px);
}

.page-header {
  padding-top: 8.25rem;
  padding-bottom: 3rem;
  background: linear-gradient(180deg, var(--fc-surface) 0%, var(--fc-bg) 100%);
  border-bottom: 1px solid var(--fc-border);
}

footer {
  border-top: 1px solid var(--fc-border);
  background: var(--fc-surface);
}

.badge-soft {
  background: var(--fc-accent-soft);
  color: var(--fc-link-hover);
  font-weight: 600;
  border: 1px solid rgba(61, 139, 122, 0.22);
}

.text-accent {
  color: var(--fc-accent) !important;
}

.form-control,
.form-select {
  background: var(--fc-bg);
  border-color: var(--fc-border);
  color: var(--fc-text);
}

.form-control:focus,
.form-select:focus {
  background: var(--fc-bg);
  border-color: var(--fc-accent);
  color: var(--fc-text);
  box-shadow: 0 0 0 0.2rem var(--fc-accent-soft);
}

.form-label {
  color: var(--fc-muted);
}

a {
  color: var(--fc-link);
}

a:hover {
  color: var(--fc-link-hover);
}

.embed-calendar {
  min-height: 720px;
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  background: var(--fc-surface);
}

.embed-calendar iframe {
  width: 100%;
  height: 720px;
  border: 0;
}

@media (max-width: 767.98px) {
  .embed-calendar {
    min-height: min(720px, 85vh);
  }
  .embed-calendar iframe {
    height: min(720px, 85vh);
  }
}

/* ── WhatsApp float ── */
.fc-whatsapp-float {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.5rem + env(safe-area-inset-right, 0px));
  z-index: 1050;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  contain: layout style;
}

.fc-whatsapp-float i,
.fc-whatsapp-float .fc-svg-icon {
  width: 1.7rem;
  height: 1.7rem;
  line-height: 1;
  display: block;
}
.fc-whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
  color: #fff;
}

/* ── Cookie banner GDPR ── */
#fc-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1060;
  background: var(--fc-surface);
  border-top: 1px solid var(--fc-border);
  padding: 1rem 1.25rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
}
#fc-cookie-banner a { color: var(--fc-accent); }

/* Banner fisso in overlay: niente padding sul body (evita CLS ~0.2+) */
#fc-cookie-banner[hidden] {
  display: none !important;
}

@media (max-width: 575px) {
  .fc-whatsapp-float {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
    width: 2.9rem;
    height: 2.9rem;
    font-size: 1.5rem;
  }
  /* Area tocco consigliata ~44px (WCAG / HIG) */
  #fc-cookie-banner .btn {
    min-height: 2.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Modale lettura articolo (articoli.html) */
.fc-article-read-modal .modal-content {
  background: var(--fc-surface);
  color: var(--fc-text);
}
.fc-article-read-modal .modal-header {
  background: var(--fc-bg);
}
.fc-article-read-modal #fcArticleReadBody {
  max-width: 100%;
}

/* Footer: payoff sotto il nome */
.fc-footer-brand {
  max-width: 42rem;
}
.fc-footer-tagline {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--fc-muted);
  border-left: 3px solid var(--fc-accent);
  padding-left: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  background: linear-gradient(90deg, var(--fc-accent-soft), transparent 85%);
  border-radius: 0 0.35rem 0.35rem 0;
}
.fc-footer-tagline strong {
  color: var(--fc-accent);
  font-weight: 600;
}

/* Contenuto articoli largo (tabelle WP): scroll orizzontale senza rompere il layout tabella */
@media (max-width: 575.98px) {
  .wp-articolo {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Pagina Prenota call — hero, step e anteprima messaggio */
.fc-prenota-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fc-accent);
  background: var(--fc-accent-soft);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
}
.fc-prenota-showcase {
  border-radius: var(--fc-radius);
  border: 1px solid var(--fc-border);
  background: linear-gradient(
    155deg,
    rgba(34, 197, 94, 0.14) 0%,
    var(--fc-surface) 42%,
    var(--fc-bg) 100%
  );
  overflow: hidden;
}
.fc-prenota-showcase-inner {
  position: relative;
  padding: 1.75rem 1.5rem;
}
@media (min-width: 992px) {
  .fc-prenota-showcase-inner {
    padding: 2rem 2.25rem;
  }
}
.fc-prenota-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.22) 0%, transparent 70%);
  top: -80px;
  right: -40px;
  pointer-events: none;
}
.fc-prenota-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
.fc-prenota-step:last-child {
  margin-bottom: 0;
}
.fc-prenota-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--fc-accent-soft);
  color: var(--fc-accent);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 2rem;
  text-align: center;
}
.fc-prenota-wa-preview {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0d1117;
  border: 1px solid var(--fc-border);
  border-radius: 0.65rem;
  padding: 1rem 1.15rem;
  color: #e6edf3;
  min-height: 9.5rem;
  margin: 0;
}
.fc-prenota-wa-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #25d366;
  margin-bottom: 0.5rem;
}
.btn-fc-whatsapp {
  --bs-btn-color: #fff;
  --bs-btn-bg: #25d366;
  --bs-btn-border-color: #25d366;
  --bs-btn-hover-bg: #20bd5a;
  --bs-btn-hover-border-color: #20bd5a;
  --bs-btn-active-bg: #1daa52;
  --bs-btn-active-border-color: #1daa52;
  font-weight: 600;
}
.btn-fc-whatsapp:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.45);
}

/* Case study: problema → soluzione → risultato */
.fc-case-outcomes {
  display: grid;
  gap: 0.65rem;
}
.fc-case-outcome {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--fc-border);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
}
.fc-case-outcome--result {
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--fc-accent-soft);
}
.fc-case-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fc-accent);
  margin-bottom: 0.25rem;
}
.fc-case-outcome p {
  font-size: 0.8rem;
  color: var(--fc-muted);
  margin: 0;
  line-height: 1.45;
}
.fc-case-outcome--result p {
  color: var(--fc-text);
}

/* Metodo in 5 passi */
.fc-method-timeline {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .fc-method-timeline {
    grid-template-columns: repeat(5, 1fr);
  }
}
.fc-method-step {
  text-align: center;
  padding: 1rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  height: 100%;
}
.fc-method-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--fc-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.fc-method-step h3 {
  font-size: 0.9rem;
  color: var(--fc-text);
  margin-bottom: 0.35rem;
}
.fc-method-step p {
  font-size: 0.75rem;
  color: var(--fc-muted);
  margin: 0;
}

/* Range prezzi */
.fc-price-table {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .fc-price-table {
    grid-template-columns: repeat(3, 1fr);
  }
}
.fc-price-card {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  height: 100%;
}
.fc-price-card--featured {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15);
}
.fc-price-card h3 {
  font-size: 1rem;
  color: var(--fc-text);
  margin-bottom: 0.35rem;
}
.fc-price-from {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  color: var(--fc-accent);
  margin-bottom: 0.5rem;
}
.fc-price-card ul {
  font-size: 0.8rem;
  color: var(--fc-muted);
  padding-left: 1.1rem;
  margin-bottom: 0;
}

/* Testimonianze */
.fc-testimonial {
  border-left: 3px solid var(--fc-accent);
  padding-left: 1rem;
  margin-bottom: 1.25rem;
}
.fc-testimonial p {
  font-style: italic;
  color: var(--fc-muted);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.fc-testimonial cite {
  font-size: 0.8rem;
  color: var(--fc-text);
  font-style: normal;
  font-weight: 600;
}

.fc-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  padding: 1rem 0;
}
.fc-trust-strip a {
  font-size: 0.85rem;
  text-decoration: none;
}

/* ── Zona hacker / Matrix — solo sezione sicurezza informatica ── */
.fc-hacker-zone {
  --fc-hacker-bg: #060a08;
  --fc-hacker-surface: #0a120e;
  --fc-hacker-accent: #22c55e;
  --fc-hacker-accent-hover: #4ade80;
  --fc-hacker-accent-soft: rgba(34, 197, 94, 0.14);
  --fc-hacker-glow: rgba(34, 197, 94, 0.22);
  --fc-hacker-text: #e8eef0;
  --fc-hacker-muted: #8fa89a;
  --fc-hacker-border: rgba(34, 197, 94, 0.28);

  position: relative;
  overflow: hidden;
  margin-top: 2rem;
  border-radius: var(--fc-radius);
  border: 1px solid var(--fc-hacker-border);
  background: var(--fc-hacker-bg);
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(34, 197, 94, 0.08);
}

.fc-hacker-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 92% 12%, var(--fc-hacker-glow), transparent 55%),
    radial-gradient(ellipse 45% 40% at 8% 88%, rgba(20, 83, 45, 0.4), transparent),
    radial-gradient(ellipse 70% 40% at 50% -10%, rgba(34, 197, 94, 0.12), transparent);
  pointer-events: none;
}

.fc-hacker-zone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(34, 197, 94, 0.025) 3px,
    rgba(34, 197, 94, 0.025) 4px
  );
  pointer-events: none;
}

.fc-hacker-zone-inner {
  position: relative;
  z-index: 1;
}

.fc-hacker-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fc-hacker-accent);
  background: var(--fc-hacker-accent-soft);
  border: 1px solid var(--fc-hacker-border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
}

.fc-hacker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #14532d, #facc15);
  padding: 2px;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.35);
}

.fc-hacker-icon > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--fc-hacker-bg);
  color: var(--fc-hacker-accent);
  font-size: 1.75rem;
}

.fc-hacker-zone .text-white,
.fc-hacker-zone h2 {
  color: var(--fc-hacker-text) !important;
}

.fc-hacker-zone .text-muted {
  color: var(--fc-hacker-muted) !important;
}

.fc-hacker-zone .text-accent,
.fc-hacker-zone .fc-hacker-list i {
  color: var(--fc-hacker-accent) !important;
}

.fc-hacker-zone a:not(.btn) {
  color: var(--fc-hacker-accent-hover);
}

.fc-hacker-zone a:not(.btn):hover {
  color: #86efac;
}

.fc-hacker-zone .btn-outline-success {
  --bs-btn-color: var(--fc-hacker-accent);
  --bs-btn-border-color: var(--fc-hacker-border);
  --bs-btn-hover-bg: var(--fc-hacker-accent-soft);
  --bs-btn-hover-border-color: var(--fc-hacker-accent);
  --bs-btn-hover-color: var(--fc-hacker-text);
}

.fc-hacker-zone .btn-success {
  --bs-btn-bg: var(--fc-hacker-accent);
  --bs-btn-border-color: var(--fc-hacker-accent);
  --bs-btn-hover-bg: var(--fc-hacker-accent-hover);
  --bs-btn-hover-border-color: var(--fc-hacker-accent-hover);
  --bs-btn-color: #052e16;
}

.fc-hacker-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .fc-hacker-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1.25rem;
  }
}

.fc-hacker-list li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--fc-hacker-muted);
}

.fc-hacker-list li strong {
  color: var(--fc-hacker-text);
}
