/* =========================================================
   JESAP Consulting — Blog (page-specific)
   Nav, footer, reset, buttons, .wrap, .fade-up, :root vars
   sono in base.css e NON vanno ridichiarati qui.
   ========================================================= */

/* ===== HERO ===== */
.blog-hero { padding-top: 72px; padding-bottom: 56px; }
.blog-hero-inner { display: flex; flex-direction: column; gap: 16px; }
.blog-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--viola);
}
.blog-eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--viola); }
.blog-h1 {
  font-family: var(--display);
  font-size: clamp(26px, 3.5vw, 48px);
  font-weight: 700; line-height: 0.95; letter-spacing: -0.035em;
  color: var(--nero); margin: 0;
}
.blog-h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--viola); }
.blog-sub {
  font-size: 17px; line-height: 1.55; color: var(--muted);
  max-width: 560px; margin: 0;
}

/* ===== FEATURED ARTICLE ===== */
.featured { padding-bottom: 56px; }
.featured-card {
  background: white;
  border-radius: 22px;
  border: 1px solid rgba(43,46,51,0.06);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  box-shadow: 0 20px 48px -28px rgba(43,46,51,0.22);
  transition: transform .4s cubic-bezier(.34,1.2,.64,1), box-shadow .4s ease;
  text-decoration: none; color: inherit;
}
.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 60px -28px rgba(43,46,51,0.28);
}
@media (max-width: 820px) { .featured-card { grid-template-columns: 1fr; } }
.featured-img { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.featured-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.featured-card:hover .featured-img img { transform: scale(1.04); }
.featured-label {
  position: absolute; top: 14px; left: 14px;
  background: linear-gradient(135deg, var(--viola), var(--viola-scuro));
  color: white; font-size: 8px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
}
.featured-body {
  padding: 35px 32px;
  display: flex; flex-direction: column; gap: 13px; justify-content: center;
}
.featured-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--viola);
}
.featured-title {
  font-family: var(--display);
  font-size: clamp(18px, 1.9vw, 26px);
  font-weight: 700; line-height: 1.12; letter-spacing: -0.02em;
  color: var(--nero); margin: 0;
}
.featured-excerpt {
  font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-author { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.author-avatar {
  width: 29px; height: 29px; border-radius: 50%;
  background: linear-gradient(135deg, var(--viola), var(--viola-scuro));
  color: white; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--display);
}
.author-info { display: flex; flex-direction: column; gap: 1px; }
.author-name { font-size: 10px; font-weight: 600; color: var(--nero); }
.author-role { font-size: 9px; color: var(--muted); }
.featured-read {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; color: var(--viola);
  margin-top: auto;
  transition: gap .2s ease;
}
.featured-card:hover .featured-read { gap: 9px; }
.featured-read svg { width: 10px; height: 10px; }

/* ===== FILTER PILLS ===== */
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.blog-filter {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(43,46,51,0.12);
  background: white;
  font-family: var(--display); font-size: 13px; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  user-select: none;
}
.blog-filter:hover { border-color: var(--viola); color: var(--viola); transform: translateY(-1px); }
.blog-filter.is-active { background: var(--viola); border-color: var(--viola); color: white; }
.blog-filter-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: 0.5;
  transition: opacity 0.2s;
}
.blog-filter.is-active .blog-filter-dot { opacity: 1; background: white; }

/* ===== ARTICLES GRID ===== */
.blog-card.is-hidden { display: none; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid rgba(43,46,51,0.06);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 24px -16px rgba(43,46,51,0.16);
  transition: transform .4s cubic-bezier(.34,1.2,.64,1), box-shadow .4s ease, border-color .3s ease;
  text-decoration: none; color: inherit;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -20px rgba(43,46,51,0.22);
  border-color: rgba(152,60,142,0.2);
}
.blog-card-img { aspect-ratio: 16/9; overflow: hidden; }
.blog-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-body {
  padding: 22px 22px 20px;
  display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.blog-card-title {
  font-family: var(--display);
  font-size: 17px; font-weight: 700; line-height: 1.18; letter-spacing: -0.015em;
  color: var(--nero); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-excerpt {
  font-size: 13px; line-height: 1.55; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid rgba(43,46,51,0.06);
}
.blog-card-author { display: flex; align-items: center; gap: 8px; }
.blog-card-author .author-avatar { width: 28px; height: 28px; font-size: 10px; }
.blog-card-author .author-name { font-size: 12px; font-weight: 600; color: var(--nero); }
.blog-card-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(43,46,51,0.1);
  display: grid; place-items: center;
  color: var(--viola); flex-shrink: 0;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.blog-card:hover .blog-card-arrow {
  background: var(--viola); color: white;
  border-color: var(--viola); transform: rotate(-45deg);
}
.blog-card-arrow svg { width: 12px; height: 12px; }

/* ===== ARTICLE READER OVERLAY ===== */
.reader-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(43,46,51,0.6);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.reader-backdrop.open { opacity: 1; pointer-events: auto; }
.reader-panel {
  position: fixed; inset: 0; z-index: 201;
  background: white;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transform: translateY(22px);
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column;
}
.reader-panel.open { opacity: 1; pointer-events: auto; transform: none; }
.reader-article { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 56px; }
@media (max-width: 600px) { .reader-article { padding: 0 22px; } }
.reader-content { padding: 8px 0 100px; font-size: 16.5px; line-height: 1.78; color: var(--nero); }
.reader-content p { margin: 0 0 16px; color: var(--muted); }
.reader-content strong { color: var(--nero); font-weight: 600; }
.reader-content em { font-style: italic; }
.reader-content h3 {
  font-family: var(--display); font-size: 26px; font-weight: 700;
  letter-spacing: -0.015em; color: var(--viola);
  margin: 46px 0 14px;
}
.reader-content h3:first-child { margin-top: 8px; }

/* magazine layout */
.r-split { display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: center; margin: 32px 0; }
.r-split.r-rev { grid-template-columns: 1fr auto; }
.r-split.r-equal { grid-template-columns: 1fr 1fr; align-items: start; }
.r-textcol p:last-child { margin-bottom: 0; }
.r-figure { margin: 0; }
.r-figure img { width: auto; max-width: 100%; max-height: 200px; height: auto; border-radius: 16px; display: block; margin: 0 auto; box-shadow: 0 20px 44px -24px rgba(43,46,51,0.45); }
.r-callout {
  border: 1.5px solid rgba(152,60,142,0.5);
  background: #fff;
  border-radius: 18px; padding: 24px 26px;
  color: var(--muted); font-size: 15.5px; line-height: 1.62; font-weight: 500;
  box-shadow: 0 0 0 4px rgba(152,60,142,0.07), 0 10px 28px -14px rgba(152,60,142,0.5);
}
.r-callout strong { color: var(--viola); font-weight: 700; }
.r-hover-box {
  background: #fff;
  border: 1.5px solid rgba(152,60,142,0.3);
  border-radius: 16px;
  padding: 20px 22px;
  margin-top: 12px;
  box-shadow: 0 0 0 6px rgba(152,60,142,0.08), 0 8px 28px -10px rgba(152,60,142,0.3);
}
.r-hover-box p { margin: 0 0 12px; }
.r-hover-box p:last-child { margin-bottom: 0; }
.r-techniques-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.r-technique {
  position: relative; overflow: hidden; border-radius: 16px; cursor: default;
  aspect-ratio: 3/4;
  box-shadow: 0 8px 24px -12px rgba(43,46,51,0.3);
  background: rgba(43,46,51,0.06);
}
.r-technique img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.r-technique:hover img { transform: scale(1.05); }
.r-technique-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(120,30,110,0.94) 0%, rgba(152,60,142,0.55) 55%, transparent 100%);
  opacity: 0; transition: opacity .35s ease;
  display: flex; align-items: flex-end; padding: 18px 20px;
}
.r-technique:hover .r-technique-overlay { opacity: 1; }
.r-technique-overlay p { color: white; font-size: 14px; line-height: 1.55; margin: 0; }
.r-technique-overlay strong { font-weight: 700; }
.r-callout-wide {
  max-width: 880px; margin: 36px auto 38px; text-align: center;
  font-size: 16.5px; line-height: 1.7; padding: 30px 46px;
}
.r-final {
  border: 1.5px solid rgba(152,60,142,0.5);
  background: #fff;
  border-radius: 22px; padding: 36px 42px; text-align: center;
  margin: 50px 0 38px;
  box-shadow: 0 0 0 4px rgba(152,60,142,0.07), 0 12px 32px -16px rgba(152,60,142,0.5);
}
.r-final p { color: var(--muted); margin: 0 0 14px; }
.r-final p:last-child { margin-bottom: 0; }
.r-final .r-final-q { font-family: var(--display); font-size: 19px; line-height: 1.55; }
.r-final .q-old { color: var(--viola); font-weight: 600; }
.r-final .q-new { color: var(--viola); font-weight: 700; }
.r-sign { display: flex; flex-direction: column; gap: 3px; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(43,46,51,0.1); }
.r-sign-name { font-weight: 600; color: var(--nero); }
.r-sign-role { font-style: italic; color: var(--muted); font-size: 14px; }

/* Web Scraping article elements */
.r-step-box {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(100,90,140,0.10);
  border: 1px solid rgba(100,90,140,0.18);
  border-radius: 100px;
  padding: 14px 24px; margin: 8px 0;
  font-size: 15px; line-height: 1.55; color: var(--muted);
}
.r-step-box span { flex: 1; }
.r-html-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.r-html-pill {
  border: 1.5px solid rgba(43,46,51,0.2); border-radius: 100px;
  padding: 8px 18px; font-size: 14px; color: var(--nero);
  background: white;
}
.r-html-pill code { font-family: ui-monospace, monospace; color: var(--viola); font-weight: 600; }
.r-4grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; }
.r-4box {
  background: var(--viola-scuro); border-radius: 14px;
  padding: 20px 18px; display: flex; flex-direction: column; gap: 10px;
}
.r-4box strong { color: white; font-weight: 700; font-size: 14.5px; display: block; }
.r-4box p { color: rgba(255,255,255,0.88); font-size: 13px; line-height: 1.5; margin: 0; }
@media (max-width: 700px) { .r-4grid { grid-template-columns: 1fr 1fr; } }

/* Approach boxes (Employer Branding) */
.r-approach { display: flex; border-radius: 12px; overflow: hidden; margin: 10px 0; min-height: 80px; }
.r-approach-accent {
  flex-shrink: 0; width: 52px;
  background: rgba(0,0,0,0.28);
  display: grid; place-items: center;
  font-size: 20px; color: white; font-weight: 300;
}
.r-approach-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.r-approach-body strong { color: white; font-weight: 700; font-size: 15.5px; display: block; }
.r-approach-body p { color: rgba(255,255,255,0.88); font-size: 13.5px; line-height: 1.5; margin: 0; }
.r-approach-1 { background: linear-gradient(to right, var(--viola) 0%, var(--viola-scuro) 100%); }
.r-approach-2 { background: linear-gradient(to right, var(--viola) 0%, var(--viola-scuro) 100%); }
.r-approach-3 { background: linear-gradient(to right, var(--viola) 0%, var(--viola-scuro) 100%); }
.r-approach-4 { background: linear-gradient(to right, var(--viola) 0%, var(--viola-scuro) 100%); }
.r-approach-5 { background: linear-gradient(to right, var(--viola) 0%, var(--viola-scuro) 100%); }
.r-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.r-pros-cons-box {
  background: white; border: 1.5px solid rgba(152,60,142,0.2); border-radius: 18px;
  padding: 24px 26px;
  box-shadow: 0 0 0 4px rgba(152,60,142,0.05), 0 8px 24px -12px rgba(152,60,142,0.25);
}
.r-pros-cons-box p { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0 0 12px; }
.r-pros-cons-box p:last-child { margin-bottom: 0; }
@media (max-width: 700px) { .r-pros-cons { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .r-split, .r-split.r-equal, .r-split.r-rev { grid-template-columns: 1fr; gap: 18px; } }

/* Extended magazine layout */
.r-triple { display: grid; grid-template-columns: 1fr 1.55fr 1fr; gap: 26px; align-items: center; margin: 32px 0; }
.r-2cols  { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 28px 0; }
.r-4boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0; }
.r-callout h4 { font-family: var(--display); color: var(--viola); font-size: 13px; font-weight: 700; margin: 0 0 8px; letter-spacing: .05em; text-transform: uppercase; }
.r-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.r-pill { background: var(--viola); color: #fff; padding: 8px 18px; border-radius: 100px; font-size: 13px; font-weight: 600; }
.r-list { margin: 10px 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 7px; }
.r-list li { color: var(--muted); line-height: 1.6; }
.r-figure-full { margin: 32px 0; }
.r-figure-full img { width: 100%; border-radius: 16px; display: block; box-shadow: 0 20px 44px -24px rgba(43,46,51,.45); }
.r-bigquote { font-family: var(--display); font-size: clamp(19px,2.6vw,26px); font-weight: 700; color: var(--viola); line-height: 1.35; letter-spacing: -.01em; margin: 0; }
@media (max-width:700px) { .r-triple,.r-2cols,.r-4boxes { grid-template-columns:1fr; } }
.r-app-item { display: flex; gap: 22px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid rgba(152,60,142,0.12); }
.r-app-item:last-child { border-bottom: none; }
.r-app-icon { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; background: var(--viola); display: grid; place-items: center; }
.r-app-icon svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.r-app-icon .icon-letter { color: #fff; font-weight: 800; font-size: 20px; font-family: var(--display); }
.r-app-text p { margin: 0; }
.r-h4 { font-family: var(--display); font-weight: 700; color: var(--nero); font-size: 15.5px; margin: 0 0 6px; }
.reader-source {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); margin-top: 24px;
  border-top: 1px solid rgba(43,46,51,0.08); padding-top: 20px;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(43,46,51,0.3);
}
.reader-source:hover { color: var(--viola); }
.reader-img-wrap {
  width: 100%; height: clamp(260px, 44vh, 480px); overflow: hidden; flex-shrink: 0;
  position: relative; background: #e7e2ec;
}
.reader-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.reader-close {
  position: fixed; top: 22px; right: 22px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  font-size: 22px; color: var(--nero); cursor: pointer;
  border: 1px solid rgba(43,46,51,0.08);
  box-shadow: 0 6px 18px -6px rgba(43,46,51,0.3);
  transition: background .2s ease, transform .2s ease;
  z-index: 210;
}
.reader-close:hover { background: white; transform: rotate(90deg); }
.reader-body { padding: 64px 0 8px; display: flex; flex-direction: column; gap: 18px; }
.reader-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--viola);
}
.reader-title {
  font-family: var(--display);
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.02em;
  color: var(--nero); margin: 0;
}
.reader-author { display: flex; align-items: center; gap: 10px; }
.reader-author .author-avatar { width: 40px; height: 40px; font-size: 14px; }

/* override from prototype: keep .q-new weight consistent */
#readerContent :is(h1,h2,h3,h4,h5,h6,p,li,dt,dd,blockquote,figcaption,label,span,a,em,strong,small,td,th,caption) > .q-new { font-weight: 600 !important; }
