/* ==========================================================================
   MyPOSgpt — Blog styles (extends style.css)
   ========================================================================== */

/* ---------- Blog Hero ---------- */
.blog-hero {
  position: relative;
  padding: 160px 5vw 80px;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(122, 95, 255, 0.10), transparent 60%),
    radial-gradient(900px 400px at 10% 10%, rgba(0, 194, 255, 0.09), transparent 55%),
    linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%);
  border-bottom: 1px solid var(--line);
}
.blog-hero .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.blog-hero .bh-blob-1 { width: 420px; height: 420px; background: #0B5ED7; top: -140px; right: -80px; }
.blog-hero .bh-blob-2 { width: 320px; height: 320px; background: #7A5FFF; bottom: -140px; left: -80px; opacity: 0.25; }

.blog-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.blog-hero .breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 20px;
}
.blog-hero .breadcrumbs a { color: var(--ink-3); transition: color .2s; }
.blog-hero .breadcrumbs a:hover { color: var(--primary); }
.blog-hero .breadcrumbs i { font-size: 10px; opacity: 0.5; }

.blog-hero h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  margin-bottom: 20px;
}
.blog-hero p.lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-3);
  max-width: 640px;
  margin: 0 auto 32px;
}

/* Search + filter bar */
.blog-toolbar {
  max-width: 900px;
  margin: 40px auto 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.blog-search {
  position: relative;
  flex: 1 1 320px;
  max-width: 480px;
}
.blog-search input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  transition: box-shadow .25s, border-color .25s;
  outline: none;
}
.blog-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 94, 215, 0.12);
}
.blog-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  font-size: 14px;
}
.blog-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.blog-cat {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .25s;
}
.blog-cat:hover { border-color: var(--primary); color: var(--primary); }
.blog-cat.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(11, 94, 215, 0.28);
}

/* ---------- Featured post ---------- */
.blog-featured {
  padding: 80px 5vw 40px;
}
.bf-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.bf-inner::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px 220px at 100% 0%, rgba(0,194,255,0.08), transparent 60%);
  pointer-events: none;
}
.bf-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0B5ED7, #7A5FFF);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 60px;
  order: 2;
}
.bf-media .bf-glyph {
  font-size: 90px;
  opacity: 0.85;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.25));
}
.bf-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(400px 200px at 20% 20%, rgba(255,255,255,0.25), transparent 60%),
    radial-gradient(400px 200px at 80% 80%, rgba(122,95,255,0.35), transparent 60%);
}
.bf-body { position: relative; z-index: 1; }
.bf-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(11, 94, 215, 0.08);
  color: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.bf-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.bf-title a { color: var(--ink); transition: color .2s; }
.bf-title a:hover { color: var(--primary); }
.bf-excerpt {
  color: var(--ink-3);
  font-size: 15.5px;
  margin-bottom: 24px;
  line-height: 1.6;
}
.bf-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13.5px;
  color: var(--ink-3);
  margin-bottom: 28px;
}
.bf-meta .bf-author {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-2);
  font-weight: 600;
}
.bf-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0B5ED7, #00C2FF);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.bf-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); opacity: 0.4; }

/* ---------- Post grid ---------- */
.blog-list {
  padding: 40px 5vw 120px;
}
.bl-inner { max-width: 1200px; margin: 0 auto; }
.bl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.bl-head h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(24px, 2.4vw, 32px);
}
.bl-head .bl-count { color: var(--ink-3); font-size: 14px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .3s;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.pc-media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0B5ED7, #00C2FF);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.pc-media.g-2 { background: linear-gradient(135deg, #5B5BD6, #7A5FFF); }
.pc-media.g-3 { background: linear-gradient(135deg, #00C2FF, #7A5FFF); }
.pc-media.g-4 { background: linear-gradient(135deg, #7A5FFF, #5B5BD6); }
.pc-media.g-5 { background: linear-gradient(135deg, #F59E0B, #D97706); }
.pc-media.g-6 { background: linear-gradient(135deg, #22C55E, #16A34A); }
.pc-media.g-7 { background: linear-gradient(135deg, #EC4899, #DB2777); }
.pc-media.g-8 { background: linear-gradient(135deg, #0EA5E9, #0284C7); }
.pc-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(300px 160px at 20% 25%, rgba(255,255,255,0.22), transparent 60%),
    radial-gradient(300px 160px at 80% 75%, rgba(0,0,0,0.15), transparent 60%);
}
.pc-glyph {
  font-size: 60px;
  opacity: 0.9;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
  position: relative;
  z-index: 1;
}
.pc-cat {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 2;
  padding: 6px 12px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pc-body {
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pc-title {
  font-family: 'Poppins', sans-serif;
  font-size: 19px;
  line-height: 1.28;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pc-title a { color: var(--ink); transition: color .2s; }
.pc-title a:hover { color: var(--primary); }
.pc-excerpt {
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}
.pc-meta .pc-author {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-2);
  font-weight: 600;
}
.pc-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0B5ED7, #00C2FF);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 11px;
}

/* Pagination */
.blog-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 60px;
}
.bp-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.bp-btn:hover { border-color: var(--primary); color: var(--primary); }
.bp-btn.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(11, 94, 215, 0.28);
}
.bp-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- Newsletter CTA ---------- */
.blog-cta {
  padding: 60px 5vw 120px;
}
.bc-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #081B35 0%, #0d2547 60%, #1a3567 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.bc-inner::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(0,194,255,0.30), transparent 60%),
    radial-gradient(500px 260px at 0% 100%, rgba(122,95,255,0.30), transparent 60%);
  pointer-events: none;
}
.bc-body { position: relative; z-index: 1; }
.bc-body h3 {
  font-family: 'Poppins', sans-serif;
  color: #fff;
  font-size: clamp(24px, 2.6vw, 34px);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.bc-body p { color: rgba(255,255,255,0.72); font-size: 15px; }
.bc-form {
  position: relative; z-index: 1;
  display: flex; gap: 10px;
  background: rgba(255,255,255,0.08);
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
}
.bc-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 20px;
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
}
.bc-form input::placeholder { color: rgba(255,255,255,0.5); }
.bc-form button {
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .25s, box-shadow .25s;
}
.bc-form button:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,194,255,0.3); }

/* ==========================================================================
   BLOG POST (single article)
   ========================================================================== */
.post-hero {
  position: relative;
  padding: 150px 5vw 60px;
  background:
    radial-gradient(900px 400px at 90% -10%, rgba(122,95,255,0.09), transparent 60%),
    radial-gradient(800px 400px at 10% 10%, rgba(0,194,255,0.08), transparent 55%),
    linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%);
  border-bottom: 1px solid var(--line);
}
.ph-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.ph-inner .breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 20px;
}
.ph-inner .breadcrumbs a { color: var(--ink-3); transition: color .2s; }
.ph-inner .breadcrumbs a:hover { color: var(--primary); }
.ph-inner .breadcrumbs i { font-size: 10px; opacity: 0.5; }
.ph-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(11, 94, 215, 0.08);
  color: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.ph-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  text-wrap: pretty;
}
.ph-sub {
  color: var(--ink-3);
  font-size: clamp(15px, 1.3vw, 18px);
  max-width: 720px;
  margin: 0 auto 30px;
}
.ph-meta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  color: var(--ink-2);
}
.ph-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); opacity: 0.4; }
.ph-meta .ph-author {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600;
}
.ph-meta .bf-avatar { width: 30px; height: 30px; font-size: 12px; }

/* Cover image */
.post-cover {
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 0 5vw;
}
.post-cover-inner {
  aspect-ratio: 21 / 9;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0B5ED7, #7A5FFF);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.post-cover-inner::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(500px 250px at 20% 25%, rgba(255,255,255,0.20), transparent 60%),
    radial-gradient(500px 250px at 80% 75%, rgba(0,0,0,0.20), transparent 60%);
}
.post-cover-inner .pc-glyph {
  font-size: 120px;
  opacity: 0.9;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.25));
}

/* Article body */
.post-body-wrap {
  padding: 80px 5vw 100px;
  background: #fff;
}
.post-body {
  max-width: 780px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
  font-family: 'Inter', sans-serif;
}
.post-body > * + * { margin-top: 1.25em; }
.post-body p { color: var(--ink-2); }
.post-body h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(24px, 2.4vw, 32px);
  color: var(--ink);
  margin-top: 2em;
  margin-bottom: 0.4em;
  letter-spacing: -0.01em;
}
.post-body h3 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(20px, 1.8vw, 24px);
  color: var(--ink);
  margin-top: 1.6em;
  margin-bottom: 0.3em;
}
.post-body a {
  color: var(--primary);
  border-bottom: 1px solid rgba(11, 94, 215, 0.25);
  transition: border-color .2s;
}
.post-body a:hover { border-bottom-color: var(--primary); }
.post-body strong { color: var(--ink); font-weight: 700; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li { margin: 0.4em 0; }
.post-body li::marker { color: var(--primary); }
.post-body blockquote {
  margin: 2em 0;
  padding: 22px 28px;
  border-left: 4px solid var(--primary);
  background: linear-gradient(90deg, rgba(11, 94, 215, 0.05), transparent);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
  font-size: 18px;
  font-style: italic;
}
.post-body blockquote::before {
  content: "\201C";
  font-family: 'Poppins', serif;
  color: var(--primary);
  font-size: 40px;
  line-height: 0.8;
  vertical-align: -18px;
  margin-right: 4px;
}
.post-body code {
  background: rgba(11, 94, 215, 0.07);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 0.9em;
}
.post-body pre {
  background: #081B35;
  color: #e5edff;
  padding: 22px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.6;
}
.post-body pre code { background: transparent; color: inherit; padding: 0; }
.post-body img,
.post-body figure {
  border-radius: var(--radius);
  overflow: hidden;
}
.post-body figure figcaption {
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  margin-top: 10px;
  font-style: italic;
}
.post-body .callout {
  padding: 22px 26px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(11, 94, 215, 0.05), rgba(0, 194, 255, 0.05));
  border: 1px solid rgba(11, 94, 215, 0.12);
  display: flex; gap: 16px; align-items: flex-start;
}
.post-body .callout i {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.post-body .callout div { color: var(--ink-2); font-size: 15px; }
.post-body .callout strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* Share bar */
.post-share {
  max-width: 780px;
  margin: 60px auto 0;
  padding: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.post-share .ps-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.post-share .ps-icons { display: flex; gap: 8px; }
.post-share .ps-icons a {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(11, 94, 215, 0.06);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .25s;
  cursor: pointer;
}
.post-share .ps-icons a:hover {
  background: var(--grad);
  color: #fff;
  transform: translateY(-3px);
}
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

/* Author card */
.author-card {
  max-width: 780px;
  margin: 40px auto 0;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(11, 94, 215, 0.03), rgba(0, 194, 255, 0.02));
  display: flex;
  gap: 20px;
  align-items: center;
}
.author-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0B5ED7, #00C2FF);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 24px;
  font-family: 'Poppins', sans-serif;
  flex-shrink: 0;
}
.author-info h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  margin-bottom: 4px;
}
.author-info .a-role { color: var(--primary); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.author-info p { color: var(--ink-3); font-size: 14px; line-height: 1.55; }

/* Related posts */
.related-posts {
  padding: 100px 5vw 60px;
  background: linear-gradient(180deg, #F7FAFF 0%, #FFFFFF 100%);
}
.rp-inner { max-width: 1200px; margin: 0 auto; }
.rp-head {
  text-align: center;
  margin-bottom: 40px;
}
.rp-head .eyebrow { margin-bottom: 16px; }
.rp-head h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(26px, 2.8vw, 38px);
  letter-spacing: -0.01em;
}
.rp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .bf-inner { grid-template-columns: 1fr; padding: 28px; }
  .bf-media { order: 1; margin-bottom: 8px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .rp-grid { grid-template-columns: repeat(2, 1fr); }
  .bc-inner { grid-template-columns: 1fr; padding: 40px; text-align: center; }
  .bc-form { justify-content: center; }
}
@media (max-width: 640px) {
  .blog-hero { padding: 130px 5vw 60px; }
  .post-grid { grid-template-columns: 1fr; }
  .rp-grid { grid-template-columns: 1fr; }
  .bc-inner { padding: 32px 24px; }
  .bc-form { flex-direction: column; border-radius: var(--radius); padding: 10px; }
  .bc-form input { text-align: center; }
  .bc-form button { width: 100%; justify-content: center; }
  .post-body { font-size: 16px; }
  .post-share { flex-direction: column; align-items: flex-start; }
  .author-card { flex-direction: column; text-align: center; }
}
