/*
Theme Name: Fuoco
Theme URI: https://example.com/fuoco
Author: Fede
Author URI: https://example.com
Description: Tema editoriale minimale ed elegante per siti di informazione e comunicazione, ispirato a Will Media. Design pulito con tipografia Playfair Display e DM Sans, palette carta/inchiostro con accento rosso.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: fuoco
Tags: blog, news, editorial, minimal, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ─── RESET & BASE ─── */
:root {
  --ink: #0a0a0a;
  --paper: #f7f5f0;
  --accent: #c8432e;
  --accent-hover: #b73a27;
  --accent-light: #e8d5c4;
  --mid: #6b6560;
  --light: #d4d0c8;
  --card-bg: #ffffff;
  --tag-bg: #f0ece4;
  --shadow: 0 2px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.1);
  --transition: 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: white;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.25;
}

/* ─── HEADER / NAV ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--light);
}

.nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.site-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 6px;
  color: var(--ink);
}

.site-logo span { color: var(--accent); }
.site-subtitle {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 2px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  font-size: 18px;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
}

.search-toggle:hover { background: var(--tag-bg); }

.btn-newsletter {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 10px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.btn-newsletter:hover { background: var(--accent); }

/* Category bar */
.nav-categories {
  border-top: 1px solid var(--tag-bg);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-categories::-webkit-scrollbar { display: none; }

.nav-categories .menu {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-categories .menu li a {
  display: block;
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
  position: relative;
  transition: var(--transition);
}

.nav-categories .menu li a:hover,
.nav-categories .menu li.current-menu-item a,
.nav-categories .menu li.current-cat a {
  color: var(--ink);
}

.nav-categories .menu li.current-menu-item a::after,
.nav-categories .menu li.current-cat a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--accent);
}

/* ─── HERO ─── */
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 20px;
  animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  display: block;
}

.hero-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-item:hover img { transform: scale(1.03); }

.hero-item--main { aspect-ratio: 16/10; }

.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 48px 36px 36px;
}

.hero-item--side .hero-overlay {
  padding: 32px 24px 24px;
}

.hero-overlay .cat-tag {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  margin-bottom: 14px;
}

.hero-overlay .hero-title {
  font-size: 32px;
  color: white;
  margin-bottom: 10px;
}

.hero-item--side .hero-overlay .hero-title { font-size: 20px; }

.hero-overlay .meta {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-item--side {
  flex: 1;
}

/* ─── SECTION HEADER ─── */
.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 48px;
  padding-bottom: 24px;
}

.section-header h2 { font-size: 24px; }

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light);
}

.section-header .see-all {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  transition: var(--transition);
}

.section-header .see-all:hover { color: var(--ink); }

/* ─── ARTICLE GRID ─── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 24px;
}

.article-card {
  background: var(--card-bg);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.article-card .thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.article-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .thumb img { transform: scale(1.05); }

.article-card .card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card .cat-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.article-card .card-title {
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.article-card .card-title a { transition: color var(--transition); }
.article-card .card-title a:hover { color: var(--accent); }

.article-card .excerpt {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-card .card-meta {
  font-size: 12px;
  color: var(--light);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-meta .dot {
  width: 3px; height: 3px;
  background: var(--light);
  border-radius: 50%;
  display: inline-block;
}

/* ─── EXPLAINER STRIP ─── */
.explainer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 24px;
}

.explainer-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  padding: 28px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: block;
}

.explainer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--accent);
}

.explainer-card:hover {
  transform: translateY(-3px);
  background: #151515;
}

.explainer-card .cat-label {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.explainer-card h4 {
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.explainer-card .read-time {
  font-size: 12px;
  color: rgba(247,245,240,0.4);
}

/* ─── NEWSLETTER ─── */
.newsletter-section {
  padding: 40px 0;
}

.newsletter-box {
  background: var(--ink);
  border-radius: 8px;
  padding: 56px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  position: relative;
  overflow: hidden;
}

.newsletter-box::after {
  content: '✉';
  position: absolute;
  right: 80px; top: 50%;
  transform: translateY(-50%);
  font-size: 180px;
  opacity: 0.03;
}

.nl-text h2 {
  font-size: 28px;
  color: var(--paper);
  margin-bottom: 8px;
}

.nl-text p {
  color: rgba(247,245,240,0.55);
  font-size: 15px;
  max-width: 420px;
}

.nl-form {
  display: flex;
  gap: 12px;
  z-index: 1;
}

.nl-form input[type="email"] {
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  width: 280px;
  outline: none;
  transition: var(--transition);
}

.nl-form input::placeholder { color: rgba(255,255,255,0.3); }
.nl-form input:focus { border-color: var(--accent); }

.nl-form button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.nl-form button:hover { background: var(--accent-hover); }

/* ─── SINGLE POST ─── */
.single-post-header {
  text-align: center;
  padding: 60px 0 32px;
  max-width: 760px;
  margin: 0 auto;
}

.single-post-header .cat-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.single-post-header h1 {
  font-size: 42px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.single-post-header .post-meta {
  font-size: 14px;
  color: var(--mid);
}

.single-featured-img {
  max-width: 960px;
  margin: 0 auto 40px;
  border-radius: 6px;
  overflow: hidden;
}

.single-featured-img img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.post-content p {
  font-size: 17px;
  line-height: 1.85;
  color: #2a2a2a;
  margin-bottom: 24px;
}

.post-content h2 {
  font-size: 28px;
  margin: 40px 0 16px;
}

.post-content h3 {
  font-size: 22px;
  margin: 32px 0 12px;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--mid);
  background: var(--tag-bg);
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
}

.post-content ul, .post-content ol {
  margin: 0 0 24px 24px;
  font-size: 17px;
  line-height: 1.85;
}

/* Post tags */
.post-tags {
  max-width: 720px;
  margin: 0 auto 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags a {
  background: var(--tag-bg);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mid);
  transition: var(--transition);
}

.post-tags a:hover {
  background: var(--accent);
  color: white;
}

/* ─── PAGINATION ─── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.pagination a { color: var(--mid); }
.pagination a:hover { background: var(--tag-bg); color: var(--ink); }
.pagination .current {
  background: var(--ink);
  color: var(--paper);
}

/* ─── ARCHIVE/CATEGORY PAGE ─── */
.archive-header {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--light);
  margin-bottom: 32px;
}

.archive-header h1 {
  font-size: 36px;
}

.archive-header p {
  font-size: 16px;
  color: var(--mid);
  margin-top: 8px;
}

/* ─── SEARCH ─── */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(247,245,240,0.97);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.search-overlay.active { display: flex; }

.search-overlay form {
  width: 100%;
  max-width: 640px;
  padding: 0 32px;
}

.search-overlay input[type="search"] {
  width: 100%;
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--ink);
  padding: 16px 0;
  outline: none;
  color: var(--ink);
}

.search-overlay .close-search {
  position: absolute;
  top: 24px; right: 32px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--ink);
}
/* ─── HERO SINGLE ─── */
.hero-single {
  padding-top: 40px;
  padding-bottom: 20px;
  animation: fadeUp 0.8s ease both;
}

.hero-item--main { aspect-ratio: 16/9; }

@media (max-width: 600px) {
  .hero-item--main { aspect-ratio: 4/3; }
}

/* ─── NEWSLETTER INLINE ─── */
.newsletter-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0;
  border-top: 1px solid var(--light);
  border-bottom: 1px solid var(--light);
  margin: 40px 0;
}

.newsletter-inline p {
  font-size: 15px;
  color: var(--mid);
}

.newsletter-inline .btn-newsletter {
  white-space: nowrap;
  text-decoration: none;
}
/* ─── FOOTER ─── */
.site-footer {
  border-top: 1px solid var(--light);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand p {
  font-size: 13px;
  color: var(--mid);
  max-width: 300px;
  line-height: 1.7;
  margin-top: 12px;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--mid);
  padding: 4px 0;
  transition: var(--transition);
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--tag-bg);
  margin-top: 32px;
  font-size: 12px;
  color: var(--light);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; }
  .hero-item--side { aspect-ratio: 16/10; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .explainer-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter-box {
    flex-direction: column;
    text-align: center;
    padding: 40px 32px;
  }
  .nl-text p { max-width: 100%; }
  .nl-form { flex-direction: column; }
  .nl-form input[type="email"] { width: 100%; }
  .single-post-header h1 { font-size: 32px; }
}

@media (max-width: 600px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .hero-grid { padding-top: 24px; }
  .hero-side { flex-direction: column; }
  .article-grid { grid-template-columns: 1fr; }
  .explainer-grid { grid-template-columns: 1fr; }
  .hero-overlay .hero-title { font-size: 24px; }
  .footer-links { gap: 36px; }
  .single-post-header h1 { font-size: 26px; }
}
