/*
 * main.css — Boost4Biz
 * Stili specifici per le pagine del sito consulenziale:
 * homepage, chi sono, servizi, metodo, per chi, contatti, insight
 * Dipende da: variables.css, layout.css, components.css
 */

/* ══ HOMEPAGE — HERO ═════════════════════════════════════════════════════════ */

.site-hero {
  padding-top: calc(var(--header-height) + var(--sp-20));
  padding-bottom: var(--sp-20);
  background-color: var(--color-bg-dark); /* navy */
  position: relative;
  overflow: hidden;
}

/* Griglia decorativa navy */
.site-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 128, 96, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 128, 96, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

/* Alone verde in basso a destra */
.site-hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -80px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(15, 128, 96, .14) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image  { display: none; }
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: clamp(var(--text-4xl), 5.5vw, var(--text-6xl));
  color: var(--color-text-on-dark);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--sp-5);
  margin-top: var(--sp-2);
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted-on-dark);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--sp-10);
  max-width: 52ch;
}

/* SIDEPLACE: immagine hero laterale */
.hero-image {
  flex-shrink: 0;
}

/* ══ HOMEPAGE — CTA FINALE ═══════════════════════════════════════════════════ */

.cta-final {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.cta-final h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  color: var(--color-text-on-dark);
  margin-bottom: var(--sp-5);
  line-height: var(--leading-snug);
}

.cta-final p {
  font-size: var(--text-lg);
  color: var(--color-text-muted-on-dark);
  margin-bottom: var(--sp-10);
  max-width: 52ch;
  margin-inline: auto;
}

/* ══ PAGINA CHI SONO ═════════════════════════════════════════════════════════ */

.bio-section {
  padding-top: calc(var(--header-height) + var(--sp-16));
  padding-bottom: var(--sp-24);
  background: var(--color-bg);
}

.bio-grid {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--sp-16);
  align-items: start;
}

@media (max-width: 768px) {
  .bio-grid { grid-template-columns: 1fr; }
}

.bio-aside {
  position: sticky;
  top: calc(var(--header-height) + var(--sp-6));
}

.bio-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  overflow: hidden;
}

/* SIDEPLACE foto profilo */
.bio-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-6);
  overflow: hidden;
}

.bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--sp-1);
}

.bio-role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-6);
  line-height: var(--leading-relaxed);
}

.bio-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  border-top: 1px solid var(--color-border);
  padding-top: var(--sp-6);
}

.bio-meta-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.bio-meta-item strong {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
  min-width: 70px;
  flex-shrink: 0;
}

/* Contenuto bio */
.bio-content h1 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  margin-bottom: var(--sp-6);
  line-height: var(--leading-snug);
}

.bio-content h3 {
  font-size: var(--text-xl);
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-4);
}

.bio-content p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--sp-4);
  max-width: 65ch;
}

/* Lista metodo */
.metodo-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.metodo-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--color-bg-section);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.metodo-num {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-electric);
  min-width: 28px;
  flex-shrink: 0;
  padding-top: 2px;
}

.metodo-text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* ══ PAGINA SERVIZI ══════════════════════════════════════════════════════════ */

.services-hero {
  padding-top: calc(var(--header-height) + var(--sp-16));
  padding-bottom: var(--sp-16);
  background: var(--color-bg-dark);
}

.services-hero h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  color: var(--color-text-on-dark);
  margin-bottom: var(--sp-4);
}

.services-hero .lead {
  color: var(--color-text-muted-on-dark);
  max-width: 52ch;
}

/* Sezione servizi core */
.services-core {
  padding-block: var(--sp-24);
}

/* Blocco singolo servizio — layout 2 col */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
  padding-block: var(--sp-12);
  border-bottom: 1px solid var(--color-border);
}

.service-block:last-child {
  border-bottom: none;
}

.service-block--reversed .service-block__image {
  order: -1;
}

@media (max-width: 768px) {
  .service-block {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .service-block--reversed .service-block__image { order: 0; }
}

.service-block__num {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-cyan); /* arancione */
  margin-bottom: var(--sp-3);
}

.service-block h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--sp-4);
}

.service-block p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--sp-4);
  max-width: 55ch;
}

.service-block__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.service-block__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.service-block__list li::before {
  content: '';
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-electric-dim);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.5 4 8l4.5-6' stroke='%230F8060' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px 10px;
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 1px;
}

/* SIDEPLACE immagine servizio */
.service-block__image {
  width: 100%;
}

/* ══ PAGINA COME LAVORO ══════════════════════════════════════════════════════ */

.come-lavoro-hero {
  padding-top: calc(var(--header-height) + var(--sp-16));
  padding-bottom: var(--sp-16);
  background: var(--color-bg-dark);
}

.come-lavoro-hero h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  color: var(--color-text-on-dark);
  margin-bottom: var(--sp-4);
}

.come-lavoro-hero .lead {
  color: var(--color-text-muted-on-dark);
  max-width: 56ch;
}

.process-section {
  padding-block: var(--sp-20);
}

.process-detail {
  padding-block: var(--sp-20);
  background: var(--color-bg-section);
}

.process-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-12);
}

@media (max-width: 768px) {
  .process-detail-grid { grid-template-columns: 1fr; }
}

.process-detail-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
}

.process-detail-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.process-detail-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-electric-dim);
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-electric);
  flex-shrink: 0;
}

.process-detail-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.come-lavoro-promise {
  padding-block: var(--sp-20);
  background: var(--color-bg);
}

/* ══ PAGINA PER CHI ══════════════════════════════════════════════════════════ */

.perchi-section {
  padding-block: var(--sp-24);
  background: var(--color-bg);
}

/* Numeri target */
.perchi-target-numbers {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-10);
  margin-top: var(--sp-6);
}

.target-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--color-electric-light);
  border: 1px solid rgba(15, 128, 96, .2);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-electric);
}

/* Griglia sì/no */
.perchi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: start;
  margin-top: var(--sp-12);
}

@media (max-width: 768px) {
  .perchi-grid { grid-template-columns: 1fr; }
}

.perchi-panel {
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
}

.perchi-panel--si {
  background: var(--color-bg-section);
  border: 1px solid var(--color-border);
}

.perchi-panel--no {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.perchi-panel h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.perchi-panel h3::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.perchi-panel--si h3::before { background: var(--color-electric); }
.perchi-panel--no h3::before { background: var(--color-text-subtle); }

.perchi-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.perchi-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

.perchi-item::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
  background-size: 10px 10px;
  background-repeat: no-repeat;
  background-position: center;
}

.perchi-panel--si .perchi-item::before {
  background-color: var(--color-electric-dim);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.5 4 8l4.5-6' stroke='%230F8060' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.perchi-panel--no .perchi-item::before {
  background-color: var(--color-bg-section);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.5 2.5 7.5 7.5M7.5 2.5 2.5 7.5' stroke='%238AA098' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ══ PAGINA CONTATTI ═════════════════════════════════════════════════════════ */

.contatti-section {
  padding-top: calc(var(--header-height) + var(--sp-16));
  padding-bottom: var(--sp-24);
  background: var(--color-bg);
}

.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--sp-16);
  align-items: start;
}

@media (max-width: 768px) {
  .contatti-grid { grid-template-columns: 1fr; }
}

.contatti-intro h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--sp-4);
}

.contatti-intro .lead {
  margin-bottom: var(--sp-8);
}

.contatti-promise {
  padding: var(--sp-5) var(--sp-6) var(--sp-5) var(--sp-8);
  border-left: 3px solid var(--color-electric);
  background: var(--color-electric-dim);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--sp-6);
}

.contatti-promise p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
  max-width: none;
  line-height: var(--leading-relaxed);
}

/* ══ ARTICOLO INSIGHT (single.php) ══════════════════════════════════════════ */

.insight-article-wrap {
  padding-top: calc(var(--header-height) + var(--sp-12));
  padding-bottom: var(--sp-24);
  background: var(--color-bg);
}

.insight-article-inner {
  max-width: var(--container-narrow);
  margin-inline: auto;
}

.insight-article__header {
  margin-bottom: var(--sp-10);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--color-border);
}

.insight-article__title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-primary);
  margin-bottom: var(--sp-4);
  margin-top: var(--sp-3);
}

.insight-article__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  flex-wrap: wrap;
}

/* SIDEPLACE: immagine copertina articolo */
.insight-article__cover {
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--sp-10);
}

.insight-article__cover img {
  width: 100%;
  height: auto;
  display: block;
}

.insight-article__footer {
  margin-top: var(--sp-10);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--color-border);
}

/* Post nav prev/next */
.insight-post-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-top: var(--sp-12);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--color-border);
}

.insight-post-nav a {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--ease-fast);
  max-width: 48%;
}

.insight-post-nav a:hover {
  color: var(--color-electric);
}

.insight-post-nav__next {
  text-align: right;
  margin-left: auto;
}

/* ══ ARCHIVIO INSIGHT ════════════════════════════════════════════════════════ */

.insight-archive-wrap {
  padding-top: calc(var(--header-height) + var(--sp-12));
  padding-bottom: var(--sp-24);
  background: var(--color-bg);
}

.archive-header {
  margin-bottom: var(--sp-12);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--color-border);
}

.archive-header h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--sp-3);
}

/* Griglia archivio insight */
.insight-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}

@media (max-width: 900px) {
  .insight-archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .insight-archive-grid { grid-template-columns: 1fr; }
}

/* ══ PER CHI — HERO ══════════════════════════════════════════════════════════ */

.perchi-hero {
  padding-top: calc(var(--header-height) + var(--sp-16));
  padding-bottom: var(--sp-12);
  background: var(--color-bg-section);
}

.perchi-panel__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--sp-5);
  color: var(--color-text-muted);
}

/* ══ INSIGHT — ARTICLE EXTRAS ════════════════════════════════════════════════ */

.insight-article-cta {
  margin-top: var(--sp-16);
  padding: var(--sp-8);
  background: var(--color-bg-section);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--color-electric);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.insight-article-cta p {
  margin: 0;
  color: var(--color-text);
  font-size: var(--text-base);
}

.insight-tags {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.insight-tags__label {
  font-weight: var(--weight-semibold);
  margin-right: var(--sp-1);
}

.insight-tags a {
  color: var(--color-text-muted);
  text-decoration: none;
  background: var(--color-bg-section);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

.insight-tags a:hover {
  background: var(--color-electric-light);
  color: var(--color-electric);
}

/* ══ ARCHIVE — PAGINATION ════════════════════════════════════════════════════ */

.archive-pagination .nav-links {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  flex-wrap: wrap;
}

.archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: var(--sp-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}

.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current {
  background: var(--color-electric);
  border-color: var(--color-electric);
  color: #fff;
}

/* ══ PAGINA GENERICA (Privacy Policy, Cookie Policy, ecc.) ══════════════════ */

.page-generic-wrap {
  padding-top: calc(var(--header-height) + var(--sp-12));
  padding-bottom: var(--sp-24);
  background: var(--color-bg);
}

.page-generic__header {
  margin-bottom: var(--sp-10);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--color-border);
}

.page-generic__header h1 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}

/* ══ 404 ═════════════════════════════════════════════════════════════════════ */

.error-wrap {
  padding-top: calc(var(--header-height) + var(--sp-24));
  padding-bottom: var(--sp-24);
  background: var(--color-bg-dark);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.error-inner {
  text-align: center;
  max-width: 520px;
  margin-inline: auto;
}

.error-code {
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  background: linear-gradient(135deg, var(--color-electric), var(--color-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: var(--sp-4);
}

.error-inner h1 {
  color: var(--color-text-on-dark);
  font-size: var(--text-2xl);
  margin-bottom: var(--sp-4);
}

.error-inner p {
  color: var(--color-text-muted-on-dark);
  font-size: var(--text-lg);
  margin-bottom: var(--sp-8);
  max-width: 40ch;
  margin-inline: auto;
}
