/* ════════════════════════════════════════════════════════
   news_style.css – Stile area pubblica News
   Fondazione Pineta di Arenzano
   ════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Serif+4:ital,wght@0,300;0,400;1,300&display=swap');

:root {
  --verde:      #2d5a2d;
  --verde-med:  #3d7a3d;
  --verde-soft: #e8f0e8;
  --sabbia:     #f5f0e8;
  --testo:      #1c2a1c;
  --testo-soft: #4a5a4a;
  --bianco:     #ffffff;
  --bordo:      #d0dcc8;
  --accent:     #8b5e1a;
  --ombra:      rgba(45,90,45,.12);
}

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

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--sabbia);
  color: var(--testo);
  line-height: 1.7;
}

/* ── Header ────────────────────────────────────────────── */
.page-header {
  background: var(--verde);
  color: var(--bianco);
  padding: 3.5rem 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,.06) 0%, transparent 70%);
}
.header-inner { position: relative; max-width: 860px; margin: 0 auto; }
.header-label {
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .7;
  margin-bottom: .6rem;
}
.header-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: .6rem;
}
.header-sub { font-size: .95rem; opacity: .75; font-weight: 300; }

.page-header--slim { padding: 1.4rem 2rem; }
.back-link {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .88rem;
  letter-spacing: .05em;
  transition: color .2s;
}
.back-link:hover { color: var(--bianco); }

/* ── Layout ─────────────────────────────────────────────── */
.main-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.main-container--article {
  max-width: 820px;
}

/* ── Griglia news ────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.news-card {
  background: var(--bianco);
  border: 1px solid var(--bordo);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px var(--ombra);
}
.news-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.news-card--featured .card-image { height: 100%; min-height: 260px; }
.news-card--featured .card-body  { padding: 2.4rem 2.4rem; }

.card-image-link { display: block; flex-shrink: 0; }
.card-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
}
.news-card--featured .card-image { width: 420px; height: auto; }

.card-body { padding: 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card-date {
  font-size: .78rem;
  color: var(--accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .7rem;
  display: block;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: .8rem;
}
.card-title a { color: var(--testo); text-decoration: none; }
.card-title a:hover { color: var(--verde-med); }
.card-excerpt { font-size: .9rem; color: var(--testo-soft); flex: 1; }
.card-link {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--verde);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: .04em;
}
.card-link span { transition: transform .2s; display: inline-block; }
.card-link:hover span { transform: translateX(4px); }

/* ── Articolo dettaglio ──────────────────────────────────── */
.article-hero {
  width: 100%;
  height: 380px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  margin-bottom: 2rem;
}
.article-header { margin-bottom: 1.8rem; }
.article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin-top: .5rem;
}
.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--testo);
}
.article-body p { margin-bottom: 1.2rem; }

/* ── Commenti ────────────────────────────────────────────── */
.comments-section {
  border-top: 2px solid var(--bordo);
  margin-top: 3.5rem;
  padding-top: 2.5rem;
}
.comments-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 1.8rem;
}
.comments-list { margin-bottom: 2.5rem; }
.comment {
  padding: 1.2rem 1.4rem;
  background: var(--verde-soft);
  border-left: 3px solid var(--verde);
  border-radius: 0 4px 4px 0;
  margin-bottom: 1rem;
}
.comment-meta { display: flex; align-items: baseline; gap: 1rem; margin-bottom: .4rem; }
.comment-author { font-size: .92rem; color: var(--verde); }
.comment-date { font-size: .78rem; color: var(--testo-soft); }
.comment-text { font-size: .9rem; }
.no-comments { color: var(--testo-soft); font-size: .9rem; margin-bottom: 2rem; }

/* ── Form commento ───────────────────────────────────────── */
.comment-form-wrap {
  background: var(--bianco);
  border: 1px solid var(--bordo);
  border-radius: 6px;
  padding: 2rem;
  margin-top: 1.5rem;
}
.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 1.4rem;
}
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--testo-soft);
  margin-bottom: .4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: .65rem .9rem;
  border: 1px solid var(--bordo);
  border-radius: 4px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--testo);
  background: var(--sabbia);
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--verde);
}
.btn-submit {
  background: var(--verde);
  color: var(--bianco);
  border: none;
  padding: .75rem 2rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.btn-submit:hover { background: var(--verde-med); }

/* ── Alert ───────────────────────────────────────────────── */
.alert {
  padding: .85rem 1.1rem;
  border-radius: 4px;
  font-size: .9rem;
  margin-bottom: 1.2rem;
}
.alert--ok  { background: #e6f4ea; color: #2e6b3a; border: 1px solid #b7dfc2; }
.alert--err { background: #fdecea; color: #9b2c2c; border: 1px solid #f5c2c0; }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 5rem 2rem; color: var(--testo-soft); }
.empty-icon { font-size: 3rem; opacity: .25; margin-bottom: 1rem; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--verde);
  color: rgba(255,255,255,.65);
  text-align: center;
  padding: 1.4rem;
  font-size: .8rem;
  letter-spacing: .05em;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .news-card--featured { flex-direction: column; }
  .news-card--featured .card-image { width: 100%; height: 220px; }
  .news-card--featured .card-body  { padding: 1.4rem; }
  .article-hero { height: 220px; }
}
