/**
 * FonePro — Blog Post Detail Page Styles
 * Reading-optimised typography with Lora serif body font.
 * Author : FonePro Dev
 * Date   : 2026-06-07
 */

/* ── Reading progress bar ──────────────────────────────── */
.fp-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #059669);
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Post Hero ─────────────────────────────────────────── */
.fp-post-hero {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #111 55%, #0d1a12 100%);
  padding: 28px 0;
  overflow: hidden;
}
.fp-post-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}
.fp-post-hero-inner {
  position: relative;
  z-index: 2;
}

.fp-breadcrumb-current {
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
  display: inline-block;
  vertical-align: middle;
}

.fp-post-hero-cat {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #10b981;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 12px;
}

.fp-post-hero-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.625rem, 3.8vw, 2.375rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
  max-width: 780px;
}

.fp-post-hero-excerpt {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.75;
  max-width: 680px;
  margin-bottom: 16px;
  font-style: italic;
}

.fp-post-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}
.fp-post-hero-meta i { font-size: 13px; }
.fp-meta-divider { opacity: 0.3; }
.fp-post-hero-cat-link {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}
.fp-post-hero-cat-link:hover { color: #10b981; }

/* ── Featured image ────────────────────────────────────── */
.fp-post-hero-img-wrap {
  background: #f9fafb;
}
.fp-post-hero-img {
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  max-height: 480px;
  background: #e5e7eb;
}
.fp-post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Section override ──────────────────────────────────── */
body .fp-post-page-section {
  padding-top: 40px;
  padding-bottom: 72px;
}

/* ═══════════════════════════════════════════════════════════
   ARTICLE TYPOGRAPHY
   ═══════════════════════════════════════════════════════════ */
.fp-article {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;       /* 18px */
  line-height: 1.9;
  color: #1a1a1a;
  max-width: 680px;          /* optimal ~65 char line length */
}

/* Drop cap on the very first paragraph */
.fp-article > p:first-of-type::first-letter {
  font-family: 'Inter', sans-serif;
  font-size: 4em;
  font-weight: 900;
  line-height: 0.8;
  float: left;
  margin: 4px 10px 0 0;
  color: #10b981;
  letter-spacing: -0.02em;
}

.fp-article p {
  margin: 0 0 1.4em;
}

/* Headings switch back to Inter for contrast */
.fp-article h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.375rem;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 2.5em 0 0.65em;
  padding-left: 14px;
  border-left: 3px solid #10b981;
}
.fp-article h2:first-child { margin-top: 0; }

.fp-article h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: -0.02em;
  margin: 2em 0 0.5em;
}

.fp-article h4 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #374151;
  margin: 1.5em 0 0.4em;
}

/* Lists */
.fp-article ul,
.fp-article ol {
  padding-left: 1.6em;
  margin: 0 0 1.4em;
}
.fp-article li {
  margin-bottom: 0.55em;
  padding-left: 0.2em;
}
.fp-article ul li::marker {
  color: #10b981;
}
.fp-article ol li::marker {
  color: #10b981;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

/* Bold & italic */
.fp-article strong {
  font-weight: 700;
  color: #111;
}
.fp-article em {
  font-style: italic;
  color: #374151;
}

/* Links */
.fp-article a {
  color: #059669;
  text-decoration: underline;
  text-decoration-color: rgba(5,150,105,0.3);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.fp-article a:hover {
  color: #047857;
  text-decoration-color: rgba(4,120,87,0.6);
}

/* Blockquote */
.fp-article blockquote {
  margin: 2em 0;
  padding: 20px 24px 20px 28px;
  border-left: 4px solid #10b981;
  background: rgba(16,185,129,0.04);
  border-radius: 0 14px 14px 0;
  font-style: italic;
  font-size: 1.0625rem;
  color: #374151;
  line-height: 1.8;
  position: relative;
}
.fp-article blockquote::before {
  content: '\201C';
  position: absolute;
  top: -12px;
  left: 20px;
  font-size: 4rem;
  color: #10b981;
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

/* Code */
.fp-article code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.875em;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 2px 6px;
  color: #059669;
}
.fp-article pre {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.5em 0;
}
.fp-article pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.875rem;
}

/* Images */
.fp-article img {
  max-width: 100%;
  border-radius: 12px;
  margin: 0.5em 0 1.25em;
  display: block;
}

/* Horizontal rule */
.fp-article hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2.5em 0;
}

/* ── Share bar ─────────────────────────────────────────── */
.fp-share-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
}
.fp-share-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-right: 4px;
}
.fp-share-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.15s;
}
.fp-share-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.fp-share-x   { background: #000;     color: #fff; }
.fp-share-fb  { background: #1877f2;  color: #fff; }
.fp-share-li  { background: #0a66c2;  color: #fff; }
.fp-share-copy { background: #f3f4f6; color: #374151; }
.fp-share-copy:hover { background: #e5e7eb; opacity: 1; }

/* ── Prev / Next ───────────────────────────────────────── */
.fp-post-nav {
  margin-top: 28px;
}
.fp-post-nav-inner {
  display: flex;
  gap: 12px;
}
.fp-post-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.fp-post-nav-btn:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  color: inherit;
}
.fp-post-nav-next { text-align: right; }
.fp-post-nav-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #10b981;
}
.fp-post-nav-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Related articles ──────────────────────────────────── */
.fp-related {
  margin-top: 44px;
}
.fp-related-heading {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

/* ── Sidebar enhancements ──────────────────────────────── */
.fp-post-sidebar {
  position: sticky;
  top: 24px;
}

/* CTA box styles are in blog.css — shared across all blog pages */
.fp-sidebar-cta-box .fp-sidebar-repair-btn {
  margin-top: 18px;
}

.fp-sidebar-cat-count {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f3f4f6;
  color: #9ca3af;
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: auto;
}
.fp-sidebar-cat-link[aria-current="true"] {
  color: #10b981;
  font-weight: 600;
}
.fp-sidebar-cat-link[aria-current="true"] .fp-sidebar-cat-count {
  background: rgba(16,185,129,0.1);
  color: #10b981;
}

.fp-back-to-blog {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  padding: 10px 4px;
  transition: color 0.15s;
}
.fp-back-to-blog:hover { color: #10b981; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 991px) {
  .fp-post-sidebar {
    position: static;
  }
  .fp-article {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .fp-post-hero { padding: 20px 0; }

  body .fp-post-page-section {
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .fp-article { font-size: 1.0625rem; }

  .fp-article > p:first-of-type::first-letter {
    font-size: 3.2em;
  }

  .fp-article h2 { font-size: 1.25rem; }
  .fp-article h3 { font-size: 1.0625rem; }

  .fp-post-hero-img {
    border-radius: 0;
    max-height: 240px;
  }

  .fp-share-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .fp-post-nav-inner { flex-direction: column; }
  .fp-post-nav-next  { text-align: left; }
}
