/*
Theme Name: AFitness Studio
Theme URI: https://www.afitness.it/
Author: AFitness
Description: Tema leggero per il sito AFitness.
Version: 0.2.8
Text Domain: afitness-studio
*/

:root {
  --af-ink: #101316;
  --af-muted: #586169;
  --af-paper: #f6f7f7;
  --af-soft: #eef3f2;
  --af-line: #d9e0df;
  --af-teal: #047d81;
  --af-coral: #00a6b4;
  --af-lime: #c6db3c;
  --af-white: #ffffff;
  --af-shadow: 0 18px 48px rgba(16, 19, 22, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--af-ink);
  background: var(--af-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.58;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
::selection { background: rgba(0, 166, 180, .22); }

.af-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.af-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 247, 247, .95);
  border-bottom: 1px solid var(--af-line);
  backdrop-filter: blur(12px);
}
.af-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.af-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 900; letter-spacing: 0; }
.af-brand img { width: 38px; height: 38px; border-radius: 8px; background: #15191b; padding: 6px; }
.af-menu { display: flex; align-items: center; gap: 20px; margin: 0; padding: 0; list-style: none; color: var(--af-muted); font-size: 14px; font-weight: 800; }
.af-menu a { text-decoration: none; }
.af-menu a:hover { color: var(--af-ink); }
.af-cta,
.af-button,
.afitness-form button {
  border: 0;
  border-radius: 8px;
  background: var(--af-coral);
  color: var(--af-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
  box-shadow: none;
}
.af-cta:hover,
.af-button:hover,
.afitness-form button:hover { background: #25bfca; }
.af-button.secondary { background: transparent; color: var(--af-ink); border: 1px solid var(--af-ink); }
.af-button.secondary:hover { background: var(--af-ink); color: var(--af-white); }
.af-button.light { color: var(--af-white); border-color: rgba(255,255,255,.55); }
.af-button.light:hover { background: var(--af-white); color: var(--af-ink); }

.af-hero {
  display: grid;
  align-items: center;
  padding: 92px 0 82px;
  border-bottom: 1px solid var(--af-line);
  background: linear-gradient(180deg, #ffffff 0%, var(--af-paper) 100%);
}
.af-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, .72fr);
  gap: 54px;
  align-items: center;
}
.af-kicker { color: var(--af-teal); font-size: 13px; font-weight: 900; text-transform: uppercase; }
.af-hero h1 {
  margin: 10px 0 16px;
  max-width: 760px;
  font-size: clamp(56px, 8vw, 104px);
  line-height: .94;
  letter-spacing: 0;
}
.af-lede { max-width: 720px; color: #343a40; font-size: clamp(18px, 2vw, 23px); }
.af-lede.small { font-size: clamp(17px, 1.5vw, 20px); }
.af-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.af-visual {
  min-height: 460px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 34px;
  background: #14191b;
  color: var(--af-white);
  border-radius: 8px;
  box-shadow: var(--af-shadow);
}
.af-mark {
  width: min(220px, 80%);
  margin: 0 auto 22px;
  display: block;
  border-radius: 8px;
  background: var(--af-teal);
  padding: 26px;
}
.af-metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.af-metric { border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 14px; min-height: 104px; }
.af-metric strong { display: block; color: var(--af-lime); font-size: 28px; line-height: 1; }
.af-metric span { display: block; margin-top: 8px; color: rgba(255,255,255,.78); font-size: 13px; }

.af-section { padding: 76px 0; border-bottom: 1px solid var(--af-line); }
.af-section.af-soft { background: var(--af-soft); }
.af-section-head { display: grid; grid-template-columns: minmax(0, .78fr) minmax(280px, .5fr); gap: 34px; align-items: end; margin-bottom: 34px; }
.af-section h2, .af-page-main h1, .af-page-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.05; letter-spacing: 0; }
.af-section-head p { margin: 0; color: var(--af-muted); }
.af-section-action { margin-top: 28px; }
.af-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.af-grid.three { grid-template-columns: repeat(3, 1fr); }
.af-grid.four { grid-template-columns: repeat(4, 1fr); }
.af-card {
  min-height: 220px;
  border: 1px solid var(--af-line);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  padding: 24px;
}
.af-card strong { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--af-teal); color: white; margin-bottom: 20px; font-size: 13px; }
.af-card h2, .af-card h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.2; letter-spacing: 0; }
.af-card h2 a, .af-card h3 a { text-decoration: none; }
.af-card p { margin: 0 0 16px; color: var(--af-muted); }
.af-band { background: var(--af-ink); color: var(--af-white); }
.af-band .af-section-head p, .af-band .af-card p, .af-band .af-lede, .af-band .af-list li { color: rgba(255,255,255,.74); }
.af-band .af-card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.af-band .af-card strong { background: var(--af-lime); color: var(--af-ink); }
.af-band .af-link { color: var(--af-lime); }
.af-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(300px, .7fr); gap: 48px; align-items: start; }
.af-split.reverse { grid-template-columns: minmax(300px, .7fr) minmax(0, .9fr); }
.af-split.reverse > :first-child { order: 2; }
.af-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.af-list li { padding: 18px 0; border-bottom: 1px solid rgba(16,19,22,.14); color: var(--af-muted); }
.af-list b { display: block; color: var(--af-ink); margin-bottom: 4px; }
.af-link { color: var(--af-teal); font-weight: 900; text-decoration: none; }
.af-link:hover { text-decoration: underline; }
.af-link.big { display: inline-flex; margin-top: 18px; font-size: 17px; }
.af-muted { color: var(--af-muted); }

.af-profile-panel,
.af-contact-panel {
  border-radius: 8px;
  background: var(--af-white);
  border: 1px solid var(--af-line);
  padding: 28px;
  box-shadow: var(--af-shadow);
}
.af-profile-panel img { width: 94px; height: 94px; border-radius: 8px; background: #14191b; padding: 14px; }
.af-profile-panel p { margin: 18px 0 0; color: var(--af-muted); }
.af-contact-panel.compact { box-shadow: none; }

.af-page-main { padding-top: 58px; }
.af-page-layout { max-width: 880px; }
.af-two-col { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.af-content { font-size: 18px; }
.af-content > *:first-child { margin-top: 0; }
.af-content h1 { margin: 14px 0 24px; }
.af-content h2 { margin: 42px 0 12px; font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: 0; scroll-margin-top: 96px; }
.af-content h3 { margin: 28px 0 10px; font-size: 23px; line-height: 1.2; letter-spacing: 0; }
.af-content p, .af-content li { color: #343a40; }
.af-content a { color: var(--af-teal); font-weight: 800; }
.af-content ul, .af-content ol { padding-left: 1.2em; }
.af-page-hero { background: #fff; padding-bottom: 50px; }
.af-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; color: var(--af-muted); font-size: 13px; font-weight: 800; }
.af-breadcrumbs a { color: var(--af-teal); text-decoration: none; }
.af-breadcrumbs a::after { content: "/"; color: var(--af-muted); margin-left: 8px; }
.af-date { display: block; margin: -8px 0 22px; color: var(--af-muted); font-size: 14px; font-weight: 800; }
.af-featured { width: 100%; border-radius: 8px; margin: 0 0 28px; }
.af-side-index { position: sticky; top: 104px; border-left: 1px solid var(--af-line); padding-left: 22px; }
.af-side-index h2 { margin: 0 0 14px; font-size: 18px; line-height: 1.2; }
.af-index-list, .af-side-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.af-index-list a, .af-side-list a { color: var(--af-ink); text-decoration: none; font-weight: 800; }
.af-side-list time { display: block; color: var(--af-muted); font-size: 12px; margin-top: 3px; }
.af-cta-band { margin-top: 46px; padding: 28px; background: #14191b; color: #fff; border-radius: 8px; }
.af-cta-band h2 { margin-top: 0; color: #fff; }
.af-cta-band p { color: rgba(255,255,255,.76); }

.af-article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.af-article-card { border: 1px solid var(--af-line); background: #fff; border-radius: 8px; padding: 22px; min-height: 220px; }
.af-article-card img { border-radius: 8px; margin-bottom: 14px; }
.af-article-card time { color: var(--af-muted); font-size: 13px; font-weight: 800; }
.af-article-card h2 { margin: 10px 0; font-size: 22px; line-height: 1.18; }
.af-article-card h2 a { text-decoration: none; }
.af-article-card p { color: var(--af-muted); }

.afitness-form { max-width: 720px; }
.afitness-form p { margin: 0 0 16px; }
.afitness-form label { font-weight: 800; }
.afitness-form input[type=text],
.afitness-form input[type=email],
.afitness-form input[type=tel],
.afitness-form input[type=number],
.afitness-form select,
.afitness-form textarea {
  width: 100%;
  border: 1px solid var(--af-line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--af-ink);
  font: inherit;
}
.afitness-form textarea { resize: vertical; }
.afitness-form label input[type=checkbox] { width: auto; margin-right: 8px; }
.afitness-hp { position: absolute; left: -9999px; }
.afitness-form-notice { padding: 12px 14px; margin: 0 0 16px; border-left: 4px solid #18794e; background: #eef8f2; }
.afitness-form-notice.is-error { border-left-color: #b42318; background: #fff1f0; }
.afitness-review { margin: 0 0 24px; padding: 20px; border-radius: 8px; background: #fff; border: 1px solid var(--af-line); }
.afitness-review blockquote { margin: 0; }
.afitness-review-name { font-weight: 900; }
.cf-turnstile, .h-captcha, .g-recaptcha { margin: 12px 0 16px; }

.af-footer { padding: 42px 0 26px; color: var(--af-muted); background: #fff; }
.af-footer-grid { display: grid; grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(150px, .6fr)); gap: 28px; align-items: start; }
.af-footer nav { display: grid; gap: 8px; }
.af-footer a { color: inherit; text-decoration: none; }
.af-footer a:hover { color: var(--af-ink); }
.af-footer-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--af-line); font-size: 13px; }

@media (max-width: 980px) {
  .af-shell { width: min(100% - 28px, 1160px); }
  .af-menu-toggle { display: inline-flex; order: 3; }
  .af-primary-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(100% + 1px);
    display: none;
    background: rgba(255,255,255,.98);
    border: 1px solid var(--af-line);
    border-radius: 8px;
    box-shadow: var(--af-shadow);
    padding: 10px;
  }
  .af-menu-open .af-primary-nav { display: block; }
  .af-menu {
    display: grid;
    gap: 0;
    color: var(--af-ink);
    font-size: 16px;
  }
  .af-menu li + li { border-top: 1px solid var(--af-line); }
  .af-menu a { display: block; padding: 14px 10px; }
  .af-nav { position: relative; }
  .af-cta { margin-left: auto; }
  .af-hero-grid,
  .af-section-head,
  .af-split,
  .af-split.reverse,
  .af-two-col { grid-template-columns: 1fr; }
  .af-split.reverse > :first-child { order: 0; }
  .af-hero { padding: 54px 0 58px; }
  .af-visual { min-height: auto; padding: 24px; }
  .af-grid,
  .af-grid.three,
  .af-grid.four,
  .af-article-grid,
  .af-footer-grid { grid-template-columns: 1fr; }
  .af-metric-grid { grid-template-columns: 1fr; }
  .af-side-index { position: static; border-left: 0; padding-left: 0; border-top: 1px solid var(--af-line); padding-top: 22px; }
}

@media (max-width: 520px) {
  .af-nav { min-height: 66px; }
  .af-brand span { font-size: 15px; }
  .af-cta { min-height: 40px; padding: 0 13px; }
  .af-hero h1 { font-size: 54px; }
  .af-section { padding: 54px 0; }
  .af-contact-panel, .af-profile-panel { padding: 20px; }
}


/* Form contrast fix: panels can appear inside dark sections. */
.af-contact-panel,
.af-contact-panel .afitness-form,
.af-contact-panel .afitness-form label,
.af-contact-panel .afitness-form p {
  color: var(--af-ink);
}
.af-contact-panel .afitness-form label {
  display: block;
}
.af-contact-panel .afitness-form input[type=checkbox] {
  width: auto;
  min-width: 14px;
  min-height: 14px;
  accent-color: var(--af-coral);
}
.af-contact-panel .afitness-form label:has(input[type=checkbox]) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 700;
  line-height: 1.4;
}
.af-contact-panel .afitness-form label:has(input[type=checkbox]) input {
  margin-top: 4px;
  margin-right: 0;
  flex: 0 0 auto;
}
.af-contact-panel .afitness-form input::placeholder,
.af-contact-panel .afitness-form textarea::placeholder {
  color: #7a838b;
}


/* Mobile navigation and interaction refinements. */
.af-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--af-line);
  border-radius: 8px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.af-menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--af-ink);
  transition: transform .18s ease, opacity .18s ease;
}
.af-menu-open .af-menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.af-menu-open .af-menu-toggle span:nth-child(2) { opacity: 0; }
.af-menu-open .af-menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.af-primary-nav { display: flex; }
.af-card,
.af-article-card,
.af-contact-panel,
.af-profile-panel {
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.af-card:hover,
.af-article-card:hover {
  border-color: rgba(4, 125, 129, .34);
  transform: translateY(-2px);
}
.af-content .af-button,
.af-content .af-link { word-break: normal; }


/* Content page refinements. */
.af-list-light li { border-color: rgba(255,255,255,.18); }
.af-list-light b { color: var(--af-white); }
.af-direct-contact { margin-top: 26px; color: rgba(255,255,255,.78); }
.af-direct-contact a { color: var(--af-lime); font-weight: 900; text-decoration: none; }
.af-contact-panel.compact p { margin: 16px 0 0; color: var(--af-muted); }
.af-band .af-contact-panel.compact { color: var(--af-ink); }
.af-band .af-contact-panel.compact .af-button { color: var(--af-ink); }
.af-cta-band .af-button + .af-button { margin-left: 10px; }
@media (max-width: 520px) {
  .af-cta-band .af-button + .af-button { margin-left: 0; margin-top: 10px; }
  .af-cta-band .af-button { width: 100%; }
}


/* Final mobile menu state: closed by default, hamburger visible. */
@media (max-width: 980px) {
  .af-menu-toggle {
    display: inline-flex !important;
  }
  .af-primary-nav {
    display: none !important;
  }
  html.af-menu-open .af-primary-nav {
    display: block !important;
  }
}


/* FAQ section. */
.af-faq-list { display: grid; gap: 10px; }
.af-faq-item {
  border: 1px solid var(--af-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.af-faq-item summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 900;
  color: var(--af-ink);
  list-style: none;
}
.af-faq-item summary::-webkit-details-marker { display: none; }
.af-faq-item summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--af-soft);
  color: var(--af-teal);
  font-weight: 900;
}
.af-faq-item[open] summary::after { content: "-"; }
.af-faq-item p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--af-muted);
}
.af-band .af-faq-item { border-color: rgba(255,255,255,.14); }


/* Local work section. */
.af-local-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.af-local-grid article {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--af-line);
  border-radius: 8px;
  background: #fff;
}
.af-local-grid strong {
  color: var(--af-ink);
  font-size: 20px;
  line-height: 1.2;
}
.af-local-grid span {
  color: var(--af-muted);
}


/* Hero image and carousel sections. */
.af-hero-image {
  min-height: min(760px, calc(100vh - 72px));
  background-size: cover;
  background-position: center;
  color: #fff;
}
.af-hero-image .af-hero-grid { grid-template-columns: minmax(0, 780px); }
.af-hero-image .af-kicker { color: var(--af-lime); }
.af-hero-image .af-lede { color: rgba(255,255,255,.86); }
.af-motto { margin: -4px 0 18px; font-size: clamp(24px, 3vw, 42px); line-height: 1.05; font-weight: 900; color: var(--af-lime); }
.af-carousel { position: relative; overflow: hidden; }
.af-carousel-track { display: flex; transition: transform .45s ease; will-change: transform; }
.af-carousel-slide { min-width: 100%; border: 1px solid var(--af-line); border-radius: 8px; background: #fff; padding: 24px; }
.af-article-slide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: center; }
.af-slide-image { display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--af-soft); text-decoration: none; }
.af-slide-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.af-slide-image-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 44px; font-weight: 900; color: var(--af-teal); }
.af-article-slide time { color: var(--af-muted); font-size: 13px; font-weight: 800; }
.af-article-slide h3 { margin: 8px 0 10px; font-size: clamp(24px, 3vw, 34px); line-height: 1.08; }
.af-article-slide p { color: var(--af-muted); }
.af-carousel-controls { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.af-carousel-controls button { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--af-line); background: #fff; color: var(--af-ink); font-size: 30px; line-height: 1; cursor: pointer; }
.af-review-carousel .af-carousel-slide { min-height: 260px; }
.af-review-slide a { display: grid; align-content: center; min-height: 212px; color: inherit; text-decoration: none; }
.af-review-slide blockquote { margin: 0; font-size: clamp(19px, 2vw, 25px); line-height: 1.35; color: var(--af-ink); }
.af-featured-badge { width: max-content; margin-bottom: 14px; border-radius: 999px; background: #e7f7f7; color: var(--af-teal); padding: 4px 10px; font-size: 12px; font-weight: 900; }
.af-review-cta { display: flex; align-items: end; justify-content: flex-end; }
.af-review-page-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .54fr); gap: 44px; align-items: start; }
.af-review-form-panel { position: sticky; top: 104px; }
.af-review-form-panel h2 { margin-top: 0; font-size: 28px; }
.af-reviews-list { display: grid; gap: 16px; }
.af-review-full { border: 1px solid var(--af-line); border-radius: 8px; background: #fff; padding: 24px; }
@media (max-width: 900px) {
  .af-hero-image { min-height: auto; }
  .af-article-slide, .af-review-page-layout { grid-template-columns: 1fr; }
  .af-review-form-panel { position: static; }
  .af-review-cta { justify-content: flex-start; }
}


/* Footer disclaimer and empty editorial. */
.af-footer-disclaimer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--af-line); font-size: 13px; line-height: 1.5; color: var(--af-muted); }
.af-empty-editorial { display: grid; gap: 24px; }
.af-empty-editorial > p { max-width: 860px; color: var(--af-muted); font-size: 18px; }

/* AFitness CTA responsive refinement */
.af-hero-note { margin-top: 12px; color: rgba(255,255,255,.78); font-weight: 700; }
@media (max-width: 620px) {
  .af-nav { gap: 8px; }
  .af-cta { font-size: 12px; padding: 0 10px; max-width: 178px; text-align: center; line-height: 1.15; white-space: normal; }
}
@media (max-width: 420px) {
  .af-brand span { display: none; }
  .af-cta { max-width: 160px; }
}

.af-article-thumb { display:block; aspect-ratio:1/1; overflow:hidden; background:#f2f4f3; border-radius:8px; margin-bottom:16px; }
.af-article-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.af-article-meta { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; color:var(--af-muted,#67706f); font-size:13px; font-weight:700; margin-bottom:8px; }
.af-tag-list { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0 4px; }
.af-tag-list span { border:1px solid var(--af-line,#dde4e2); border-radius:999px; padding:4px 9px; font-size:12px; color:var(--af-muted,#67706f); background:#fff; }
