/**
 * FonePro — Blog Index Page Styles
 * Author : FonePro Dev
 * Date   : 2026-06-06
 */

/* ── Hero ──────────────────────────────────────────────── */
.fp-blog-hero {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #111 55%, #0d1a12 100%);
  padding: 52px 0 44px;
  overflow: hidden;
}
.fp-blog-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-blog-hero-inner {
  position: relative;
  z-index: 2;
}

.fp-blog-hero h1 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.fp-blog-hero h1 span {
  color: #10b981;
}
.fp-blog-hero-sub {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: 28px;
}

/* Category filter tabs */
.fp-blog-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.fp-blog-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.fp-blog-cat-btn:hover,
.fp-blog-cat-btn.is-active {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

/* ── Featured Post ─────────────────────────────────────── */
.fp-post-featured {
  display: flex;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 40px;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.fp-post-featured:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  color: inherit;
}
.fp-post-featured-img {
  width: 46%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 64px;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}
.fp-post-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.fp-post-featured-body {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fp-post-featured-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #10b981;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fp-post-featured-label span {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 999px;
  padding: 2px 10px;
}
.fp-post-featured-title {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 800;
  color: #111;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 14px;
}
.fp-post-featured-excerpt {
  font-size: 0.9375rem;
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fp-post-featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8125rem;
  color: #9ca3af;
  margin-bottom: 20px;
}
.fp-post-featured-meta i {
  font-size: 13px;
}
.fp-post-read-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #10b981;
  text-decoration: none;
}
.fp-post-read-more:hover {
  color: #059669;
  gap: 10px;
}

/* ── Post List (list view) ─────────────────────────────── */
.fp-post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fp-post-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.fp-post-row:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  color: inherit;
}

.fp-post-row-img {
  width: 200px;
  min-width: 200px;
  min-height: 150px;
  background: #f3f4f6;
  border-right: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  font-size: 36px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.fp-post-row-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.fp-post-row-body {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.fp-post-row-cat {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 999px;
  padding: 2px 10px;
  width: fit-content;
}

.fp-post-row-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}
.fp-post-row:hover .fp-post-row-title { color: #059669; }

.fp-post-row-excerpt {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-post-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}
.fp-post-row-meta i { font-size: 12px; }
.fp-post-row-read {
  font-size: 0.8rem;
  font-weight: 700;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.15s;
}
.fp-post-row:hover .fp-post-row-read { gap: 8px; }

/* ── Sidebar ───────────────────────────────────────────── */
.fp-blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fp-sidebar-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
}
.fp-sidebar-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 16px;
}
.fp-sidebar-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  transition: color 0.15s;
}
.fp-sidebar-cat-link:last-child {
  border-bottom: none;
}
.fp-sidebar-cat-link:hover {
  color: #10b981;
}
.fp-sidebar-cat-link i {
  font-size: 12px;
  color: #d1d5db;
}
.fp-sidebar-cat-link:hover i {
  color: #10b981;
}

/* Dark CTA box — shared across blog index, category & post pages */
.fp-sidebar-cta-box {
  background: linear-gradient(160deg, #0d1a12 0%, #111 100%);
  border-color: rgba(16, 185, 129, 0.2);
}
.fp-sidebar-cta-box .fp-sidebar-heading {
  color: rgba(255, 255, 255, 0.45);
}
.fp-sidebar-cta-icon {
  width: 44px;
  height: 44px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  font-size: 20px;
  margin-bottom: 12px;
}
.fp-sidebar-cta-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
  margin-bottom: 0;
}

.fp-sidebar-repair-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45);
  transition: box-shadow 0.2s, transform 0.15s, background 0.15s;
  margin-top: 16px;
}
.fp-sidebar-repair-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.55);
  transform: translateY(-1px);
  color: #fff;
}

/* Popular topics chips */
.fp-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fp-topic-chip {
  display: inline-block;
  padding: 5px 12px;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: all 0.15s;
}
.fp-topic-chip:hover {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

/* ── Empty state ───────────────────────────────────────── */
.fp-blog-empty {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 64px 32px;
  text-align: center;
}
.fp-blog-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.fp-blog-empty h2 {
  font-size: 1.375rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 10px;
}
.fp-blog-empty p {
  color: #6b7280;
  font-size: 0.9375rem;
  max-width: 420px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

/* Topic teasers in empty state */
.fp-topic-teaser {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-align: left;
  height: 100%;
}
.fp-topic-teaser-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fp-topic-teaser-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}
.fp-topic-teaser-sub {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ── Pagination ────────────────────────────────────────── */
.fp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
}
.fp-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: all 0.15s;
}
.fp-page-btn:hover,
.fp-page-btn.is-active {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.fp-page-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 991px) {
  .fp-post-featured {
    flex-direction: column;
  }
  .fp-post-featured-img {
    width: 100%;
    min-height: 220px;
    font-size: 48px;
  }
  .fp-post-featured-body {
    padding: 24px;
  }
  .fp-post-row-img {
    width: 160px;
    min-width: 160px;
    min-height: 130px;
  }
}
@media (max-width: 600px) {
  .fp-post-row {
    flex-direction: column;
  }
  .fp-post-row-img {
    width: 100%;
    min-width: 100%;
    height: 160px;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
  .fp-post-row-body {
    padding: 16px;
  }
}
@media (max-width: 767px) {
  .fp-blog-hero {
    padding: 36px 0 32px;
  }
  body {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
  }
  html {
    overflow-x: hidden;
  }
  .fp-hamburger {
    display: none !important;
  }
  .fp-bottom-nav {
    display: block;
  }
}
