/* ==========================================================================
   Smart Business 360 — Blog listing redesign
   Scoped to body.lp-blog so other pages are unaffected.
   ========================================================================== */

body.lp-blog {
  --lp-navy: #003366;
  --lp-navy-deep: #001a33;
  --lp-ink: #0f172a;
  --lp-muted: #5b6b7c;
  --lp-line: #e6edf4;
  --lp-surface: #f5f8fb;
  --lp-white: #ffffff;
  --lp-radius: 12px;
  --lp-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(0, 51, 102, 0.06);
  --lp-header-h: 72px;
  background: var(--lp-white);
  color: var(--lp-ink);
  overflow-x: hidden;
}

body.lp-blog section {
  padding-left: 0;
  padding-right: 0;
}

body.lp-blog a:focus-visible,
body.lp-blog button:focus-visible,
body.lp-blog input:focus-visible {
  outline: 2px solid var(--lp-navy);
  outline-offset: 3px;
}

.lb-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 2000;
  background: var(--lp-navy);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.lb-skip:focus {
  top: 12px;
}

.lb-wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.lb-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
body.lp-blog > header {
  position: sticky !important;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--lp-header-h);
  padding: 12px 5% !important;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body.lp-blog > header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--lp-line);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.lp-blog .logo-img {
  height: 42px;
}

body.lp-blog .main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

body.lp-blog nav ul {
  gap: 22px;
}

body.lp-blog nav ul li a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}

body.lp-blog nav ul li a.nav-active {
  color: var(--lp-navy);
}

body.lp-blog nav ul li a.nav-active::after {
  bottom: -8px;
  height: 2px;
  background: var(--lp-navy);
}

body.lp-blog .header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

body.lp-blog .header-actions .btn {
  padding: 9px 16px;
  font-size: 0.875rem;
  border-radius: 8px;
}

body.lp-blog .header-actions .btn-primary {
  box-shadow: none;
}

body.lp-blog .header-actions .btn-primary:hover {
  transform: none;
  box-shadow: none;
}

body.lp-blog .header-actions-mobile .btn {
  width: 100%;
  margin-right: 0 !important;
}

body.lp-blog .mobile-menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

@media (max-width: 1200px) {
  body.lp-blog nav ul {
    gap: 14px;
  }

  body.lp-blog nav ul li a {
    font-size: 0.82rem;
  }
}

@media (max-width: 991px) {
  body.lp-blog > header {
    position: sticky !important;
    overflow: visible !important;
    padding: 10px 4% !important;
  }

  body.lp-blog .main-nav {
    display: none;
    justify-content: flex-start;
    max-height: min(80vh, 640px);
    overflow-y: auto;
  }

  body.lp-blog .main-nav.active {
    display: block !important;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.lb-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 40px;
  background:
    radial-gradient(720px 280px at 88% -20%, rgba(0, 80, 153, 0.12), transparent 62%),
    linear-gradient(180deg, #f4f8fb 0%, #ffffff 78%);
}

.lb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 51, 102, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 51, 102, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, #000 20%, transparent 92%);
  pointer-events: none;
}

.lb-hero-inner {
  position: relative;
  max-width: 720px;
}

.lb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lp-navy);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.lb-hero h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.85rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0 0 12px;
  color: var(--lp-ink);
}

.lb-hero p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--lp-muted);
  margin: 0;
  max-width: 38rem;
}

/* --------------------------------------------------------------------------
   Featured
   -------------------------------------------------------------------------- */
.lb-featured-section {
  padding: 12px 0 8px;
}

.lb-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--lp-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--lp-shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.lb-featured:hover {
  transform: translateY(-4px);
  border-color: #c5d4e3;
  color: inherit;
}

.lb-featured-visual {
  min-height: 280px;
  background:
    radial-gradient(420px 220px at 20% 20%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(145deg, #003366 0%, #004c99 100%);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.lb-featured-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

.lb-featured-visual i {
  position: relative;
  z-index: 1;
  font-size: 3.2rem;
  color: rgba(255, 255, 255, 0.92);
}

.lb-featured-body {
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lb-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 51, 102, 0.08);
  color: var(--lp-navy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.lb-featured-body h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 0 0 12px;
}

.lb-featured-body p {
  color: var(--lp-muted);
  line-height: 1.65;
  margin: 0 0 18px;
  font-size: 0.98rem;
}

.lb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 18px;
}

.lb-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lp-navy);
  font-weight: 650;
  font-size: 0.92rem;
}

.lb-featured:hover .lb-read i,
.lb-card:hover .lb-read i {
  transform: translateX(4px);
}

.lb-read i {
  font-size: 0.75rem;
  transition: transform 0.22s ease;
}

/* --------------------------------------------------------------------------
   Toolbar: search + filters
   -------------------------------------------------------------------------- */
.lb-toolbar {
  padding: 28px 0 8px;
}

.lb-toolbar-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lb-search {
  position: relative;
  max-width: 420px;
}

.lb-search i.fa-search {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
  pointer-events: none;
}

.lb-search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--lp-line);
  border-radius: 10px;
  padding: 0 42px 0 40px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--lp-ink);
  background: #fff;
}

.lb-search input::placeholder {
  color: #94a3b8;
}

.lb-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
}

.lb-search-clear[hidden] {
  display: none;
}

.lb-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.lb-filters::-webkit-scrollbar {
  display: none;
}

.lb-filter {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--lp-line);
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lb-filter[aria-pressed="true"] {
  background: var(--lp-navy);
  border-color: var(--lp-navy);
  color: #fff;
}

.lb-count {
  font-size: 0.85rem;
  color: var(--lp-muted);
  margin: 4px 0 0;
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */
.lb-grid-section {
  padding: 20px 0 72px;
}

.lb-grid-section h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}

.lb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.lb-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #fff;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.lb-card:hover {
  transform: translateY(-4px);
  border-color: #c5d4e3;
  box-shadow: var(--lp-shadow);
  color: inherit;
}

.lb-featured-section[hidden],
.lb-empty[hidden],
.lb-card[hidden] {
  display: none !important;
}

.lb-card-visual {
  height: 132px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #003366, #005099);
  position: relative;
  overflow: hidden;
}

.lb-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  transition: transform 0.28s ease;
}

.lb-card:hover .lb-card-visual::after {
  transform: scale(1.08);
}

.lb-card-visual i {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 1.6rem;
}

.lb-card-body {
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lb-card-body h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.lb-card-body p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--lp-muted);
  margin: 0 0 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lb-card .lb-meta {
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   Empty
   -------------------------------------------------------------------------- */
.lb-empty {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--lp-line);
  border-radius: 12px;
  background: var(--lp-surface);
}

.lb-empty[hidden] {
  display: none;
}

.lb-empty h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.lb-empty p {
  color: var(--lp-muted);
  margin: 0 0 18px;
}

.lb-empty-btn {
  appearance: none;
  border: 1px solid var(--lp-navy);
  background: var(--lp-navy);
  color: #fff;
  border-radius: 8px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Topics
   -------------------------------------------------------------------------- */
.lb-topics {
  padding: 0 0 64px;
}

.lb-topics h2 {
  font-size: 1.2rem;
  margin: 0 0 16px;
}

.lb-topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lb-topic {
  appearance: none;
  border: 1px solid var(--lp-line);
  background: #fff;
  color: var(--lp-ink);
  border-radius: 10px;
  padding: 12px 16px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.lb-topic:hover {
  border-color: var(--lp-navy);
  color: var(--lp-navy);
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */
.lb-cta {
  padding: 72px 0;
  background: var(--lp-navy-deep);
  color: #fff;
  text-align: center;
}

.lb-cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: #fff;
}

.lb-cta p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 34rem;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.lb-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lb-btn-light {
  background: #fff;
  color: var(--lp-navy);
  border: 1px solid #fff;
}

.lb-btn-light:hover {
  background: var(--lp-surface);
  color: var(--lp-navy);
  transform: translateY(-1px);
}

.lb-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.lb-btn-ghost:hover {
  border-color: #fff;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
body.lp-blog .footer-clean {
  background: #07111c;
  padding: 72px 5% 28px;
}

body.lp-blog .lb-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  max-width: 1180px;
  margin: 0 auto 48px;
}

body.lp-blog .footer-logo img,
body.lp-blog .footer-logo {
  height: 40px;
  width: auto;
  filter: none;
  max-height: 40px;
}

body.lp-blog .footer-brand p {
  max-width: 280px;
}

.lb-social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.lb-social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #223042;
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
}

.lb-social a:hover {
  color: #fff;
  border-color: #fff;
}

body.lp-blog .footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  text-align: left;
}

/* --------------------------------------------------------------------------
   Layout order
   -------------------------------------------------------------------------- */
.lb-main {
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .lb-featured {
    grid-template-columns: 1fr;
  }

  .lb-featured-visual {
    min-height: 180px;
  }

  .lb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .lb-wrap {
    width: calc(100% - 32px);
  }

  .lb-hero {
    padding: 36px 0 24px;
  }

  .lb-featured-body {
    padding: 24px 20px 22px;
  }

  .lb-search {
    max-width: none;
  }

  /* Mobile: Hero → Search → Categories → Featured → Grid */
  .lb-toolbar {
    order: 1;
  }

  .lb-featured-section {
    order: 2;
  }

  .lb-grid-section {
    order: 3;
  }

  .lb-topics {
    order: 4;
  }

  .lb-cta {
    order: 5;
  }

  body.lp-blog .lb-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .lb-grid {
    grid-template-columns: 1fr;
  }

  .lb-cta-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin-inline: auto;
  }
}

@media (max-width: 480px) {
  .lb-wrap {
    width: calc(100% - 28px);
  }

  body.lp-blog .lb-footer-grid {
    grid-template-columns: 1fr;
  }

  .lb-card-body h3 {
    -webkit-line-clamp: 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.lp-blog *,
  body.lp-blog *::before,
  body.lp-blog *::after {
    animation: none !important;
    transition: none !important;
  }

  .lb-featured:hover,
  .lb-card:hover {
    transform: none;
  }
}
