/* Blog — Abra Robotics */

.blog-hero {
  padding: calc(40px + 72px + 64px) 0 56px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}
.blog-hero .label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.blog-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  letter-spacing: -0.03em;
  max-width: 820px;
  margin-bottom: 16px;
}
.blog-hero-sub {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--gray-600);
  max-width: 680px;
  line-height: 1.65;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 64px 0 80px;
}
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
}

.blog-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.14);
}
.blog-card-media {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--gray-200);
}
.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.blog-card-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
}
.blog-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.blog-card-excerpt {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.55;
  flex: 1;
}
.blog-card-meta {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 4px;
}
.blog-card.coming .blog-card-tag::after {
  content: " · In arrivo";
  color: var(--gray-400);
}

/* Article layout */
.article-wrap {
  padding: calc(40px + 72px + 48px) 0 80px;
}
.article-header {
  max-width: 760px;
  margin-bottom: 40px;
}
.article-header .label { margin-bottom: 12px; }
.article-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 20px;
}
.article-tldr {
  padding: 20px 24px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--gray-700);
}
.article-tldr strong { color: var(--black); }

.article-content {
  max-width: 760px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--gray-700);
}
.article-content h2 {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  margin: 48px 0 16px;
  letter-spacing: -0.02em;
  color: var(--black);
}
.article-content h3 {
  font-size: 1.15rem;
  margin: 32px 0 12px;
  color: var(--black);
}
.article-content p { margin-bottom: 1.1em; }
.article-content ul, .article-content ol {
  margin: 0 0 1.2em 1.2em;
}
.article-content li { margin-bottom: 0.45em; }
.article-content a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 24px 0;
  overflow-x: auto;
  display: block;
}
.article-content th,
.article-content td {
  border: 1px solid var(--gray-200);
  padding: 10px 12px;
  text-align: left;
}
.article-content th {
  background: var(--gray-50);
  font-weight: 700;
}
.article-content pre {
  background: #0a0a0a;
  color: #e8e8e8;
  padding: 18px 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 20px 0;
}
.article-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
}
.article-content pre code {
  background: none;
  padding: 0;
}

.article-faq {
  max-width: 760px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--gray-200);
}
.article-faq h2 { margin-top: 0; }
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 18px 0;
}
.faq-item h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}
.faq-item p {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin: 0;
  line-height: 1.6;
}

.article-cta {
  max-width: 760px;
  margin-top: 56px;
  padding: 32px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius);
}
.article-cta h2 {
  color: var(--white);
  margin: 0 0 12px;
  font-size: 1.4rem;
}
.article-cta p {
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
}
.article-cta .btn {
  border-color: var(--white);
}
.article-cta .btn-outline-light {
  display: inline-block;
  margin-left: 12px;
  padding: 12px 24px;
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: var(--radius);
  color: var(--white);
  background: transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.2s, transform 0.2s;
}
.article-cta .btn-outline-light:hover {
  background: rgba(255,255,255,0.12);
  transform: scale(1.03);
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-bottom: 24px;
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.blog-cat-pill {
  padding: 8px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--gray-600);
  transition: border-color 0.2s, color 0.2s;
}
.blog-cat-pill:hover,
.blog-cat-pill.active {
  border-color: var(--black);
  color: var(--black);
}

.seo-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
@media (max-width: 640px) {
  .seo-score-grid { grid-template-columns: 1fr; }
}
.seo-score-card {
  padding: 20px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
}
.seo-score-card strong {
  display: block;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.seo-score-card span {
  font-size: 0.82rem;
  color: var(--gray-500);
}

.article-references {
  max-width: 760px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
  font-size: 0.88rem;
  color: var(--gray-600);
}
.article-references h2 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--black);
}
.article-references ol {
  margin: 0;
  padding-left: 1.2em;
}
.article-references li {
  margin-bottom: 10px;
  line-height: 1.55;
}
.article-references a {
  word-break: break-word;
}

/* ── Long-form article enhancements ── */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { display: none; }
}
.article-toc {
  position: sticky;
  top: calc(40px + 72px + 24px);
  padding: 20px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
}
.article-toc-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.article-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}
.article-toc li { margin-bottom: 8px; }
.article-toc a {
  color: var(--gray-600);
  text-decoration: none;
}
.article-toc a:hover { color: var(--black); text-decoration: underline; }

.article-lead {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--gray-700);
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--gray-200);
}

.article-content { max-width: none; }

.callout {
  padding: 18px 20px;
  border-radius: var(--radius);
  margin: 28px 0;
  font-size: 0.95rem;
  line-height: 1.65;
  border: 1px solid var(--gray-200);
}
.callout-warning {
  background: #fffbeb;
  border-color: #fcd34d;
}
.callout-warning strong { color: #92400e; }
.callout-tip {
  background: var(--gray-50);
}
.callout-danger {
  background: #fef2f2;
  border-color: #fca5a5;
}
.callout-danger strong { color: #991b1b; }

.step-block {
  counter-reset: step;
  margin: 32px 0;
}
.step-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-200);
}
.step-item:last-child { border-bottom: none; }
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.step-body p:last-child { margin-bottom: 0; }

.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}
@media (max-width: 640px) {
  .figure-grid { grid-template-columns: 1fr; }
}
.figure-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-50);
}
.figure-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
  padding: 12px;
  background: #fff;
}
.figure-card figcaption {
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.45;
  border-top: 1px solid var(--gray-200);
}

.article-cover.hero-wide {
  max-width: none;
  margin-bottom: 48px;
}
.article-cover.hero-wide img {
  max-height: 520px;
  object-fit: cover;
  padding: 0;
}

.spec-table-wrap {
  overflow-x: auto;
  margin: 24px 0 32px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}
.spec-table-wrap table {
  display: table;
  margin: 0;
  font-size: 0.86rem;
}
.spec-table-wrap th { white-space: nowrap; }

.kbd-table td:first-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  white-space: nowrap;
  font-weight: 600;
}

.ip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
@media (max-width: 640px) { .ip-grid { grid-template-columns: 1fr; } }
.ip-card {
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--gray-50);
  font-size: 0.88rem;
}
.ip-card code {
  font-size: 0.95em;
  font-weight: 700;
}
.ip-card span {
  display: block;
  color: var(--gray-500);
  font-size: 0.78rem;
  margin-top: 4px;
}

.article-content h2 {
  scroll-margin-top: calc(40px + 72px + 16px);
  padding-top: 8px;
  border-top: 1px solid var(--gray-200);
  margin-top: 56px;
}
.article-content h2:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.article-cover {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
}
.article-cover img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  display: block;
  padding: 16px;
}
.blog-card-media img {
  object-fit: contain;
  padding: 12px;
  background: var(--gray-50);
}

.article-draft-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #92400e;
  margin-bottom: 12px;
}
