/* ============================================================
   MOTOZEN — Blog / artykuły (wsparcie SEO)
   Bazuje na zmiennych i klasach z styles.css
   ============================================================ */

/* ---------- Hero ---------- */
.blog-hero {
  position: relative;
  padding: 150px 0 60px;
  overflow: hidden;
}
.blog-hero .bg-photo {
  left: -4%;
  top: -10%;
  width: 60%;
  height: 120%;
  opacity: 0.5;
}
.blog-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.blog-hero h1 {
  font-size: clamp(40px, 5.2vw, 72px);
  margin-top: 20px;
}
.blog-hero .lead {
  margin-top: 22px;
  max-width: 60ch;
}

/* ---------- Search + filter row ---------- */
.blog-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 34px;
}
.blog-search {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}
.blog-search input {
  width: 100%;
  height: 48px;
  border-radius: 100px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 0 18px 0 46px;
  transition: border-color 180ms ease, background 180ms ease;
}
.blog-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.05);
}
.blog-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-cat {
  height: 40px;
  padding: 0 16px;
  border-radius: 100px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
  color: var(--text-dim);
  font-family: var(--font-eyebrow);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 160ms ease;
}
.blog-cat:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.blog-cat.active {
  background: var(--accent);
  color: #0a0b0d;
  border-color: var(--accent);
}

/* ---------- Listing section ---------- */
.blog-section { padding: 60px 0 120px; position: relative; }

/* Featured / lead article */
.blog-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 48px;
  transition: border-color 200ms ease, transform 200ms ease;
}
.blog-featured:hover { border-color: var(--border-2); transform: translateY(-2px); }
.blog-featured-media {
  position: relative;
  min-height: 340px;
  overflow: hidden;
}
.blog-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 600ms ease;
}
.blog-featured:hover .blog-featured-media img { transform: scale(1.04); }
.blog-featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.blog-featured-body h2 {
  font-size: clamp(26px, 2.6vw, 38px);
}
.blog-featured-body p { color: var(--text-dim); line-height: 1.6; }

/* Article grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 220ms ease;
}
.blog-card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: 0 20px 50px -28px rgba(0,0,0,0.8);
}
.blog-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}
.blog-card:hover .blog-card-media img { transform: scale(1.05); }
.blog-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.blog-card-body h3 { line-height: 1.25; }
.blog-card:hover .blog-card-body h3 { color: var(--accent); }
.blog-card-body p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.55;
  flex: 1;
}

/* Tag / category chip */
.blog-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  font-family: var(--font-eyebrow);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding: 5px 10px;
  border: 1px solid rgba(197, 240, 44, 0.25);
  border-radius: 100px;
  background: var(--accent-soft);
}

/* Meta line (date · read time) */
.blog-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}
.blog-meta .sep { opacity: 0.5; }

.blog-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0;
  font-size: 15px;
}
.hidden { display: none !important; }

/* ============================================================
   Article (single post) page
   ============================================================ */
.article-wrap { padding: 130px 0 100px; position: relative; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.5; }

.article-head { max-width: 760px; margin: 0 auto; }
.article-head h1 {
  font-size: clamp(34px, 4.4vw, 60px);
  margin: 18px 0 22px;
}
.article-lead {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--text-dim);
  line-height: 1.6;
}
.article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.article-byline .avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(197,240,44,0.3);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}
.article-byline .dot-sep { opacity: 0.4; }
.article-byline .mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }

.article-cover {
  max-width: 980px;
  margin: 40px auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 8;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Prose */
.prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-dim);
}
.prose > * + * { margin-top: 22px; }
.prose h2 {
  font-size: clamp(24px, 2.4vw, 34px);
  color: var(--text);
  margin-top: 48px;
  scroll-margin-top: 100px;
}
.prose h3 {
  font-size: clamp(19px, 1.8vw, 23px);
  color: var(--text);
  margin-top: 34px;
}
.prose p { text-wrap: pretty; }
.prose strong { color: var(--text); }
.prose a {
  color: var(--accent);
  border-bottom: 1px solid rgba(197,240,44,0.4);
  transition: color 160ms ease;
}
.prose a:hover { color: var(--accent-hot); }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 10px; }
.prose li { padding-left: 4px; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 22px;
  margin-left: 0;
  color: var(--text);
  font-size: 19px;
  font-style: italic;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--accent);
}
.prose img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin: 32px 0;
}
.prose figure { margin: 32px 0; }
.prose figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
}

/* Callout box (key takeaway / tip) */
.callout {
  max-width: 760px;
  margin: 36px auto;
  display: flex;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid rgba(197,240,44,0.25);
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
}
.callout-icon {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: #0a0b0d;
  display: grid; place-items: center;
}
.callout-body { font-size: 15px; line-height: 1.6; color: var(--text); }
.callout-body strong { color: var(--text); }

/* In-article product CTA */
.article-cta {
  max-width: 760px;
  margin: 50px auto;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(197,240,44,0.1), transparent 60%),
    var(--surface);
  padding: 36px;
  text-align: center;
}
.article-cta h3 { font-size: 26px; margin-bottom: 10px; }
.article-cta p { color: var(--text-dim); max-width: 48ch; margin: 0 auto 22px; }

/* Related articles */
.related {
  max-width: 1000px;
  margin: 80px auto 0;
  padding-top: 50px;
  border-top: 1px solid var(--border);
}
.related h2 { font-size: 28px; margin-bottom: 28px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .blog-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-media { min-height: 240px; }
}
@media (max-width: 600px) {
  .blog-grid, .related-grid { grid-template-columns: 1fr; }
  .blog-featured-body { padding: 28px; }
  .blog-hero { padding: 130px 0 40px; }
  .article-wrap { padding: 110px 0 70px; }
  .prose { font-size: 16.5px; }
}
