/* ══════════════════════════════════════════════════════════════════════════════
   BLOG ARTICLES - CUSTOM CSS
   ══════════════════════════════════════════════════════════════════════════════
   Design System: Navy #1B2A4A, Teal #0F7173, DM Serif Display, DM Sans, Lora
   Applica stili a: ToC, FAQ, tables, cards, highlight boxes, CTA preventivatore
   ════════════════════════════════════════════════════════════════════════════*/

/* ─── META & LEAD ───────────────────────────────────────────────────────────── */

.lead {
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  color: #2D3748;
  font-weight: 500;
  margin-bottom: 24px;
  max-width: 700px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  color: #718096;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #E2E8F0;
}

.article-meta > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-meta strong {
  color: #2D3748;
  font-weight: 600;
}


/* ─── FEATURED IMAGE ────────────────────────────────────────────────────────── */

.featured-image-wrap {
  margin: 32px 0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #F7FAFC;
}

.featured-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.img-caption {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  color: #718096;
  padding: 12px 16px;
  background-color: #F7FAFC;
  border-top: 1px solid #E2E8F0;
  margin: 0;
}


/* ─── TABLE OF CONTENTS ─────────────────────────────────────────────────────── */

.toc {
  background: linear-gradient(135deg, #F5F7FA 0%, #FAFBFC 100%);
  border-left: 4px solid #0F7173;
  padding: 24px;
  margin: 32px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.toc-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 10px;
}

.toc a {
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  color: #2D3748;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.toc a:hover {
  color: #0F7173;
  border-bottom-color: #0F7173;
}


/* ─── ARTICLE BODY ──────────────────────────────────────────────────────────── */

.article-body {
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  line-height: 1.8;
  color: #2D3748;
}

.article-body h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: #1B2A4A;
  margin-top: 48px;
  margin-bottom: 24px;
  padding-top: 24px;
  border-top: 2px solid #E2E8F0;
}

.article-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.article-body h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: #1B2A4A;
  margin-top: 40px;
  margin-bottom: 20px;
}

.article-body h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  color: #2D3748;
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-body p {
  margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
  margin-bottom: 20px;
  padding-left: 32px;
}

.article-body li {
  margin-bottom: 12px;
  color: #2D3748;
}

.article-body strong {
  color: #1B2A4A;
  font-weight: 600;
}


/* ─── SAVINGS STRIP ────────────────────────────────────────────────────────── */

.savings-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 32px 0;
  padding: 32px;
  background: linear-gradient(135deg, #0F7173 0%, #1B2A4A 100%);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 113, 115, 0.2);
}

.savings-card {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  backdrop-filter: blur(10px);
}

.sc-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #A0AEC0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.sc-price {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.sc-compare {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
}

.sc-save {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #5EEAD4;
}

@media (max-width: 768px) {
  .savings-strip {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}


/* ─── PRICE TABLE ──────────────────────────────────────────────────────────── */

.price-table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
}

.price-table thead {
  background-color: #1B2A4A;
  color: #FFFFFF;
}

.price-table th {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 16px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #0F7173;
}

.price-table tbody tr {
  border-bottom: 1px solid #E2E8F0;
  transition: background-color 0.3s ease;
}

.price-table tbody tr:hover {
  background-color: #F5F7FA;
}

.price-table tbody tr:nth-child(even) {
  background-color: #FAFBFC;
}

.price-table td {
  padding: 14px 16px;
  color: #2D3748;
}

.price-table tfoot {
  background-color: #F5F7FA;
  border-top: 2px solid #E2E8F0;
}

.price-table tfoot td {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  color: #718096;
  padding: 12px 16px;
}

.price-table tfoot a {
  color: #0F7173;
  text-decoration: none;
  font-weight: 600;
}

.price-table tfoot a:hover {
  text-decoration: underline;
}

.save-badge {
  display: inline-block;
  padding: 6px 12px;
  background-color: #E0F4F4;
  color: #0F7173;
  border-radius: 4px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .price-table {
    font-size: 13px;
  }
  
  .price-table th,
  .price-table td {
    padding: 12px 8px;
  }
}


/* ─── HIGHLIGHT BOX (Shortcode [highlight_box]) ────────────────────────────── */

.highlight-box,
[class*="highlight-box"],
.grve-notification {
  margin: 24px 0;
  padding: 20px;
  border-left: 4px solid;
  border-radius: 6px;
  background-color: #F5F7FA;
}

.highlight-box.note,
.highlight-box[type="note"],
.grve-notification.note {
  border-left-color: #0F7173;
  background-color: #E0F4F4;
}

.highlight-box.warn,
.highlight-box[type="warn"],
.grve-notification.warning {
  border-left-color: #EF4444;
  background-color: #FEE2E2;
}

.highlight-box.tip,
.highlight-box[type="tip"],
.grve-notification.success {
  border-left-color: #16A34A;
  background-color: #DCFCE7;
}

.highlight-box-label,
[class*="highlight-box"] strong:first-child,
.grve-notification-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: #1B2A4A;
  display: block;
  margin-bottom: 8px;
}

.highlight-box p {
  margin: 0;
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  color: #2D3748;
  line-height: 1.6;
}


/* ─── CTA PREVENTIVATORE (Shortcode [cta_preventivatore]) ─────────────────── */

.cta-preventivatore,
[class*="cta-preventivatore"],
.grve-cta-box {
  margin: 32px 0;
  padding: 28px;
  background: linear-gradient(135deg, #E0F4F4 0%, #F5F7FA 100%);
  border: 2px solid #0F7173;
  border-radius: 8px;
}

.cta-preventivatore h4,
[class*="cta-preventivatore"] h4,
.grve-cta-box h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: #1B2A4A;
  margin-top: 0;
  margin-bottom: 12px;
}

.cta-preventivatore p,
[class*="cta-preventivatore"] p,
.grve-cta-box p {
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  color: #2D3748;
  margin-bottom: 16px;
  line-height: 1.6;
}

.cta-preventivatore .cta-btn,
.cta-preventivatore a[href*="preventivatore"],
[class*="cta-preventivatore"] a,
.grve-cta-box a {
  display: inline-block;
  padding: 12px 24px;
  background-color: #0F7173;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 6px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #0F7173;
}

.cta-preventivatore a:hover,
[class*="cta-preventivatore"] a:hover,
.grve-cta-box a:hover {
  background-color: #1B2A4A;
  border-color: #1B2A4A;
}

.cta-preventivatore .cta-note,
[class*="cta-preventivatore"] small,
.grve-cta-box small {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  color: #718096;
  display: block;
  margin-top: 12px;
}


/* ─── FAQ LIST ──────────────────────────────────────────────────────────────── */

.faq-list {
  margin: 32px 0;
}

.faq-item {
  margin-bottom: 16px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #FFFFFF;
}

.faq-q {
  width: 100%;
  padding: 20px;
  background-color: #F7FAFC;
  border: none;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  color: #1B2A4A;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.faq-q:hover {
  background-color: #E0F4F4;
  color: #0F7173;
}

.faq-q:focus {
  outline: 2px solid #0F7173;
  outline-offset: -2px;
}

.faq-icon {
  font-size: 20px;
  color: #0F7173;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-q[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-a {
  padding: 20px;
  background-color: #FFFFFF;
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  color: #2D3748;
  line-height: 1.7;
  border-top: 1px solid #E2E8F0;
}

.faq-a p {
  margin: 0;
}

/* Per <details>/<summary> fallback */
details {
  margin-bottom: 16px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #FFFFFF;
}

summary {
  padding: 20px;
  background-color: #F7FAFC;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  color: #1B2A4A;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

summary:hover {
  background-color: #E0F4F4;
  color: #0F7173;
}

details[open] summary {
  background-color: #E0F4F4;
  border-bottom: 1px solid #E2E8F0;
}

details > div {
  padding: 20px;
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  color: #2D3748;
  line-height: 1.7;
  border-top: 1px solid #E2E8F0;
}

/* ─── FAQ ACCORDION - ICONA INLINE A DESTRA ────────────────────────────────── */
 
.faq-q {
  width: 100%;
  padding: 20px;
  background-color: #F7FAFC;
  border: none;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  color: #1B2A4A;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}
 
.faq-q:hover {
  background-color: #E0F4F4;
  color: #0F7173;
}
 
.faq-q:focus {
  outline: 2px solid #0F7173;
  outline-offset: -2px;
}
 
.faq-icon {
  font-size: 20px;
  color: #0F7173;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  margin-left: auto;
}
 
.faq-q[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}
 
/* Per <details>/<summary> fallback */
summary {
  padding: 20px;
  background-color: #F7FAFC;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  color: #1B2A4A;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
 
summary::marker {
  content: '';
}
 
summary::before {
  content: '+';
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  color: #0F7173;
  margin-left: auto;
  transition: transform 0.3s ease;
}
 
details[open] summary::before {
  transform: rotate(45deg);
}
 
summary:hover {
  background-color: #E0F4F4;
  color: #0F7173;
}
 
details[open] summary {
  background-color: #E0F4F4;
  border-bottom: 1px solid #E2E8F0;
}
 
/* ─── RELATED GRID ──────────────────────────────────────────────────────────── */

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.related-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.related-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  border-color: #0F7173;
  transform: translateY(-4px);
}

.rc-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}

.rc-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rc-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #0F7173;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rc-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  color: #1B2A4A;
  line-height: 1.4;
}

.related-card:hover .rc-title {
  color: #0F7173;
}

@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}


/* ─── SOURCES LIST ──────────────────────────────────────────────────────────── */

.sources-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  font-family: 'Lora', Georgia, serif;
  font-size: 14px;
  color: #2D3748;
}

.sources-list li {
  margin-bottom: 12px;
  padding-left: 24px;
  position: relative;
}

.sources-list li:before {
  content: "📚";
  position: absolute;
  left: 0;
}

.sources-list a {
  color: #0F7173;
  text-decoration: none;
  font-weight: 500;
}

.sources-list a:hover {
  text-decoration: underline;
}


/* ─── CTA FINAL ────────────────────────────────────────────────────────────── */

.cta-final {
  background: linear-gradient(135deg, #0F7173 0%, #1B2A4A 100%);
  color: #FFFFFF;
  padding: 40px 32px;
  border-radius: 12px;
  text-align: center;
  margin: 48px 0;
}

.cta-final h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: #FFFFFF;
  margin-top: 0;
  margin-bottom: 16px;
}

.cta-final p {
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  line-height: 1.6;
}

.cta-btn-green,
.cta-final a[href*="preventivatore"] {
  display: inline-block;
  padding: 14px 32px;
  background-color: #FFFFFF;
  color: #0F7173;
  text-decoration: none;
  border-radius: 6px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid #FFFFFF;
  transition: all 0.3s ease;
}

.cta-btn-green:hover,
.cta-final a[href*="preventivatore"]:hover {
  background-color: #0F7173;
  color: #FFFFFF;
  border-color: #0F7173;
}

.cta-sub {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin: 16px 0 0 0;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .cta-final {
    padding: 32px 24px;
  }
  
  .cta-final h3 {
    font-size: 24px;
  }
}


/* ─── CATEGORY TAG (rendilo cliccabile) ────────────────────────────────────── */

.article-category,
.cat-tag,
.post-category,
[rel="category tag"] {
  display: inline-block;
  padding: 6px 12px;
  background-color: #E0F4F4;
  color: #0F7173;
  border-radius: 4px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-transform: capitalize;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.article-category:hover,
.cat-tag:hover,
.post-category:hover,
[rel="category tag"]:hover {
  background-color: #0F7173;
  color: #FFFFFF;
  border-color: #0F7173;
}

/* Se è link dentro article-meta */
.article-meta [rel="category tag"] {
  padding: 4px 10px;
  font-size: 11px;
}


/* ─── BLOCKQUOTE ────────────────────────────────────────────────────────────── */

blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 4px solid #0F7173;
  background-color: #F5F7FA;
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  color: #2D3748;
  font-size: 16px;
  line-height: 1.6;
}

blockquote p {
  margin: 0;
}

blockquote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 14px;
  color: #718096;
}


/* ─── RESPONSIVE ADJUSTMENTS ───────────────────────────────────────────────── */

@media (max-width: 768px) {
  .article-body {
    font-size: 15px;
  }
  
  .article-body h2 {
    font-size: 24px;
    margin-top: 36px;
  }
  
  .article-body h3 {
    font-size: 18px;
    margin-top: 28px;
  }
  
  .toc {
    padding: 16px;
    margin: 24px 0;
  }
  
  .savings-strip {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .lead {
    font-size: 16px;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 12px;
  }
  
  .article-body h2 {
    font-size: 20px;
  }
  
  .article-body h3 {
    font-size: 16px;
  }
  
  .cta-final {
    padding: 24px 16px;
  }
  
  .cta-final h3 {
    font-size: 20px;
  }
}

/* ════════════════════════════════════════════════════════════════════════════*/