/* =========================================================
   L'EDEN DI NICOLAS — BLOG STYLESHEET (assets/blog.css)
   Foglio di stile CONDIVISO dalle pagine del blog.

   Le sezioni 1-9 sono estratte 1:1 dal design system di
   index.html (stesse variabili, stessa nav/drawer/footer,
   stessi componenti .btn / .breadcrumb / .sec-label / .sec-title).
   Nessuna invenzione: stessa mood board del sito.

   Le pagine blog NON includono selettore lingua né cookie
   banner: nessun servizio terzo (niente Google Translate,
   niente mappa) viene caricato da queste pagine — il footer
   rimanda direttamente a index.html per Privacy/Cookie/Termini.

   La sezione 10 contiene i componenti NUOVI, specifici del blog
   (griglia magazine, card articolo, hero tipografico articolo,
   prose, callout, box CTA soggiorno, articoli correlati, pillole
   categoria/filtri).
========================================================= */

/* ===== 1. VARIABILI ===== */
:root {
  --cream: #F6F1E6;
  --cream-2: #EDE6D4;
  --cream-3: #E2D9C1;
  --bone: #FBF8F1;
  --terracotta: #B8552E;
  --terracotta-dark: #8F3F1E;
  --ochre: #C48E3C;
  --olive: #6B7049;
  --olive-dark: #4D5134;
  --earth: #3E2E22;
  --earth-ink: #2A1F17;
  --ink-80: rgba(42, 31, 23, 0.82);
  --ink-60: rgba(42, 31, 23, 0.6);
  --ink-40: rgba(42, 31, 23, 0.4);
  --ink-20: rgba(42, 31, 23, 0.2);
  --ink-10: rgba(42, 31, 23, 0.1);
  --line: rgba(62, 46, 34, 0.15);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, system-ui, sans-serif;
  --gutter: clamp(20px, 4vw, 72px);
  --max: 1340px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-hero: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== 2. RESET + TIPOGRAFIA BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0 !important; padding: 0 !important; max-width: 100vw !important; width: 100% !important; overflow-x: hidden !important; }
body { font-family: var(--sans); background: var(--cream); color: var(--earth-ink); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "ss01", "kern", "liga"; }
main { display: block; width: 100%; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
::selection { background: var(--terracotta); color: var(--bone); }

.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
.italic { font-style: italic; }

/* ===== 3. NAV (identica al sito, senza selettore lingua) ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 22px var(--gutter);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  background: rgba(246, 241, 230, 0.82);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid transparent;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav.scrolled { padding: 14px var(--gutter); background: rgba(246, 241, 230, 0.95); border-bottom-color: var(--line); }

.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-brand .logo-img { height: 48px; width: auto; display: block; transition: height 0.4s var(--ease); }
.nav.scrolled .nav-brand .logo-img { height: 40px; }

.nav-menu { display: flex; justify-content: center; gap: 36px; list-style: none; }
.nav-menu a {
  position: relative; font-size: 13.5px; font-weight: 500; color: var(--ink-80);
  letter-spacing: 0.02em; transition: color 0.3s;
}
.nav-menu a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--terracotta); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.nav-menu a:hover { color: var(--earth); }
.nav-menu a:hover::after { transform: scaleX(1); }

.nav-cta {
  background: var(--earth); color: var(--cream);
  padding: 12px 22px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  letter-spacing: 0.01em;
}
.nav-cta::after { content: "→"; transition: transform 0.35s var(--ease); }
.nav-cta:hover { background: var(--terracotta); transform: translateY(-1px); box-shadow: 0 10px 30px -12px rgba(184, 85, 46, 0.5); }
.nav-cta:hover::after { transform: translateX(3px); }

.nav-burger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 10px;
}
.nav-burger span {
  width: 22px; height: 1.5px;
  background: var(--earth);
  display: block;
  transition: transform 0.4s var(--ease), opacity 0.3s, background 0.3s;
  transform-origin: center;
}

/* ===== 4. MOBILE DRAWER ===== */
.mobile-drawer {
  position: fixed; inset: 0;
  background: var(--cream);
  z-index: 99;
  padding: 100px var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease-hero);
  overflow-y: auto;
}
.mobile-drawer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mobile-drawer ul a {
  font-family: var(--serif); font-size: clamp(30px, 8vw, 46px); font-weight: 500;
  color: var(--earth); line-height: 1.1; letter-spacing: -0.02em;
  display: inline-block; padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.mobile-drawer ul a:hover { color: var(--terracotta); }
.mobile-drawer ul a .num { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--ochre); vertical-align: super; margin-right: 8px; letter-spacing: 0.1em; }
.mobile-drawer .drawer-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.mobile-drawer .drawer-foot a { font-size: 14px; color: var(--ink-80); }
.mobile-drawer .drawer-foot .cta { background: var(--earth); color: var(--cream); padding: 14px 22px; border-radius: 999px; text-align: center; font-size: 13.5px; font-weight: 500; margin-top: 8px; }

body.menu-open { overflow: hidden; }
body.menu-open .mobile-drawer { transform: translateY(0); }
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--earth); }
body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--earth); }

@media (max-width: 1000px) {
  .nav { grid-template-columns: auto 1fr auto; }
  .nav-menu li { display: none; }
  .nav-menu { gap: 0; justify-content: flex-end; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
}

/* ===== 5. LAYOUT BASE ===== */
section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.sec-label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--terracotta);
  margin-bottom: 22px;
}
.sec-label::before { content: '—'; color: var(--ochre); }

h1.sec-title, h2.sec-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.2rem, 5.2vw, 4.4rem);
  line-height: 1.05; letter-spacing: -0.025em;
  color: var(--earth);
  max-width: 22ch;
  text-wrap: balance;
}
h1.sec-title em, h2.sec-title em { font-style: italic; color: var(--olive); font-weight: 400; }

.sec-lead {
  font-size: clamp(16px, 1.15vw, 18px);
  color: var(--ink-80);
  max-width: 55ch;
  margin-top: 24px;
  line-height: 1.65;
}

/* ===== 6. BREADCRUMB ===== */
.breadcrumb { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; letter-spacing: 0.04em; color: var(--ink-60); margin-bottom: 20px; transition: color 0.3s; }
.breadcrumb::before { content: '\2190'; color: var(--terracotta); transition: transform 0.3s; display: inline-block; }
.breadcrumb:hover { color: var(--terracotta); }
.breadcrumb:hover::before { transform: translateX(-3px); }

/* ===== 7. BOTTONI ===== */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.35s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--terracotta); color: var(--cream);
  box-shadow: 0 10px 30px -10px rgba(184,85,46,0.5);
}
.btn-primary::after { content: '→'; transition: transform 0.35s var(--ease); }
.btn-primary:hover { background: var(--terracotta-dark); transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(184,85,46,0.6); }
.btn-primary:hover::after { transform: translateX(4px); }

/* ===== 8. REVEAL ON SCROLL ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.1s var(--ease-hero), transform 1.1s var(--ease-hero); }
.reveal.in { opacity: 1; transform: none; }

/* ===== 9. FOOTER + TO-TOP ===== */
footer {
  background: var(--earth-ink); color: rgba(246,241,230,0.7);
  padding: 64px 0 36px;
  font-size: 13px;
}
.footer-top {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(246,241,230,0.1);
}
.footer-top h5 { font-family: var(--serif); font-size: 15px; font-weight: 500; color: var(--cream); margin-bottom: 16px; letter-spacing: 0.01em; }
.footer-top a { display: block; color: rgba(246,241,230,0.7); padding: 5px 0; transition: color 0.3s; }
.footer-top a:hover { color: var(--ochre); }
.footer-brand .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand p { font-size: 13px; color: rgba(246,241,230,0.65); max-width: 36ch; line-height: 1.6; }

.footer-legal { display: flex; justify-content: center; align-items: center; gap: 22px; flex-wrap: wrap; padding: 18px var(--gutter) 0; font-family: var(--serif); font-style: italic; font-size: 15px; color: rgba(246,241,230,0.62); border-top: 1px solid rgba(246,241,230,0.12); max-width: var(--max); margin: 0 auto; }
.footer-legal a { color: rgba(246,241,230,0.72); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color 0.3s, border-color 0.3s; }
.footer-legal a:hover { color: var(--ochre); border-bottom-color: var(--ochre); }
.footer-legal .sep { width: 3px; height: 3px; background: rgba(246,241,230,0.3); border-radius: 50%; }

.footer-bottom {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 0;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  font-size: 12px;
  color: rgba(246,241,230,0.5);
}
.footer-bottom .cin { font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } .footer-legal { gap: 12px; font-size: 13px; } .footer-legal .sep { display: none; } }

.to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 80;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--earth); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.4s, background 0.3s;
  box-shadow: 0 14px 32px -10px rgba(62,46,34,0.4);
}
.to-top.in { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--terracotta); }

/* =========================================================
   10. COMPONENTI BLOG (nuovi)
========================================================= */

/* --- Pillola categoria (card, hero articolo) --- */
.blog-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--terracotta);
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
}

/* --- Header pagina blog.html --- */
.blog-hero { padding: clamp(120px, 20vw, 170px) 0 8px; background: var(--bone); border-bottom: 1px solid var(--line); }
.blog-hero .sec-lead { margin-top: 20px; }

/* --- Filtri categoria (pillole cliccabili, JS vanilla) --- */
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0 24px; }
.blog-filters button {
  font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: 0.03em;
  color: var(--ink-80); background: var(--cream);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.blog-filters button:hover { border-color: var(--terracotta); color: var(--terracotta); }
.blog-filters button.active { background: var(--earth); color: var(--cream); border-color: var(--earth); }

/* --- Featured article (card grande in evidenza) --- */
.blog-featured {
  display: block; position: relative; overflow: hidden;
  background: var(--earth); color: var(--cream);
  border-radius: 8px;
  padding: clamp(36px, 5vw, 64px);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.blog-featured::before {
  content: ''; position: absolute; right: -160px; top: -160px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(196,142,60,0.22), transparent 68%);
}
.blog-featured:hover { transform: translateY(-4px); box-shadow: 0 40px 80px -30px rgba(42,31,23,0.45); }
.blog-featured .kicker {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ochre); margin-bottom: 22px;
}
.blog-featured h2 {
  position: relative; z-index: 1;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.08; letter-spacing: -0.02em;
  max-width: 19ch; color: var(--cream); text-wrap: balance;
}
.blog-featured h2 em { font-style: italic; color: var(--ochre); font-weight: 400; }
.blog-featured .excerpt { position: relative; z-index: 1; margin-top: 18px; max-width: 58ch; font-size: 15.5px; color: rgba(246,241,230,0.82); line-height: 1.6; }
.blog-featured .meta { position: relative; z-index: 1; display: flex; gap: 16px; flex-wrap: wrap; margin-top: 26px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(246,241,230,0.6); }
.blog-featured .go { position: relative; z-index: 1; margin-top: 28px; display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--cream); border-bottom: 1px solid rgba(246,241,230,0.4); padding-bottom: 4px; transition: gap 0.3s, border-color 0.3s; }
.blog-featured .go::after { content: '\2192'; transition: transform 0.3s; }
.blog-featured:hover .go::after { transform: translateX(4px); }

/* --- Griglia magazine + card articolo --- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card {
  display: flex; flex-direction: column;
  background: var(--cream); border: 1px solid var(--line); border-radius: 6px;
  padding: 30px 28px;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.3s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(62,46,34,0.25); border-color: var(--earth); }
.blog-card .blog-pill { align-self: flex-start; margin-bottom: 16px; }
.blog-card h3 { font-family: var(--serif); font-size: clamp(20px, 2vw, 24px); font-weight: 500; color: var(--earth); line-height: 1.22; letter-spacing: -0.01em; }
.blog-card .excerpt {
  margin-top: 12px; color: var(--ink-80); font-size: 14px; line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card .blog-meta { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-60); letter-spacing: 0.04em; }
.blog-card .go { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--terracotta); display: inline-flex; align-items: center; gap: 8px; transition: gap 0.3s; }
.blog-card .go::after { content: '\2192'; transition: transform 0.3s; }
.blog-card:hover .go::after { transform: translateX(4px); }
.blog-card[hidden] { display: none; }

@media (max-width: 1000px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

/* --- Hero tipografico (pagina articolo singolo, senza foto) --- */
.article-hero { padding: clamp(130px, 20vw, 180px) 0 56px; background: var(--bone); border-bottom: 1px solid var(--line); }
.article-hero .blog-pill { margin-bottom: 26px; }
.article-hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.4rem, 5.6vw, 4.6rem); line-height: 1.05; letter-spacing: -0.025em;
  color: var(--earth); max-width: 19ch; text-wrap: balance;
}
.article-hero h1 em { font-style: italic; color: var(--olive); font-weight: 400; }
.article-hero .subtitle { margin-top: 22px; font-size: clamp(16px, 1.3vw, 19px); color: var(--ink-80); max-width: 62ch; line-height: 1.6; }
.article-meta { margin-top: 30px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-60); }
.article-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-40); }

/* --- Corpo articolo (prose) --- */
.article-body { padding: clamp(56px, 8vw, 90px) 0; }
.prose { max-width: 70ch; }
.prose p { font-size: 16px; line-height: 1.8; color: var(--ink-80); }
.prose p + p { margin-top: 20px; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 3vw, 32px); color: var(--earth); letter-spacing: -0.015em; margin-top: 48px; margin-bottom: 18px; line-height: 1.2; }
.prose h2 em { font-style: italic; color: var(--olive); font-weight: 400; }
.prose ul { margin: 22px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose li { font-size: 15.5px; color: var(--ink-80); line-height: 1.65; }
.prose strong { color: var(--earth); font-weight: 600; }

/* --- Callout (box evidenza dentro il testo) --- */
.callout { background: var(--cream-2); border-left: 3px solid var(--ochre); padding: 18px 22px; border-radius: 4px; font-size: 14.5px; color: var(--ink-80); line-height: 1.65; margin: 32px 0; max-width: 70ch; }
.callout strong { color: var(--earth); }

/* --- Box CTA soggiorno (dentro / fine articolo) --- */
.blog-cta {
  margin: 48px 0; max-width: 70ch; position: relative; overflow: hidden;
  background: var(--earth); color: var(--cream);
  border-radius: 8px; padding: clamp(32px, 4vw, 44px);
}
.blog-cta::before { content: ''; position: absolute; right: -140px; top: -140px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(196,142,60,0.22), transparent 68%); }
.blog-cta h4 { position: relative; z-index: 1; font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 2.6vw, 30px); color: var(--cream); letter-spacing: -0.015em; max-width: 22ch; }
.blog-cta p { position: relative; z-index: 1; margin-top: 12px; font-size: 14.5px; color: rgba(246,241,230,0.8); max-width: 48ch; line-height: 1.6; }
.blog-cta .actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 26px; }
.blog-cta .actions .link { font-size: 13.5px; font-weight: 500; color: var(--ochre); border-bottom: 1px solid rgba(196,142,60,0.4); padding-bottom: 3px; transition: color 0.3s, border-color 0.3s; }
.blog-cta .actions .link:hover { color: var(--cream); border-bottom-color: var(--cream); }

/* --- Articoli correlati --- */
.blog-related { padding: clamp(56px, 8vw, 90px) 0; background: var(--bone); border-top: 1px solid var(--line); }
.blog-related .sec-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.blog-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.blog-related-grid .blog-card { background: var(--cream); }
@media (max-width: 900px) { .blog-related-grid { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .article-hero { padding-top: 150px; }
}


/* Foto articolo (Wikimedia Commons, credito in didascalia) */
.article-figure { margin: 38px 0 8px; }
.article-figure img { width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 14px; display: block; }
.article-figure figcaption { margin-top: 10px; font-size: 12px; color: var(--ink-60); letter-spacing: 0.02em; }
.article-figure figcaption a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.prose .article-figure { margin: 34px 0; }
