/*
Theme Name: I Figli della Vita
Theme URI: https://figlidellavita.it
Author: OpenAI - ChatGPT
Description: Tema WordPress personalizzato per I Figli della Vita, con logo trasparente in apertura della home page, menu visibile sotto il marchio, brochure scaricabili e meta social per anteprime WhatsApp.
Version: 1.7.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: figli-della-vita
*/

:root {
  --ifdv-green: #194c24;
  --ifdv-green-2: #2f7a3a;
  --ifdv-teal: #2e847c;
  --ifdv-light-green: #eaf4e8;
  --ifdv-cream: #fbfaf4;
  --ifdv-orange: #f05a28;
  --ifdv-yellow: #f7b315;
  --ifdv-text: #203126;
  --ifdv-muted: #68756c;
  --ifdv-border: rgba(25, 76, 36, .14);
  --ifdv-shadow: 0 20px 60px rgba(25, 76, 36, .12);
  --ifdv-radius: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  color: var(--ifdv-text);
  background: var(--ifdv-cream);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--ifdv-green-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }

a:hover { color: var(--ifdv-orange); }

.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: #fff;
  border-radius: 10px;
  z-index: 9999;
}

.ifdv-container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  background: rgba(251, 250, 244, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ifdv-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header--after-hero {
  position: sticky;
  top: 0;
}

body.home .site-header--after-hero .site-header__inner {
  justify-content: center;
  min-height: 62px;
}

body.home .site-header--after-hero .site-branding {
  display: none;
}

body.home .site-header--after-hero .site-navigation {
  width: 100%;
}

body.home .site-header--after-hero .primary-menu {
  justify-content: center;
}

.ifdv-text--wide {
  max-width: 900px;
}

.site-header__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ifdv-green);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.site-branding img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 999px;
}

.site-branding span {
  font-size: 1rem;
}

.primary-menu {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 7px;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  padding: 8px 9px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ifdv-text);
  font-weight: 600;
  font-size: .88rem;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  background: var(--ifdv-light-green);
  color: var(--ifdv-green);
}

.ifdv-logo-opening {
  min-height: calc(100svh - 72px);
  display: grid;
  place-items: center;
  padding: 18px 20px 12px;
  background:
    radial-gradient(circle at 80% 20%, rgba(240, 90, 40, .12), transparent 28%),
    radial-gradient(circle at 14% 84%, rgba(46, 132, 124, .14), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--ifdv-cream) 100%);
}

.ifdv-logo-opening__box {
  width: min(920px, 96vw);
  margin: 0 auto;
  text-align: center;
}

.ifdv-logo-opening img {
  width: min(640px, 88vw);
  max-height: 68svh;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(25, 76, 36, .12));
}

.ifdv-scroll-hint {
  margin-top: 22px;
  color: var(--ifdv-muted);
  font-size: .95rem;
}

.ifdv-section {
  padding: 76px 0;
}

.ifdv-section--soft {
  background: #fff;
}

.ifdv-hero-text {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 44px;
  align-items: center;
}

.ifdv-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--ifdv-teal);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
}

.ifdv-eyebrow::before {
  content: "";
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: var(--ifdv-orange);
}

h1, h2, h3 {
  color: var(--ifdv-green);
  line-height: 1.15;
  margin: 0 0 18px;
}

h1 { font-size: clamp(2.35rem, 6vw, 4.9rem); letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 4.3vw, 3.3rem); letter-spacing: -.03em; }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }

.ifdv-lead {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: #38483d;
  margin: 0 0 24px;
}

.ifdv-text p,
.page-content p {
  margin-top: 0;
  font-size: 1.07rem;
}

.ifdv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.ifdv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ifdv-green);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(25, 76, 36, .18);
}

.ifdv-button:hover { background: var(--ifdv-orange); color: #fff; }

.ifdv-button--outline {
  background: transparent;
  color: var(--ifdv-green);
  border-color: rgba(25, 76, 36, .25);
  box-shadow: none;
}

.ifdv-button--outline:hover { background: var(--ifdv-light-green); color: var(--ifdv-green); }

.ifdv-card,
.ifdv-highlight,
.ifdv-page-card {
  background: #fff;
  border: 1px solid var(--ifdv-border);
  border-radius: var(--ifdv-radius);
  box-shadow: var(--ifdv-shadow);
}

.ifdv-highlight {
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.ifdv-highlight::after {
  content: "❤";
  position: absolute;
  right: 24px;
  top: 12px;
  color: var(--ifdv-orange);
  font-size: 3.5rem;
  opacity: .18;
}

.ifdv-highlight strong { color: var(--ifdv-green); }

.ifdv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.ifdv-grid--two { grid-template-columns: repeat(2, 1fr); }

.ifdv-card {
  padding: 28px;
}

.ifdv-card__icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--ifdv-light-green);
  color: var(--ifdv-green);
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.ifdv-card p { color: #4f5d54; margin-bottom: 0; }

.ifdv-download-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.ifdv-download-card p {
  margin-bottom: 8px;
}

.ifdv-download-card .ifdv-button {
  margin-top: auto;
}

.ifdv-page-hero {
  padding: 74px 0 54px;
  background:
    radial-gradient(circle at 84% 20%, rgba(247, 179, 21, .14), transparent 26%),
    radial-gradient(circle at 16% 80%, rgba(46, 132, 124, .12), transparent 28%),
    #fff;
  border-bottom: 1px solid var(--ifdv-border);
}

.ifdv-page-title {
  max-width: 880px;
}

.ifdv-page-title h1 { margin-bottom: 16px; }

.ifdv-page-title p {
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  margin: 0;
  color: #46564c;
}

.page-content {
  padding: 64px 0 84px;
}

.page-content > *:first-child { margin-top: 0; }

.ifdv-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.ifdv-list li {
  margin: 12px 0;
  padding-left: 30px;
  position: relative;
}

.ifdv-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ifdv-orange);
  position: absolute;
  left: 0;
  top: .68em;
}

.ifdv-quote {
  margin: 28px 0;
  padding: 28px 32px;
  border-left: 6px solid var(--ifdv-orange);
  background: #fff;
  border-radius: 0 22px 22px 0;
  box-shadow: 0 14px 40px rgba(25, 76, 36, .08);
  font-size: 1.18rem;
}

.ifdv-contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.ifdv-contact-item {
  padding: 22px;
  border: 1px solid var(--ifdv-border);
  border-radius: 22px;
  background: #fff;
}

.ifdv-contact-item strong {
  display: block;
  color: var(--ifdv-green);
  margin-bottom: 6px;
}

.site-footer {
  background: var(--ifdv-green);
  color: rgba(255, 255, 255, .88);
  padding: 42px 0;
}

.site-footer a { color: #fff; }

.site-footer__social {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.site-footer img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  padding: 6px;
}

body.home .site-main {
  scroll-margin-top: 92px;
}

@media (max-width: 920px) {
  .primary-menu { flex-wrap: wrap; justify-content: center; }

  .site-header__inner,
  .site-footer__inner,
  .ifdv-hero-text,
  .ifdv-contact-box { grid-template-columns: 1fr; display: grid; }

  .site-header__inner { gap: 12px; padding: 12px 0; }

  .primary-menu { justify-content: flex-start; }

  .ifdv-grid,
  .ifdv-grid--two { grid-template-columns: 1fr; }

  .ifdv-section { padding: 56px 0; }
}

@media (max-width: 560px) {
  .ifdv-container { width: min(100% - 28px, 1120px); }
  .site-branding span { display: none; }
  .primary-menu a { padding: 8px 9px; font-size: .88rem; }
  .ifdv-logo-opening { padding: 18px 14px 12px; min-height: calc(100svh - 128px); }
  .ifdv-logo-opening img { width: 92vw; max-height: 62svh; }
  .ifdv-highlight, .ifdv-card { padding: 22px; }
  .ifdv-page-hero { padding: 52px 0 36px; }
}


.ifdv-company-summary {
  max-width: 840px;
  margin: 0 0 20px;
  font-size: 1.03rem;
}

.ifdv-company-details {
  margin: 18px 0 0;
  font-style: normal;
  line-height: 1.75;
}

.ifdv-company-details strong {
  color: #fff;
}

.ifdv-social-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.ifdv-social-profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.ifdv-focus-link {
  word-break: break-word;
}

.swp_social_panel,
.swp_social_panelSide,
.nc_socialPanel,
.social_warfare,
div[class*="swp_social"],
div[class*="nc_social"] {
  display: none !important;
}


.ifdv-benefits-intro {
  margin: 0 0 26px;
  font-size: 1.08rem;
  color: #46564c;
}

.ifdv-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.ifdv-benefit-item {
  padding: 18px;
  border: 1px solid var(--ifdv-border);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, rgba(234,244,232,.54) 100%);
}

.ifdv-benefit-item strong {
  display: block;
  color: var(--ifdv-green);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: .92rem;
}

.ifdv-benefit-item p {
  margin: 0;
  color: #4f5d54;
  font-size: .98rem;
}

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

/* Nasconde i pannelli automatici di condivisione social esterni: restano visibili solo Facebook e Instagram ufficiali. */
.swp_social_panel,
.swp_social_panelSide,
.swp_horizontal_panel,
.swp_social_panel:not(.ifdv-social-profile-links),
.nc_socialPanel,
.nc_socialPanelSide,
.nc_wrapper,
.social_warfare,
.social-warfare,
.swp_share_button,
.swp_share_link,
div[class*="swp_social"],
div[class*="nc_social"],
div[class*="social_warfare"],
div[class*="social-warfare"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}


/* Hero home: titolo su due righe */
.ifdv-hero-text h1 .ifdv-welcome-line,
.ifdv-hero-text h1 .ifdv-brand-line {
  display: block;
}

.ifdv-hero-text h1 .ifdv-welcome-line {
  font-size: .58em;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: .12em;
}

.ifdv-hero-text h1 .ifdv-brand-line {
  line-height: 1.05;
}

.ifdv-focus-actions {
  justify-content: center;
  margin-top: 30px;
}
