/*
Theme Name: VoltaVerde Child
Theme URI: https://voltaverde.com
Description: Child theme di GeneratePress per VoltaVerde. Palette ambra/verde solare, ottimizzato per AdSense e velocità.
Author: GeM Trading Ltd
Author URI: https://voltaverde.com
Template: generatepress
Version: 1.2.0
License: Proprietario
Text Domain: voltaverde-child
*/

/* ─── Palette VoltaVerde ─────────────────────────────────────────── */
:root {
  --vv-amber:   #F59E0B;
  --vv-amber-d: #D97706;
  --vv-green:   #10B981;
  --vv-navy:    #0D1A30;
  --vv-dark:    #0B1120;
  --vv-light:   #F1F5F9;
  --vv-muted:   #64748B;
  --vv-border:  #E2E8F0;
}

/* ─── Typography ─────────────────────────────────────────────────── */
body {
  font-family: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-display: swap;
  color: #1E293B;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-display: swap;
  font-weight: 400;
  color: var(--vv-navy);
}

h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(22px, 3vw, 30px); margin-top: 1.8em; }
h3 { font-size: clamp(18px, 2.2vw, 22px); margin-top: 1.4em; }

code, pre, .vv-mono {
  font-family: 'DM Mono', 'Courier New', monospace;
  font-display: swap;
}

a {
  color: var(--vv-amber-d);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ─── Buttons CTA ────────────────────────────────────────────────── */
.vv-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--vv-amber), var(--vv-amber-d));
  color: #000;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.vv-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
  text-decoration: none;
  color: #000;
}

/* ─── Box "Dati reali" — il differenziatore E-E-A-T ──────────────── */
.vv-real-data {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(245, 158, 11, 0.04));
  border-left: 4px solid var(--vv-green);
  padding: 18px 22px;
  margin: 24px 0;
  border-radius: 8px;
}
.vv-real-data-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--vv-green);
  margin-bottom: 6px;
}

/* ─── Box "Attenzione" ───────────────────────────────────────────── */
.vv-warning {
  background: rgba(245, 158, 11, 0.06);
  border-left: 4px solid var(--vv-amber);
  padding: 18px 22px;
  margin: 24px 0;
  border-radius: 8px;
}

/* ─── Tabelle leggibili ──────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95em;
}
table th {
  background: var(--vv-navy);
  color: white;
  text-align: left;
  padding: 10px 14px;
}
table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--vv-border);
}
table tr:nth-child(even) { background: #F8FAFC; }

/* ─── Author box E-E-A-T ──────────────────────────────────────────── */
.vv-author-box {
  display: flex;
  gap: 18px;
  align-items: center;
  background: #F8FAFC;
  border: 1px solid var(--vv-border);
  border-radius: 12px;
  padding: 20px;
  margin: 32px 0;
}
.vv-author-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.vv-author-name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
}
.vv-author-credentials {
  font-size: 13px;
  color: var(--vv-muted);
  line-height: 1.5;
}

/* ─── AdSense placeholder rispettoso ─────────────────────────────── */
.adsbygoogle {
  display: block;
  margin: 30px auto;
}

/* ─── Fonti e metodologia calcolatori ───────────────────────────── */
.vv-fonti {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: #f8fdf9;
  border: 1px solid #D4E6DA;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #555;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.vv-fonti summary {
  cursor: pointer;
  font-weight: 600;
  color: #2D6A4F;
  user-select: none;
  list-style: none;
  padding-left: 1.2em;
  position: relative;
}
.vv-fonti summary::before {
  content: '▶';
  position: absolute;
  left: 0;
  font-size: .7em;
  top: .2em;
  transition: transform .15s;
}
.vv-fonti[open] summary::before { transform: rotate(90deg); }
.vv-fonti ul { margin: .6rem 0 .4rem 1.4rem; }
.vv-fonti li { margin-bottom: .25rem; }
.vv-fonti a { color: #2D6A4F; }

/* ─── Mobile responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .vv-author-box { flex-direction: column; text-align: center; }
}
.page .entry-title {
    display: none;
}

/* ─── Logo navbar: badge foglia + testo VoltaVerde ──────────────── */
.main-title a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1B4332 !important;
  text-decoration: none !important;
  line-height: 1;
}
.main-title a:hover {
  color: #2D6A4F !important;
  text-decoration: none !important;
}
/* Badge foglia giallo — foglia SVG estratta dal favicon VoltaVerde */
.main-title a::before {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  min-width: 36px;
  background-color: #F4C430;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 5 C12 8 7 13 7 19 C7 24.5 11 28 16 28 C21 28 25 24.5 25 19 C25 13 20 8 16 5 Z' fill='%2340916C'/%3E%3Cpath d='M16 5 C20 8 25 13 25 19 C25 24.5 21 28 16 28 Z' fill='%232D6A4F'/%3E%3Cline x1='16' y1='27' x2='16' y2='7' stroke='%231B4332' stroke-width='1.6' stroke-linecap='round'/%3E%3Cline x1='16' y1='21' x2='11' y2='17' stroke='%231B4332' stroke-width='1.1' stroke-linecap='round' opacity='.85'/%3E%3Cline x1='16' y1='17' x2='21' y2='13' stroke='%231B4332' stroke-width='1.1' stroke-linecap='round' opacity='.85'/%3E%3Cline x1='16' y1='24' x2='20' y2='21' stroke='%231B4332' stroke-width='1' stroke-linecap='round' opacity='.7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 62%;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Card calcolatori (home + hub) — robuste vs CSS GeneratePress ── */
.vv-calc-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid #D4E6DA;
  border-radius: 14px;
  padding: 20px 18px;
  text-decoration: none;
  color: #1C2B22;
  box-shadow: 0 2px 12px rgba(45,106,79,.07);
  transition: box-shadow .2s, border-color .2s;
}
.vv-calc-card:hover {
  box-shadow: 0 6px 22px rgba(45,106,79,.16);
  border-color: #40916C;
}
.vv-calc-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.vv-calc-card__ico { font-size: 1.6rem; line-height: 1; }
.vv-calc-card__cat {
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #40916C;
}
.vv-calc-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #1B4332;
  margin: 0 0 6px;
  line-height: 1.3;
}
.vv-calc-card__desc {
  font-size: .8rem;
  color: #5A7A6B;
  line-height: 1.5;
  margin: 0 0 12px;
}
.vv-calc-card__results {
  list-style: none !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.vv-calc-card__results li {
  position: relative;
  padding-left: 22px;
  margin: 0;
  font-size: .8rem;
  color: #3D5A4C;
  line-height: 1.4;
  list-style: none !important;
}
.vv-calc-card__results li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  color: #40916C;
  font-weight: 800;
}
.vv-calc-card__btn {
  margin-top: auto;
  align-self: flex-start;
  background: #40916C;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 9px;
}
.vv-calc-card:hover .vv-calc-card__btn { background: #2D6A4F; }
