/*
Theme Name: Lavoro Intelligente Newsletter
Theme URI: https://lavorointelligente.it
Author: Lavoro Intelligente
Author URI: https://lavorointelligente.it
Description: Versione aggiornata del tema WordPress con modulo newsletter/download integrato e tracciamento utenti. Tema moderno per blog e magazine dedicati all'Intelligenza Artificiale, tool, automazioni e guide pratiche. Home page con hero, griglia categorie, articoli in evidenza e box newsletter.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lavoro-intelligente-newsletter
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, block-styles, wide-blocks, translation-ready
*/

/* Reset base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a2236;
  background: #ffffff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #1d6cf3; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: #0d1834; line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

:root {
  --brand: #1d6cf3;
  --brand-dark: #0f4ec9;
  --ink: #0d1834;
  --muted: #5b6478;
  --bg-soft: #f4f8ff;
  --bg-deep: #0b1a3a;
  --border: #e6ecf5;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(15, 40, 100, .06);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px; gap: 24px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding img { max-height: 44px; width: auto; }
.site-title {
  font-weight: 800; font-size: 18px; line-height: 1.1; color: var(--ink); margin: 0;
}
.site-title span { display: block; color: var(--brand); font-size: 14px; letter-spacing: .04em; }
.main-nav ul {
  list-style: none; padding: 0; margin: 0; display: flex; gap: 28px;
}
.main-nav a {
  color: var(--ink); font-weight: 500; font-size: 15px;
}
.main-nav .current-menu-item > a,
.main-nav a:hover { color: var(--brand); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 15px;
  background: var(--brand); color: #fff !important; border: 1px solid var(--brand);
  transition: background .2s, transform .1s;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-outline {
  background: #fff; color: var(--brand) !important; border-color: #cfdcf5;
}
.btn-outline:hover { background: var(--bg-soft); }
.menu-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--ink); }

/* Hero */
.hero {
  background: linear-gradient(180deg, #f6faff 0%, #ffffff 100%);
  padding: 70px 0 50px;
}
.hero .container {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 4.4vw, 54px); font-weight: 800; letter-spacing: -.02em;
}
.hero h1 .accent { color: var(--brand); display: block; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.hero-badges {
  display: flex; gap: 36px; margin-top: 38px; flex-wrap: wrap;
}
.hero-badge { display: flex; gap: 12px; align-items: flex-start; }
.hero-badge .icon {
  width: 36px; height: 36px; border-radius: 8px; background: var(--bg-soft);
  display: grid; place-items: center; color: var(--brand); flex-shrink: 0;
}
.hero-badge strong { display: block; font-size: 14px; color: var(--ink); }
.hero-badge span { font-size: 13px; color: var(--muted); }
.hero-visual img { width: 100%; }

/* Categorie */
.section { padding: 60px 0; }
.section-eyebrow {
  color: var(--brand); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
}
.section-title { font-size: clamp(26px, 3vw, 36px); font-weight: 800; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }

.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.cat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: transform .2s, box-shadow .2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; margin-bottom: 18px;
}
.cat-card h3 { font-size: 18px; }
.cat-card p { color: var(--muted); font-size: 14px; }
.cat-card a.more { color: var(--brand); font-weight: 600; font-size: 14px; }

/* Articoli */
.posts-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.post-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-thumb { aspect-ratio: 16/10; background: #0b1a3a; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-cat {
  display: inline-block; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: .08em; align-self: flex-start;
}
.post-title { font-size: 17px; font-weight: 700; }
.post-title a { color: var(--ink); }
.post-excerpt { color: var(--muted); font-size: 14px; }
.post-meta { color: var(--muted); font-size: 12px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, #0b1a3a 0%, #15336e 100%);
  color: #fff; border-radius: 20px; padding: 50px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  margin: 40px 0;
}
.newsletter h2 { color: #fff; font-size: 28px; }
.newsletter p { color: #cfd9ee; }
.newsletter-features { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; }
.newsletter-features div strong { display: block; font-size: 14px; }
.newsletter-features div span { font-size: 12px; color: #9fb1d4; }
.newsletter form { display: flex; flex-direction: column; gap: 12px; }
.newsletter input[type="text"], .newsletter input[type="email"] {
  padding: 14px 16px; border-radius: 10px; border: 0; font-size: 15px;
  background: #fff; color: var(--ink);
}
.newsletter button { padding: 14px 16px; border-radius: 10px; border: 0;
  background: var(--brand); color: #fff; font-weight: 700; cursor: pointer; font-size: 15px;
}
.newsletter button:hover { background: var(--brand-dark); }
.newsletter .privacy { font-size: 12px; color: #9fb1d4; text-align: center; }
.newsletter .privacy a { color: #cfd9ee; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--border); padding: 60px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--muted); font-size: 14px; }
.footer-grid a:hover { color: var(--brand); }
.footer-about p { color: var(--muted); font-size: 14px; }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a {
  width: 34px; height: 34px; border-radius: 8px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 14px;
}
.site-info {
  border-top: 1px solid var(--border); margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  color: var(--muted); font-size: 13px;
}

/* Singles & generic content */
.entry-content { max-width: 760px; margin: 40px auto; padding: 0 20px; }
.entry-title { font-size: 38px; margin-bottom: 10px; }
.entry-meta { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.page-header { padding: 50px 0 20px; }

/* Responsive */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter { grid-template-columns: 1fr; padding: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 16px 20px; gap: 14px; }
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
}
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
