/* =========================================================
   VILLA DOLCE VITA · blog
   stessa palette della home: blu #0E2C65 · azzurro #0091E9 · giallo sole #FDE44A
   font: Playfair Display (titoli) + Lato (testo)
========================================================= */
:root {
  --navy: #0E2C65;
  --navy-deep: #071C42;
  --blue: #0091E9;
  --blue-ink: #316BD7;
  --sun: #FDE44A;
  --gold: #EFB800;
  --gold-deep: #C08E00;
  --paper: #FFFFFF;
  --mist: #F1F6FC;
  --mist-2: #E3EDF9;
  --sand: #F7F4EC;
  --ink: #16233A;
  --ink-80: rgba(22, 35, 58, 0.82);
  --ink-60: rgba(22, 35, 58, 0.62);
  --ink-40: rgba(22, 35, 58, 0.42);
  --ink-20: rgba(22, 35, 58, 0.2);
  --line: rgba(14, 44, 101, 0.14);
  --serif: 'Playfair Display', 'Times New Roman', serif;
  --sans: 'Lato', -apple-system, system-ui, sans-serif;
  --gutter: clamp(20px, 4vw, 72px);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::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(--paper); color: var(--ink); font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
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(--navy); color: #fff; }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  padding: 14px var(--gutter);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-brand .logo-img { height: 52px; width: auto; display: block; }
.nav-menu { display: flex; justify-content: center; align-items: center; gap: 26px; list-style: none; }
.nav-menu a { position: relative; font-size: 13px; font-weight: 700; color: var(--navy); letter-spacing: 0.09em; text-transform: uppercase; transition: color 0.3s; }
.nav-menu a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.nav-menu a:hover { color: var(--blue-ink); }
.nav-menu a:hover::after, .nav-menu a.active::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-badge { height: 40px; width: auto; }
.nav-cta { background: var(--navy); color: #fff; padding: 12px 22px; border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; transition: background 0.3s, transform 0.3s; }
.nav-cta::after { content: "→"; transition: transform 0.35s var(--ease); }
.nav-cta:hover { background: var(--blue-ink); transform: translateY(-1px); color: #fff; }
.nav-burger { display: none; color: inherit; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; }
.nav-burger span { width: 24px; height: 2px; background: var(--navy); display: block; transition: transform 0.4s var(--ease), opacity 0.3s; }
.mobile-drawer { position: fixed; inset: 0; background: var(--navy); z-index: 99; padding: 100px var(--gutter) 40px; display: flex; flex-direction: column; justify-content: space-between; transform: translateY(-100%); transition: transform 0.55s var(--ease); overflow-y: auto; }
.mobile-drawer ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mobile-drawer ul a { font-family: var(--serif); font-size: clamp(26px, 7vw, 38px); font-weight: 500; color: #fff; padding: 6px 0; display: inline-block; }
.mobile-drawer ul a:hover { color: var(--sun); }
.mobile-drawer .drawer-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.2); }
.mobile-drawer .drawer-foot a { font-size: 14px; color: rgba(255,255,255,0.85); }
.mobile-drawer .drawer-foot .cta { background: var(--gold); color: var(--navy); padding: 14px 22px; border-radius: 4px; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
body.menu-open { overflow: hidden; }
body.menu-open .mobile-drawer { transform: translateY(0); }
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1080px) {
  .nav-menu li { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 520px) { .nav-badge { display: none; } }

/* ===== BLOG HEADER ===== */
.blog-hero { background: var(--navy); color: #fff; padding: clamp(56px, 7vw, 96px) 0 clamp(52px, 6vw, 84px); position: relative; overflow: hidden; }
.blog-hero::before { content: ''; position: absolute; right: -160px; top: -160px; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(253,228,74,0.16), transparent 68%); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }
.kicker { display: inline-flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--sun); margin-bottom: 16px; }
.kicker::before { content: ''; width: 34px; height: 2px; background: var(--sun); }
.blog-hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.12; max-width: 20ch; }
.blog-hero h1 em { font-style: italic; color: var(--sun); font-weight: 500; }
.blog-hero p { margin-top: 18px; font-size: clamp(15.5px, 1.1vw, 17.5px); color: rgba(255,255,255,0.84); max-width: 62ch; }

/* ===== FILTRI ===== */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 0; }
.filter { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.28); color: #fff; transition: all 0.3s var(--ease); }
.filter:hover { border-color: var(--sun); }
.filter.active { background: var(--sun); color: var(--navy); border-color: var(--sun); }

/* ===== GRID ARTICOLI ===== */
.posts { padding: clamp(52px, 6vw, 84px) 0 clamp(64px, 8vw, 110px); }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 28px 56px -30px rgba(14,44,101,0.32); }
.post-card .im { aspect-ratio: 16/10; overflow: hidden; background: var(--mist-2); }
.post-card .im img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.post-card:hover .im img { transform: scale(1.06); }
.post-card .bd { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card .cat { font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-ink); margin-bottom: 10px; }
.post-card h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--navy); line-height: 1.28; margin-bottom: 10px; }
.post-card p { font-size: 13.5px; color: var(--ink-60); flex: 1; line-height: 1.65; }
.post-card .more { margin-top: 16px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); display: inline-flex; align-items: center; gap: 8px; }
.post-card .more::after { content: '→'; transition: transform 0.3s; }
.post-card:hover .more::after { transform: translateX(4px); }
.post-card[hidden] { display: none !important; }
@media (max-width: 980px) { .posts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .posts-grid { grid-template-columns: 1fr; } }

/* ===== ARTICOLO ===== */
.article-head { background: var(--mist); padding: clamp(34px, 4vw, 54px) 0 0; }
.breadcrumb { font-size: 11.5px; letter-spacing: 0.06em; color: var(--ink-60); margin-bottom: 22px; }
.breadcrumb a { color: var(--blue-ink); font-weight: 700; }
.breadcrumb a:hover { text-decoration: underline; }
.article-head .cat { font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue-ink); }
.article-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.14; color: var(--navy); margin: 12px 0 14px; max-width: 22ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--ink-60); padding-bottom: clamp(30px, 4vw, 46px); }
.article-meta span { display: inline-flex; align-items: center; gap: 7px; }
.article-meta span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.article-hero { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.article-hero img { width: 100%; height: auto; border-radius: 8px; margin-top: -1px; box-shadow: 0 30px 70px -40px rgba(14,44,101,0.5); }

.article-body { max-width: 780px; margin: 0 auto; padding: clamp(40px, 5vw, 64px) var(--gutter) clamp(50px, 6vw, 80px); font-size: 17px; color: var(--ink-80); }
.article-body > p { margin-bottom: 20px; }
.article-body .lead { font-family: var(--serif); font-style: italic; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.5; color: var(--navy); margin-bottom: 28px; }
.article-body h2 { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; color: var(--navy); line-height: 1.22; margin: 42px 0 14px; }
.article-body h3 { font-family: var(--serif); font-size: clamp(20px, 1.9vw, 24px); font-weight: 600; color: var(--navy); line-height: 1.3; margin: 32px 0 10px; }
.article-body ul, .article-body ol { margin: 0 0 22px 22px; }
.article-body li { margin-bottom: 9px; }
.article-body li::marker { color: var(--gold); }
.article-body a { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--navy); }
.article-body strong { color: var(--navy); font-weight: 700; }
.article-body figure { margin: 30px 0; }
.article-body figure img { width: 100%; height: auto; border-radius: 8px; }
.article-body figure figcaption { font-size: 12.5px; color: var(--ink-60); margin-top: 9px; text-align: center; font-style: italic; }
.article-body .figrow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0; }
.article-body .figrow figure { margin: 0; }
@media (max-width: 620px) { .article-body .figrow { grid-template-columns: 1fr; } }
.article-body blockquote { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--navy); border-left: 3px solid var(--gold); padding-left: 22px; margin: 30px 0; line-height: 1.45; }
.article-body .tip { background: var(--mist); border-left: 3px solid var(--blue); padding: 18px 22px; border-radius: 6px; margin: 26px 0; font-size: 15.5px; }
.article-body .tip b { color: var(--navy); }
.article-body .signature { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--navy); margin-top: 32px; }

/* indice dei contenuti */
.toc { background: var(--sand); border: 1px solid var(--line); border-radius: 8px; padding: 24px 26px; margin: 0 0 34px; }
.toc b { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue-ink); margin-bottom: 12px; }
.toc ol { margin: 0 0 0 18px; }
.toc li { margin-bottom: 6px; font-size: 14.5px; }
.toc a { color: var(--ink-80); text-decoration: none; }
.toc a:hover { color: var(--navy); text-decoration: underline; }

/* CTA villa */
.villa-cta { background: var(--navy); color: #fff; border-radius: 10px; overflow: hidden; display: grid; grid-template-columns: 1.1fr 1fr; margin: 46px 0 10px; }
.villa-cta .tx { padding: clamp(26px, 3.4vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.villa-cta h3 { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; line-height: 1.22; margin-bottom: 12px; }
.villa-cta h3 em { color: var(--sun); font-style: italic; }
.villa-cta p { font-size: 14.5px; color: rgba(255,255,255,0.84); margin-bottom: 20px; }
.villa-cta .btn { align-self: flex-start; background: var(--gold); color: var(--navy); padding: 14px 24px; border-radius: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; display: inline-flex; gap: 10px; align-items: center; transition: background 0.3s, transform 0.3s; }
.villa-cta .btn:hover { background: var(--sun); transform: translateY(-2px); }
.villa-cta .im { position: relative; min-height: 240px; }
.villa-cta .im img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .villa-cta { grid-template-columns: 1fr; } }

/* correlati */
.related { background: var(--sand); padding: clamp(48px, 6vw, 80px) 0; }
.related h2 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; color: var(--navy); margin-bottom: 28px; }
.related .posts-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .related .posts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .related .posts-grid { grid-template-columns: 1fr; } }

/* ===== FOOTER ===== */
footer { background: var(--navy-deep); color: rgba(255,255,255,0.72); padding: 56px 0 30px; font-size: 13.5px; }
.footer-top { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 40px; display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.1fr; gap: 40px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-top h5 { font-family: var(--serif); font-size: 17px; font-weight: 600; color: #fff; margin-bottom: 14px; }
.footer-top a { display: block; color: rgba(255,255,255,0.72); padding: 5px 0; transition: color 0.3s; }
.footer-top a:hover { color: var(--sun); }
.footer-brand img.flogo { height: 58px; width: auto; margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; color: rgba(255,255,255,0.68); max-width: 38ch; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,0.24); display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.footer-social a svg { width: 17px; height: 17px; }
.footer-social a:hover { background: var(--sun); color: var(--navy); border-color: var(--sun); }
.footer-brand .fbadges { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.footer-brand .fbadges img { background: #fff; border-radius: 6px; padding: 6px; height: 52px; width: auto; }
.footer-bottom { max-width: var(--max); margin: 0 auto; padding: 22px var(--gutter) 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; color: rgba(255,255,255,0.5); }
.footer-bottom a { color: var(--sun); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

/* to top */
.to-top { position: fixed; bottom: 26px; right: 26px; z-index: 80; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; 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; }
.to-top.in { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--gold); color: var(--navy); }
