/*
Theme Name: Extendable Child – FG Nutrition
Template: extendable
Version: 1.0.0
Description: Tema figlio sportivo per Francesco Giorgio Nutrizionista
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --fg-dark:       #080c14;
  --fg-surface:    #0d1b2a;
  --fg-card:       rgba(14, 30, 54, 0.7);
  --fg-glass:      rgba(255,255,255,0.04);
  --fg-border:     rgba(255,255,255,0.08);
  --fg-green:      #00ff88;
  --fg-green-dim:  #00b86a;
  --fg-cyan:       #00d4ff;
  --fg-orange:     #ff6b35;
  --fg-white:      #f0f8ff;
  --fg-muted:      #6b8299;
  --fg-radius:     16px;
  --fg-radius-lg:  28px;
  --fg-glow-green: 0 0 40px rgba(0,255,136,0.25);
  --fg-glow-cyan:  0 0 40px rgba(0,212,255,0.2);
  --fg-font-head:  'Bebas Neue', 'Impact', sans-serif;
  --fg-font-sub:   'Exo 2', 'Rajdhani', sans-serif;
  --fg-font-body:  'Inter', system-ui, sans-serif;
  --transition:    0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.fg-topbar {
  background: #040810;
  border-bottom: 1px solid rgba(0,255,136,0.08);
  position: relative;
  z-index: 1001;
}
.fg-topbar__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
}
.fg-topbar__contacts {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.fg-topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fg-font-sub);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(176,196,220,0.75);
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}
.fg-topbar__item:hover { color: var(--fg-white); text-decoration: none; }
.fg-topbar__item--wa:hover { color: #25D366; }
.fg-topbar__icon-svg {
  width: 13px; height: 13px;
  flex-shrink: 0;
  opacity: 0.7;
}
.fg-topbar__item:hover .fg-topbar__icon-svg { opacity: 1; }
.fg-topbar__right { display: flex; align-items: center; gap: 16px; }
.fg-topbar__social { display: flex; align-items: center; gap: 10px; }
.fg-topbar__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 6px;
  color: rgba(176,196,220,0.5);
  transition: all var(--transition);
  text-decoration: none;
}
.fg-topbar__social-link svg { width: 14px; height: 14px; }
.fg-topbar__social-link:hover { color: var(--fg-white); background: rgba(255,255,255,0.06); }

/* ============================================================
   MAIN HEADER
   ============================================================ */
.fg-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8,12,20,0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.fg-header.is-scrolled {
  background: rgba(5,8,14,0.96);
  box-shadow: 0 4px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,255,136,0.06);
}
.fg-header__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Brand / Logo */
.fg-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.fg-header__logo-monogram {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--fg-green), var(--fg-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fg-font-head);
  font-size: 1.25rem;
  color: #080c14;
  font-weight: 900;
  letter-spacing: 0.05em;
  box-shadow: 0 0 24px rgba(0,255,136,0.3);
  flex-shrink: 0;
}
.fg-header__brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.fg-header__name {
  font-family: var(--fg-font-head);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  color: var(--fg-white);
  line-height: 1.1;
}
.fg-header__role {
  font-family: var(--fg-font-sub);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-green);
  opacity: 0.85;
}

/* Navigation desktop */
.fg-nav-desktop { }
.fg-nav-desktop .fg-nav__list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Navigation mobile (fuori dall'header, sempre nascosta di default) */
.fg-nav {
  display: none;
  position: fixed;
  top: 110px;
  left: 0; right: 0; bottom: 0;
  background: rgba(5,8,14,0.97);
  backdrop-filter: blur(24px);
  padding: 32px 24px;
  overflow-y: auto;
  z-index: 1100;
}
.fg-nav.is-open { display: block; }

/* Shared list styles */
.fg-nav__list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.fg-nav__link {
  display: block;
  padding: 7px 14px;
  font-family: var(--fg-font-sub);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(176,196,220,0.8);
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition);
  position: relative;
}
.fg-nav__link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 14px; right: 14px;
  height: 1.5px;
  background: var(--fg-green);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 1px;
}
.fg-nav__link:hover,
.fg-nav__link.is-active {
  color: var(--fg-white);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}
.fg-nav__link:hover::after,
.fg-nav__link.is-active::after { transform: scaleX(1); }

/* Header actions */
.fg-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.fg-header__tel-quick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  font-family: var(--fg-font-sub);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(176,196,220,0.85);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.fg-header__tel-quick svg { color: var(--fg-green); flex-shrink: 0; }
.fg-header__tel-quick:hover {
  border-color: var(--fg-green);
  color: var(--fg-white);
  background: rgba(0,255,136,0.05);
  text-decoration: none;
}

/* Small button variant */
.fg-btn--sm {
  padding: 9px 22px !important;
  font-size: 0.75rem !important;
}

/* Hamburger */
.fg-nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition);
}
.fg-nav-toggle:hover { border-color: var(--fg-green); }
.fg-hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}
.fg-hamburger span {
  display: block;
  height: 2px;
  background: var(--fg-white);
  border-radius: 1px;
  transition: all 0.3s ease;
}
.fg-nav-toggle[aria-expanded="true"] .fg-hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.fg-nav-toggle[aria-expanded="true"] .fg-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.fg-nav-toggle[aria-expanded="true"] .fg-hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Override vecchio header Extendable */
.wp-block-template-part header,
header.wp-block-group,
.is-style-ext-preset--group--natural-1--header-1 {
  display: none !important;
}

/* ============================================================
   RESPONSIVE HEADER
   ============================================================ */
@media (max-width: 1060px) {
  .fg-topbar__item--addr { display: none; }
}
@media (max-width: 860px) {
  .fg-topbar__item { display: none; }
  .fg-topbar__item:first-child,
  .fg-topbar__item--wa { display: inline-flex; }
  .fg-header__tel-quick .fg-header__tel-num { display: none; }
  .fg-nav-desktop { display: none; } /* nasconde nav desktop su mobile */
  .fg-nav { top: 158px; }
  .fg-nav .fg-nav__list { flex-direction: column; gap: 4px; }
  .fg-nav .fg-nav__link {
    padding: 14px 20px;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    border-bottom: 1px solid var(--fg-border);
    border-radius: 0;
  }
  .fg-nav-toggle { display: flex; }
}
@media (max-width: 480px) {
  .fg-topbar { display: none; }
  .fg-header__tel-quick { display: none; }
  .fg-nav { top: 68px; } /* topbar assente: il nav parte subito sotto l'header */
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--fg-dark);
  color: var(--fg-white);
  font-family: var(--fg-font-body);
  overflow-x: hidden;
}

/* Override Extendable's white background */
.wp-site-blocks,
.entry-content,
.wp-block-group,
body.home,
.page-template-default,
main,
.site-content {
  background: var(--fg-dark) !important;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, .fg-heading {
  font-family: var(--fg-font-head);
  letter-spacing: 0.04em;
  line-height: 1.05;
  font-weight: 900;
}

h4, h5, h6, .fg-subheading {
  font-family: var(--fg-font-sub);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fg-label {
  font-family: var(--fg-font-sub);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-green);
}

.fg-gradient-text {
  background: linear-gradient(135deg, var(--fg-green) 0%, var(--fg-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   GLOBAL SITE WRAPPER – DARK OVERRIDE
   ============================================================ */
.wp-block-template-part,
#wpadminbar + * .entry-content,
.wp-block-post-content {
  background: var(--fg-dark);
}

/* Header override */
.wp-block-template-part header,
header.wp-block-group {
  background: rgba(8,12,20,0.92) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--fg-border);
  position: sticky !important;
  top: 0;
  z-index: 1000;
}

.wp-block-navigation a,
.wp-block-navigation__responsive-container-open {
  color: var(--fg-white) !important;
  font-family: var(--fg-font-sub);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  transition: color var(--transition);
}

.wp-block-navigation a:hover { color: var(--fg-green) !important; }

/* Site title */
.wp-block-site-title a {
  background: linear-gradient(135deg, var(--fg-green), var(--fg-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--fg-font-head);
  font-size: 1.4rem !important;
  letter-spacing: 0.05em;
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.fg-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
              transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.fg-reveal.fg-left  { transform: translateX(-50px); }
.fg-reveal.fg-right { transform: translateX(50px); }
.fg-reveal.fg-scale { transform: scale(0.9); }

.fg-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.fg-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.fg-stagger.is-visible > * { opacity: 1; transform: none; }
.fg-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.fg-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.fg-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.fg-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.fg-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.fg-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.fg-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--fg-dark);
}

.fg-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(0,255,136,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(0,212,255,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 60% 10%, rgba(255,107,53,0.06) 0%, transparent 50%),
    linear-gradient(160deg, #060a12 0%, #0a1520 50%, #06100a 100%);
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.12); }
  100% { filter: brightness(1); }
}

/* Animated grid overlay */
.fg-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,136,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 80%);
}

/* Floating orbs */
.fg-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.fg-hero__orb--1 {
  width: 500px; height: 500px;
  top: -100px; left: -100px;
  background: radial-gradient(circle, rgba(0,255,136,0.15) 0%, transparent 70%);
  animation: orbFloat1 12s ease-in-out infinite;
}
.fg-hero__orb--2 {
  width: 400px; height: 400px;
  bottom: -80px; right: -50px;
  background: radial-gradient(circle, rgba(0,212,255,0.12) 0%, transparent 70%);
  animation: orbFloat2 15s ease-in-out infinite;
}
.fg-hero__orb--3 {
  width: 300px; height: 300px;
  top: 30%; right: 20%;
  background: radial-gradient(circle, rgba(255,107,53,0.08) 0%, transparent 70%);
  animation: orbFloat3 10s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%       { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%       { transform: translate(-40px, -60px) scale(1.05); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0,0); }
  50%       { transform: translate(20px, 30px); }
}

.fg-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 48px 80px;
  width: 100%;
}

.fg-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fg-font-sub);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--fg-green);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}
.fg-hero__eyebrow::before {
  content: '';
  display: block;
  width: 32px; height: 2px;
  background: var(--fg-green);
  box-shadow: var(--fg-glow-green);
}

.fg-hero__title {
  font-family: var(--fg-font-head);
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--fg-white);
  margin: 0 0 8px;
  opacity: 0;
  animation: fadeUp 0.8s 0.35s forwards;
}
.fg-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--fg-green) 0%, var(--fg-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fg-hero__subtitle {
  font-family: var(--fg-font-head);
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1;
  color: rgba(240,248,255,0.55);
  letter-spacing: 0.06em;
  margin: 0 0 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

.fg-hero__tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--fg-muted);
  font-style: italic;
  margin: 0 0 48px;
  opacity: 0;
  animation: fadeUp 0.8s 0.65s forwards;
}

.fg-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 72px;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

.fg-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 1s forwards;
  padding-top: 32px;
  border-top: 1px solid var(--fg-border);
}

.fg-hero__stat { }
.fg-hero__stat-value {
  font-family: var(--fg-font-head);
  font-size: 2.4rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--fg-green), var(--fg-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.fg-hero__stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  text-transform: uppercase;
  font-family: var(--fg-font-sub);
  margin-top: 2px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}

/* Scroll indicator */
.fg-hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--fg-font-sub);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  z-index: 2;
  opacity: 0;
  animation: fadeUp 0.8s 1.4s forwards;
}
.fg-hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--fg-green), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.fg-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--fg-font-sub);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}
.fg-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--transition);
}
.fg-btn:hover::before { opacity: 1; }

.fg-btn--primary {
  background: linear-gradient(135deg, var(--fg-green) 0%, var(--fg-cyan) 100%);
  color: #080c14;
  box-shadow: 0 8px 32px rgba(0,255,136,0.35);
}
.fg-btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,255,136,0.5);
  color: #080c14;
  text-decoration: none;
}

.fg-btn--outline {
  background: transparent;
  color: var(--fg-white);
  border: 1.5px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
}
.fg-btn--outline:hover {
  border-color: var(--fg-green);
  color: var(--fg-green);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,255,136,0.15);
  text-decoration: none;
}

/* ============================================================
   SECTION LAYOUT
   ============================================================ */
.fg-section {
  padding: clamp(80px, 10vw, 140px) clamp(24px, 5vw, 80px);
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.fg-section-dark {
  background: var(--fg-surface);
  padding: clamp(80px, 6vw, 140px) 0;
  position: relative;
  overflow: hidden;
}
.fg-section-dark .fg-section { padding-top: 0; padding-bottom: 0; }

.fg-section-header {
  margin-bottom: 64px;
}
.fg-section-header--center {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 64px;
}
.fg-section-title {
  font-family: var(--fg-font-head);
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--fg-white);
  margin: 8px 0 20px;
  line-height: 1;
}
.fg-section-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--fg-muted);
  max-width: 520px;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.fg-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.fg-about-image-wrap {
  position: relative;
}
.fg-about-image-wrap::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--fg-green), var(--fg-cyan), transparent);
  border-radius: var(--fg-radius-lg);
  z-index: 0;
}
.fg-about-image {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: calc(var(--fg-radius-lg) - 2px);
  object-fit: cover;
  background: var(--fg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.fg-about-image-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: calc(var(--fg-radius-lg) - 2px);
  background: linear-gradient(160deg, rgba(0,255,136,0.12), rgba(0,212,255,0.08));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

/* Floating badge */
.fg-about-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  z-index: 3;
  background: linear-gradient(135deg, var(--fg-green), var(--fg-cyan));
  color: #080c14;
  border-radius: var(--fg-radius);
  padding: 20px 24px;
  font-family: var(--fg-font-sub);
  font-weight: 700;
  text-align: center;
  box-shadow: var(--fg-glow-green);
  min-width: 110px;
}
.fg-about-badge__num {
  font-family: var(--fg-font-head);
  font-size: 2.2rem;
  line-height: 1;
  display: block;
}
.fg-about-badge__text {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

.fg-about-content { }

.fg-about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 32px;
}
.fg-skill-tag {
  padding: 7px 16px;
  border-radius: 50px;
  background: var(--fg-glass);
  border: 1px solid var(--fg-border);
  font-family: var(--fg-font-sub);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--fg-cyan);
  backdrop-filter: blur(10px);
}

.fg-about-text {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(240,248,255,0.75);
  margin: 0 0 32px;
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.fg-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.fg-card {
  position: relative;
  background: var(--fg-card);
  border: 1px solid var(--fg-border);
  border-radius: var(--fg-radius-lg);
  padding: 40px 36px;
  transition: all var(--transition);
  backdrop-filter: blur(20px);
  overflow: hidden;
}
.fg-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fg-green), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.fg-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(0,255,136,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}
.fg-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,255,136,0.25);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), var(--fg-glow-green);
}
.fg-card:hover::before { opacity: 1; }
.fg-card:hover::after  { opacity: 1; }

.fg-card__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,255,136,0.15), rgba(0,212,255,0.1));
  border: 1px solid rgba(0,255,136,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.fg-card__title {
  font-family: var(--fg-font-sub);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-white);
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
}
.fg-card__desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--fg-muted);
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ============================================================
   PALMARES / RISULTATI ATLETI
   ============================================================ */
.fg-palmares-section {
  position: relative;
  overflow: hidden;
}
.fg-palmares-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 10% 50%, rgba(0,255,136,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 30%, rgba(0,212,255,0.06) 0%, transparent 55%);
  pointer-events: none;
}

.fg-palmares-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.fg-filter-btn {
  padding: 8px 20px;
  border-radius: 50px;
  border: 1.5px solid var(--fg-border);
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--fg-font-sub);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
}
.fg-filter-btn:hover,
.fg-filter-btn.active {
  border-color: var(--fg-green);
  color: var(--fg-green);
  background: rgba(0,255,136,0.05);
}

.fg-palmares-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.fg-trophy-card {
  background: var(--fg-card);
  border: 1px solid var(--fg-border);
  border-radius: var(--fg-radius);
  padding: 28px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all var(--transition);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.fg-trophy-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--medal-color, var(--fg-green));
  border-radius: 3px 0 0 3px;
}
.fg-trophy-card:hover {
  transform: translateX(6px);
  border-color: rgba(0,255,136,0.2);
}

.fg-trophy-card[data-medal="gold"]   { --medal-color: #FFD700; }
.fg-trophy-card[data-medal="silver"] { --medal-color: #C0C0C0; }
.fg-trophy-card[data-medal="bronze"] { --medal-color: #CD7F32; }

.fg-trophy-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}
.fg-trophy-info { }
.fg-trophy-name {
  font-family: var(--fg-font-sub);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--fg-white);
  margin: 0 0 4px;
}
.fg-trophy-comp {
  font-size: 0.82rem;
  color: var(--fg-green);
  font-family: var(--fg-font-sub);
  font-weight: 600;
  margin: 0 0 6px;
}
.fg-trophy-detail {
  font-size: 0.78rem;
  color: var(--fg-muted);
  margin: 0;
}

/* ============================================================
   BLOG SECTION
   ============================================================ */
.fg-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.fg-post-card {
  background: var(--fg-card);
  border: 1px solid var(--fg-border);
  border-radius: var(--fg-radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  backdrop-filter: blur(20px);
}
.fg-post-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), var(--fg-glow-cyan);
}
.fg-post-card:hover .fg-post-thumb-overlay { opacity: 0.4; }

.fg-post-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(0,255,136,0.12), rgba(0,212,255,0.08));
}
.fg-post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--transition);
}
.fg-post-card:hover .fg-post-thumb img { transform: scale(1.06); }
.fg-post-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,12,20,0.8) 0%, transparent 60%);
  transition: opacity var(--transition);
  opacity: 0.6;
}
.fg-post-thumb-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.4;
}

.fg-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 0;
}
.fg-post-cat {
  font-family: var(--fg-font-sub);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-cyan);
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 3px 10px;
  border-radius: 50px;
}
.fg-post-date {
  font-size: 0.75rem;
  color: var(--fg-muted);
  font-family: var(--fg-font-sub);
}
.fg-post-content {
  padding: 16px 24px 28px;
}
.fg-post-title {
  font-family: var(--fg-font-sub);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--fg-white);
  text-decoration: none;
  margin: 0 0 10px;
  display: block;
  transition: color var(--transition);
}
.fg-post-title:hover { color: var(--fg-cyan); }
.fg-post-excerpt {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--fg-muted);
  margin: 0;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.fg-cta-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(0,255,136,0.15) 0%, rgba(0,212,255,0.1) 100%);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: var(--fg-radius-lg);
  padding: clamp(48px, 6vw, 80px) clamp(32px, 5vw, 64px);
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.fg-cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0,255,136,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.fg-cta-banner > * { position: relative; z-index: 1; }
.fg-cta-title {
  font-family: var(--fg-font-head);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--fg-white);
  margin: 0 0 16px;
}
.fg-cta-subtitle {
  font-size: 1rem;
  color: var(--fg-muted);
  margin: 0 0 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.fg-footer {
  background: #040710;
  border-top: 1px solid var(--fg-border);
  padding: 64px clamp(24px, 5vw, 80px) 32px;
}
.fg-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.fg-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 48px;
}
.fg-footer-brand__name {
  font-family: var(--fg-font-head);
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--fg-green), var(--fg-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 8px;
  line-height: 1;
}
.fg-footer-brand__tagline {
  font-family: var(--fg-font-sub);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 20px;
}
.fg-footer-brand__desc {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--fg-muted);
  max-width: 300px;
}
.fg-footer-col-title {
  font-family: var(--fg-font-sub);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-green);
  margin: 0 0 20px;
}
.fg-footer-links {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fg-footer-links a {
  font-size: 0.875rem;
  color: var(--fg-muted);
  text-decoration: none;
  font-family: var(--fg-font-sub);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.fg-footer-links a:hover { color: var(--fg-white); }
.fg-footer-links a::before {
  content: '';
  display: block;
  width: 6px; height: 1px;
  background: var(--fg-green);
  transition: width var(--transition);
}
.fg-footer-links a:hover::before { width: 14px; }

.fg-footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--fg-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.fg-footer-copy {
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-family: var(--fg-font-sub);
}
.fg-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}
.fg-footer-legal a {
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-family: var(--fg-font-sub);
  text-decoration: none;
  transition: color 0.25s ease;
  cursor: pointer;
}
.fg-footer-legal a:hover {
  color: var(--fg-green);
}

/* Social icons */
.fg-social-links {
  display: flex;
  gap: 12px;
}
.fg-social-link {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--fg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition);
  background: var(--fg-glass);
  backdrop-filter: blur(10px);
}
.fg-social-link:hover {
  border-color: var(--fg-green);
  color: var(--fg-green);
  background: rgba(0,255,136,0.08);
  transform: translateY(-3px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .fg-about-grid { grid-template-columns: 1fr; gap: 48px; }
  .fg-footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .fg-footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .fg-hero__content { padding: 100px 24px 60px; }
  .fg-hero__stats   { gap: 20px; }
  .fg-hero__ctas    { flex-direction: column; }
  .fg-footer-grid   { grid-template-columns: 1fr; }
  .fg-about-badge   { right: 0; bottom: -10px; }
}

/* ============================================================
   FIX BADGE CHI-SONO
   Quando fg-reveal.fg-left ha transform:translateX(-50px),
   per la spec CSS Transforms diventa il containing block del
   badge (position:absolute). Al termine dell'animazione
   (transform:none) il containing block cambia e il badge
   salta. Fix: disabilita il transform sull'elemento immagine
   in questa sezione (mantiene solo il fade opacity) e
   garantisce overflow visibile per il badge che sporge.
   ============================================================ */
#fg-site-header { margin-bottom: 13px; }

#chi-sono.fg-section-dark          { overflow: visible; }
#chi-sono .fg-about-image-wrap     { position: relative; overflow: visible; }
#chi-sono .fg-reveal.fg-left,
#chi-sono .fg-reveal.fg-left.is-visible { transform: none !important; }

/* ============================================================
   ADMIN BAR ADJUSTMENT
   ============================================================ */
.admin-bar .fg-hero { padding-top: 32px; }

/* ============================================================
   BLOG SINGLE / ARCHIVE
   ============================================================ */
.blog .wp-block-post-title,
.single .wp-block-post-title {
  font-family: var(--fg-font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--fg-white);
}
.blog .entry-content p,
.single .entry-content p {
  color: rgba(240,248,255,0.8);
  font-size: 1rem;
  line-height: 1.8;
}

/* Immagine in evidenza articolo singolo: dimensione massima 400px */
.single .wp-post-image,
.single .attachment-post-thumbnail,
.single .wp-block-post-featured-image img {
  max-width: 400px !important;
  max-height: 400px !important;
  width: auto !important;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: cover;
  border-radius: var(--fg-radius-lg);
  display: block;
}
/* Centra il contenitore dell'immagine in evidenza */
.single .wp-block-post-featured-image {
  display: flex;
  justify-content: center;
}

/* Titoli nella griglia articoli (archivio blog) più piccoli */
.wp-block-post-template .wp-block-post-title,
.wp-block-post-template .wp-block-post-title a {
  font-family: var(--fg-font-sub) !important;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem) !important;
  font-weight: 700;
  line-height: 1.35;
  color: var(--fg-white) !important;
}

/* "Leggi tutto →" nel blog archive */
.wp-block-post-excerpt__more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 18px;
  border: 1.5px solid rgba(0,255,136,.35);
  border-radius: 50px;
  font-family: var(--fg-font-sub);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-green) !important;
  text-decoration: none !important;
  background: rgba(0,255,136,.05);
  transition: all .35s cubic-bezier(.16,1,.3,1);
}
.wp-block-post-excerpt__more-link:hover {
  background: rgba(0,255,136,.12);
  border-color: var(--fg-green);
  box-shadow: 0 0 18px rgba(0,255,136,.2);
  gap: 10px;
}

/* ============================================================
   FORM CONTATTI – label e campi visibili su sfondo scuro
   ============================================================ */
.wpforms-form .wpforms-field-label,
.wpforms-form label,
.wpforms-form .wpforms-field-sublabel {
  color: var(--fg-white) !important;
}
.wpforms-form input[type="text"],
.wpforms-form input[type="email"],
.wpforms-form input[type="tel"],
.wpforms-form input[type="number"],
.wpforms-form input[type="url"],
.wpforms-form textarea,
.wpforms-form select {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.15) !important;
  color: var(--fg-dark) !important;
  border-radius: 8px !important;
}
.wpforms-form input::placeholder,
.wpforms-form textarea::placeholder {
  color: rgba(8,12,20,0.45) !important;
}
.wpforms-form input:focus,
.wpforms-form textarea:focus,
.wpforms-form select:focus {
  border-color: var(--fg-green) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(0,255,136,0.15) !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--fg-dark); }
::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-green); }

/* ============================================================
   ESPERIMENTO — Effetto moderno sui wp-block-heading (sottopagine)
   Testo in gradiente verde->ciano + underline animata allo scroll.
   Fallback senza JS: heading e underline restano visibili.
   ============================================================ */
.entry-content h2.wp-block-heading {
  position: relative;
  padding-bottom: 16px;
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, var(--fg-green) 0%, var(--fg-cyan) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.entry-content h2.wp-block-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 56px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--fg-green), var(--fg-cyan));
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.45);
  transform-origin: left center;
}
/* Animazioni innescate dallo scroll (classe is-visible aggiunta da main.js) */
.entry-content h2.wp-block-heading.is-visible {
  animation: fgHeadIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.entry-content h2.wp-block-heading.is-visible::after {
  animation: fgHeadLine 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
@keyframes fgHeadIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fgHeadLine {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .entry-content h2.wp-block-heading.is-visible,
  .entry-content h2.wp-block-heading.is-visible::after { animation: none; }
}
