/* ============================================================
   LEZIA — Blog
   Tema coerente con il sito + accordion per i prompt
   ============================================================ */

/* ------------------------------------------------------------
   CONTENITORE
   ------------------------------------------------------------ */
.blog-page {
  background: #F7F9FC;
  padding: 0 0 80px;
}

.blog-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.blog-wrap-blog {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

@media (max-width: 640px) {
  .blog-wrap,
  .blog-wrap-blog { padding: 32px 16px 0; }
}

/* ------------------------------------------------------------
   HERO
   ------------------------------------------------------------ */
.blog-list-hero {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid #E3E8F0;
}

.blog-hero-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #2E6FF2;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

.blog-list-hero h1 {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  color: #142850;
  margin: 0 0 16px 0;
}

.blog-list-hero p {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  color: #566072;
  max-width: 56ch;
  margin: 0;
  line-height: 1.6;
}

/* ------------------------------------------------------------
   ARTICOLO IN EVIDENZA (compatto)
   ------------------------------------------------------------ */
.blog-featured-card {
  display: block;
  background: linear-gradient(135deg, #F5F8FF 0%, #EEF2FF 100%);
  border: 1px solid #E0E7FA;
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .2s ease, border-color .15s ease;
}
.blog-featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 40, 80, 0.10);
  border-color: #C9D3E5;
}

.blog-featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8896AE;
  margin-bottom: 10px;
}
.blog-featured-cat { color: #2E6FF2; font-weight: 600; }

.blog-featured-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  color: #142850;
  margin: 0 0 10px 0;
}

.blog-featured-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  color: #566072;
  line-height: 1.55;
  margin: 0 0 12px 0;
  max-width: 70ch;
}

.blog-featured-card .blog-list-more {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #2E6FF2;
}

/* ------------------------------------------------------------
   GRIGLIA 2 COLONNE (altri articoli)
   ------------------------------------------------------------ */
.blog-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.blog-grid-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #E3E8F0;
  border-radius: 14px;
  padding: 26px 28px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .2s ease, border-color .15s ease;
}
.blog-grid-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(20, 40, 80, 0.08);
  border-color: #C9D3E5;
}
.blog-grid-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8896AE;
  margin-bottom: 12px;
}
.blog-grid-cat { color: #2E6FF2; font-weight: 600; }
.blog-grid-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  color: #142850;
  margin: 0 0 10px 0;
}
.blog-grid-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  color: #566072;
  line-height: 1.55;
  margin: 0 0 14px 0;
  flex-grow: 1;
}
.blog-grid-card .blog-list-more {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #2E6FF2;
  margin-top: auto;
}

/* ------------------------------------------------------------
   ARTICOLO: HEADER
   ------------------------------------------------------------ */
.blog-article-back {
  margin-bottom: 28px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
}
.blog-article-back a {
  color: #2E6FF2;
  text-decoration: none;
  font-weight: 600;
}
.blog-article-back a:hover { text-decoration: underline; }

.blog-article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #E3E8F0;
}
.blog-article-header .blog-hero-kicker { margin-bottom: 14px; }
.blog-article-header h1 {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.15;
  color: #142850;
  margin: 0 0 16px 0;
}
.blog-article-subtitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  color: #566072;
  line-height: 1.5;
  margin: 0 0 20px 0;
  max-width: 56ch;
}
.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #8896AE;
}

/* ------------------------------------------------------------
   CORPO ARTICOLO
   ------------------------------------------------------------ */
.blog-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16.5px;
  line-height: 1.75;
  color: #1E2A3C;
}
.blog-body h2,
.blog-body h3,
.blog-body h4 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  color: #142850;
  line-height: 1.25;
  margin: 2.2rem 0 1rem;
}
.blog-body h2 { font-size: 26px; }
.blog-body h3 { font-size: 20px; }
.blog-body h4 { font-size: 17px; }
.blog-body p { margin: 0 0 1.1rem; }
.blog-body ul,
.blog-body ol { margin: 0 0 1.1rem; padding-left: 1.5rem; }
.blog-body li { margin-bottom: .35rem; }
.blog-body strong { color: #142850; font-weight: 700; }
.blog-body a { color: #2E6FF2; text-decoration: underline; font-weight: 500; }
.blog-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #2E6FF2;
  background: #F0F4FF;
  border-radius: 0 10px 10px 0;
  color: #566072;
  font-style: italic;
}
.blog-body code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9em;
  background: #F0F4FF;
  color: #2E6FF2;
  border-radius: 4px;
  padding: 2px 6px;
}

/* Blocchi codice generici */
.blog-body .blog-code {
  background: #142850;
  color: #E7EFFF;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 18px 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.2rem 0;
  border: none;
}
.blog-body .blog-code code {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* Box attenzione */
.blog-body .blog-box-attention {
  background: #FFF4E0;
  border: 1px solid #F2C97D;
  border-left: 4px solid #E2534D;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 1.5rem 0;
  color: #142850;
  font-size: 15px;
  line-height: 1.6;
}
.blog-body .blog-box-attention strong { color: #B23A2E; }

/* ------------------------------------------------------------
   ACCORDION (prompt copiabili)
   ------------------------------------------------------------ */
.blog-accordion {
  background: #fff;
  border: 1px solid #E3E8F0;
  border-left: 3px solid #E3E8F0;
  border-radius: 10px;
  margin: 0 0 12px 0;
  overflow: hidden;
  transition: border-left-color .2s ease, box-shadow .2s ease;
}
.blog-accordion.open {
  border-left-color: #E2534D;
  box-shadow: 0 6px 20px rgba(20, 40, 80, 0.08);
}

.blog-accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 22px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background .15s ease;
}
.blog-accordion-head:hover {
  background: #FAFBFE;
}

.blog-accordion-head-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.blog-accordion-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: #142850;
  line-height: 1.3;
}

.blog-accordion-sub {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: #566072;
}

.blog-accordion-toggle {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 400;
  color: #8896AE;
  flex-shrink: 0;
  line-height: 1;
  width: 24px;
  text-align: center;
  transition: transform .2s ease, color .2s ease;
}
.blog-accordion.open .blog-accordion-toggle {
  transform: rotate(45deg);
  color: #E2534D;
}

.blog-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}

.blog-accordion-inner {
  padding: 4px 22px 22px 22px;
}

.blog-accordion-inner p {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #566072;
  margin: 0 0 14px 0;
}

/* ------------------------------------------------------------
   PROMPT BOX
   ------------------------------------------------------------ */
.blog-prompt-box {
  position: relative;
  background: #142850;
  color: #E7EFFF;
  border-radius: 10px;
  padding: 16px 18px 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 8px;
}

.blog-prompt-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8896AE;
  margin-bottom: 10px;
}

.blog-prompt-text {
  display: block;
  padding-right: 84px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.blog-copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 1px solid #4A5568;
  color: #D7DEE6;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.blog-copy-btn:hover {
  background: #2E3D53;
  border-color: #5A6578;
}
.blog-copy-btn.copied {
  background: #2E9F5C;
  color: #fff;
  border-color: #2E9F5C;
}

/* ------------------------------------------------------------
   TAG
   ------------------------------------------------------------ */
.blog-tags {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid #E3E8F0;
}
.blog-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #2E6FF2;
  background: #F0F4FF;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ------------------------------------------------------------
   FOOTER ARTICOLO
   ------------------------------------------------------------ */
.blog-article-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #E3E8F0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: #566072;
  font-style: italic;
}

/* ------------------------------------------------------------
   CORRELATI
   ------------------------------------------------------------ */
.blog-correlati {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid #E3E8F0;
}
.blog-correlati h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #142850;
  margin: 0 0 20px 0;
}
.blog-correlati-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ------------------------------------------------------------
   CHECKLIST
   ------------------------------------------------------------ */
.blog-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 4px;
}
.blog-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.blog-check-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #2E6FF2;
  border-radius: 5px;
  margin-top: 1px;
  position: relative;
  background: #fff;
  transition: background .15s ease, border-color .15s ease;
}
.blog-check-item.checked .blog-check-box {
  background: #2E9F5C;
  border-color: #2E9F5C;
}
.blog-check-box::after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.blog-check-item.checked .blog-check-box::after { display: block; }
.blog-check-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  color: #566072;
  line-height: 1.5;
}
.blog-check-item.checked .blog-check-text {
  text-decoration: line-through;
  text-decoration-color: rgba(74,85,104,0.4);
}
.blog-status-line {
  margin-top: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: #8896AE;
  min-height: 18px;
}
.blog-status-line.ready { color: #2E9F5C; font-weight: 600; }

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 800px) {
  .blog-grid-2 { grid-template-columns: 1fr; }
  .blog-featured-card { padding: 20px 22px; }
  .blog-featured-title { font-size: 19px; }
  .blog-featured-desc { font-size: 14.5px; }
}

@media (max-width: 640px) {
  .blog-grid-title { font-size: 17px; }
  .blog-article-header h1 { font-size: 26px; }
  .blog-body { font-size: 16px; }
  .blog-body h2 { font-size: 22px; }
  .blog-body h3 { font-size: 18px; }
  .blog-prompt-text { padding-right: 0; padding-top: 32px; }
  .blog-copy-btn { top: 10px; right: 10px; }
}