/* ======================================================
   WEBEDGE SOLUTIONS - ADVANCED BLOG PAGE
====================================================== */

:root {
  --primary: #0f766e;
  --teal: #14b8a6;
  --blue: #2563eb;
  --purple: #7c3aed;
  --orange: #f97316;
  --dark: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --grad: linear-gradient(135deg, #0f766e, #2563eb 58%, #7c3aed);
  --soft-grad: linear-gradient(135deg, rgba(20,184,166,.12), rgba(37,99,235,.10), rgba(249,115,22,.10));
  --shadow: 0 28px 90px rgba(15, 23, 42, 0.13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: Inter, Segoe UI, sans-serif;
  color: var(--dark);
  background: linear-gradient(180deg, #fff, #f8fafc 50%, #eef6ff);
  overflow-x: hidden;
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }

.container {
  width: min(1240px, 92%);
  margin: auto;
  position: relative;
  z-index: 2;
}

.blog-page {
  position: relative;
  overflow: hidden;
}

.blog-bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(15,118,110,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.055) 1px, transparent 1px);
  background-size: 54px 54px;
  animation: gridMove 20s linear infinite;
}

.blog-light {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(85px);
  opacity: .65;
  pointer-events: none;
  animation: floatOrb 9s ease-in-out infinite;
}

.light-one { width: 350px; height: 350px; left: -130px; top: 120px; background: rgba(20,184,166,.22); }
.light-two { width: 360px; height: 360px; right: -150px; top: 230px; background: rgba(37,99,235,.18); animation-delay: 1.4s; }
.light-three { width: 280px; height: 280px; left: 48%; bottom: -120px; background: rgba(124,58,237,.15); animation-delay: 2.4s; }

/* HERO */
.blog-hero {
  min-height: 100vh;
  padding: 138px 0 82px;
  display: grid;
  align-items: center;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr .95fr;
  gap: 58px;
  align-items: center;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15,118,110,.18);
  color: var(--primary);
  font-weight: 950;
  box-shadow: 0 12px 30px rgba(15,118,110,.08);
}

.hero-copy h1 {
  max-width: 870px;
  margin: 20px 0 22px;
  font-size: clamp(3.05rem, 5.8vw, 6.05rem);
  line-height: .94;
  letter-spacing: -.078em;
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.09rem;
  font-weight: 650;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 950;
  cursor: pointer;
  transition: .32s ease;
}

.btn-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 20px 48px rgba(37,99,235,.25);
}

.btn-light {
  color: var(--dark);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}

.btn:hover { transform: translateY(-5px); }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 690px;
  margin-top: 34px;
}

.hero-metrics article {
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 44px rgba(15,23,42,.07);
  transition: .3s ease;
}

.hero-metrics article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.hero-metrics strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 950;
}

.hero-metrics span {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 850;
}

/* CONSOLE */
.insight-console {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  padding: 24px;
  border-radius: 42px;
  background: #fff;
  border: 1px solid #dbeafe;
  box-shadow: var(--shadow);
  animation: cardFloat 6s ease-in-out infinite;
}

.insight-console::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(20,184,166,.16), transparent 34%),
    radial-gradient(circle at 84% 70%, rgba(124,58,237,.12), transparent 25%);
}

.console-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 950;
}

.console-top span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
}

.console-top span:nth-child(2) { background: #f59e0b; }
.console-top span:nth-child(3) { background: #22c55e; }

.insight-orbit {
  position: relative;
  height: 370px;
  display: grid;
  place-items: center;
}

.orbit-core {
  position: relative;
  z-index: 4;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 44px;
  background: #06111f;
  color: #14b8a6;
  box-shadow: 0 0 90px rgba(20,184,166,.3);
}

.orbit-core i {
  font-size: 1.45rem;
}

.orbit-core strong {
  display: block;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.orbit-core small {
  color: #99f6e4;
  font-weight: 850;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(37,99,235,.32);
  animation: spin 18s linear infinite;
}

.ring-a { width: 260px; height: 260px; }
.ring-b { width: 350px; height: 350px; animation-direction: reverse; }

.orbit-node {
  position: absolute;
  z-index: 5;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 21px;
  color: var(--blue);
  background: #fff;
  box-shadow: 0 18px 42px rgba(15,23,42,.12);
  font-size: 1.5rem;
  animation: floatOrb 5.2s ease-in-out infinite;
}

.n1 { top: 30px; left: 48%; }
.n2 { right: 50px; top: 138px; animation-delay: .2s; }
.n3 { right: 120px; bottom: 34px; animation-delay: .4s; }
.n4 { left: 120px; bottom: 34px; animation-delay: .6s; }
.n5 { left: 50px; top: 138px; animation-delay: .8s; }
.n6 { top: 164px; right: 218px; animation-delay: 1s; }

.console-cards {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.console-cards div {
  display: grid;
  gap: 4px;
  padding: 14px 10px;
  text-align: center;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  color: #334155;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(15,23,42,.07);
}

.console-cards i { color: var(--primary); }
.console-cards span { color: var(--muted); font-size: .78rem; }

.console-tags {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.console-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  font-weight: 850;
  font-size: .82rem;
}

/* STRIP */
.blog-strip {
  position: relative;
  z-index: 2;
  margin-top: -42px;
  padding-bottom: 70px;
}

.strip-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(15,23,42,.08);
}

.strip-card span {
  color: var(--muted);
  font-weight: 900;
}

.strip-card strong {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--soft-grad);
  font-weight: 950;
}

/* SECTIONS */
.section {
  position: relative;
  padding: 94px 0;
}

.section-head {
  max-width: 880px;
  margin: 0 auto 46px;
  text-align: center;
}

.section-head h2 {
  max-width: 860px;
  margin: 14px auto;
  font-size: clamp(2.1rem, 4vw, 3.55rem);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.section-head p {
  max-width: 760px;
  margin: auto;
  color: var(--muted);
  font-weight: 650;
}

/* STATS */
.stats-section {
  padding-top: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card,
.blog-card,
.category-card,
.pick-list a {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 46px rgba(15,23,42,.07);
  transition: .38s ease;
  transform-style: preserve-3d;
}

.stat-card {
  padding: 26px;
  border-radius: 28px;
}

.stat-card::after,
.blog-card::after,
.category-card::after,
.pick-list a::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(20,184,166,.17), transparent 32%),
    var(--soft-grad);
  opacity: 0;
  transition: .35s ease;
}

.stat-card:hover,
.blog-card:hover,
.category-card:hover,
.pick-list a:hover {
  transform: translateY(-10px) rotateX(4deg);
  border-color: rgba(20,184,166,.35);
  box-shadow: var(--shadow);
}

.stat-card:hover::after,
.blog-card:hover::after,
.category-card:hover::after,
.pick-list a:hover::after {
  opacity: 1;
}

.stat-card > *,
.blog-card > *,
.category-card > *,
.pick-list a > * {
  position: relative;
  z-index: 1;
}

.stat-card i,
.category-card i {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 19px;
  color: var(--primary);
  background: var(--soft-grad);
  font-size: 1.35rem;
}

.stat-card strong {
  display: block;
  font-size: 1.85rem;
  font-weight: 950;
}

.stat-card span {
  color: var(--muted);
  font-weight: 850;
}

/* FEATURED */
.featured-section {
  padding-bottom: 40px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 30px;
  align-items: center;
  overflow: hidden;
  position: relative;
  padding: 36px;
  border-radius: 38px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: -45%;
  background: radial-gradient(circle, rgba(37,99,235,.11), transparent 42%);
  animation: bgMove 10s ease-in-out infinite alternate;
}

.featured-card > * { position: relative; }

.featured-content h2 {
  margin: 14px 0;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -.05em;
}

.featured-content p {
  color: var(--muted);
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.featured-meta span {
  padding: 9px 13px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #475569;
  font-weight: 850;
}

.read-featured {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 950;
}

.read-featured i {
  transition: .3s ease;
}

.read-featured:hover i {
  transform: translateX(6px);
}

.browser-card {
  overflow: hidden;
  padding: 16px;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 26px 70px rgba(15,23,42,.23);
  transform: rotate(2deg);
  transition: .4s ease;
}

.featured-card:hover .browser-card {
  transform: rotate(0) translateY(-8px);
}

.browser-bar {
  height: 32px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.browser-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #94a3b8;
}

.browser-content {
  min-height: 250px;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
}

.browser-content span,
.browser-content b,
.browser-content p,
.browser-grid em {
  display: block;
  border-radius: 12px;
  background: #e2e8f0;
}

.browser-content span {
  width: 50%;
  height: 22px;
  background: linear-gradient(90deg, #14b8a6, #2563eb);
}

.browser-content b {
  width: 82%;
  height: 46px;
  margin: 18px 0;
}

.browser-content p {
  height: 14px;
  margin: 10px 0;
}

.browser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 18px;
}

.browser-grid em {
  height: 72px;
  background: #eff6ff;
}

/* ARTICLE FILTERS */
.articles-section {
  background: linear-gradient(135deg, #fff, #f8fbff 55%, #f0fdfa);
}

.blog-tools {
  display: grid;
  gap: 20px;
  margin-bottom: 34px;
}

.search-box {
  max-width: 620px;
  width: 100%;
  margin: auto;
  position: relative;
}

.search-box i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
}

.search-box input {
  width: 100%;
  padding: 17px 18px 17px 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-weight: 700;
  outline: 0;
  box-shadow: 0 14px 36px rgba(15,23,42,.07);
  transition: .3s ease;
}

.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 5px rgba(20,184,166,.12), 0 14px 36px rgba(15,23,42,.07);
}

.blog-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  transition: .3s ease;
  box-shadow: 0 10px 28px rgba(15,23,42,.05);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--grad);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(37,99,235,.2);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  min-height: 345px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: 30px;
}

.blog-card.hide {
  display: none;
}

.blog-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 21px;
  color: #fff;
  background: var(--grad);
  font-size: 1.45rem;
  box-shadow: 0 16px 36px rgba(37,99,235,.18);
  transition: .35s ease;
}

.blog-card:hover .blog-icon {
  transform: rotate(-6deg) scale(1.08);
}

.blog-card span {
  color: var(--blue);
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.blog-card h3 {
  margin: 12px 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.blog-card p {
  color: var(--muted);
  margin-bottom: 18px;
}

.article-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.article-meta small {
  padding: 6px 9px;
  border-radius: 999px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-weight: 800;
}

.blog-card a {
  margin-top: auto;
  color: var(--primary);
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.blog-card a i {
  transition: .3s ease;
}

.blog-card a:hover i {
  transform: translateX(6px);
}

.no-results {
  display: none;
  text-align: center;
  margin-top: 28px;
  color: var(--muted);
  font-weight: 850;
}

/* CATEGORY */
.category-section {
  background: #fff;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.category-card {
  min-height: 250px;
  padding: 28px;
  border-radius: 28px;
}

.category-card h3 {
  margin-bottom: 8px;
}

.category-card p {
  color: var(--muted);
}

/* EDITOR PICKS */
.editor-section {
  background: #06111f;
  color: #fff;
  overflow: hidden;
}

.editor-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20,184,166,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.08) 1px, transparent 1px);
  background-size: 50px 50px;
}

.editor-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.editor-copy h2 {
  margin: 14px 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.editor-copy p {
  color: #cbd5e1;
  margin-bottom: 26px;
  font-weight: 650;
}

.pick-list {
  display: grid;
  gap: 14px;
}

.pick-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.13);
}

.pick-list span {
  color: #5eead4;
  font-weight: 950;
}

.pick-list i {
  color: #5eead4;
  transition: .3s ease;
}

.pick-list a:hover i {
  transform: translateX(6px);
}

/* NEWSLETTER */
.newsletter-section {
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
}

.newsletter-card {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 28px;
  align-items: center;
  overflow: hidden;
  position: relative;
  padding: 42px;
  border-radius: 38px;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 30px 76px rgba(37,99,235,.26);
}

.newsletter-card::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 38%);
  animation: bgMove 10s linear infinite alternate;
}

.newsletter-card > * {
  position: relative;
}

.newsletter-card .section-kicker {
  color: #fff;
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.22);
}

.newsletter-card h2 {
  margin: 12px 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.055em;
}

.newsletter-card p {
  color: #e2e8f0;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  font: inherit;
  font-weight: 700;
}

.newsletter-form button {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  color: var(--primary);
  background: #fff;
  font-weight: 950;
  cursor: pointer;
  transition: .3s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: translateY(-3px);
}

/* REVEAL */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .75s ease, transform .75s ease;
}

.js .reveal {
  opacity: 0;
  transform: translateY(34px);
}

.js .reveal.show {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .22s; }
.delay-3 { transition-delay: .32s; }

/* ANIMATIONS */
@keyframes gridMove { to { background-position: 54px 54px; } }
@keyframes floatOrb { 50% { transform: translateY(-18px) scale(1.04); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cardFloat { 50% { transform: translateY(-12px) rotateX(2deg); } }
@keyframes bgMove { to { transform: translate3d(2%, 2%, 0) scale(1.03); } }

/* RESPONSIVE */
@media (max-width: 1120px) {
  .hero-layout,
  .featured-card,
  .editor-layout,
  .newsletter-card {
    grid-template-columns: 1fr;
  }

  .insight-console {
    max-width: 650px;
    margin: auto;
  }

  .blog-grid,
  .category-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .blog-hero {
    padding: 118px 0 66px;
  }

  .hero-copy h1 {
    font-size: 2.6rem;
  }

  .hero-actions,
  .hero-metrics,
  .console-cards,
  .blog-grid,
  .category-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .insight-console {
    min-height: auto;
  }

  .insight-orbit {
    height: 310px;
  }

  .orbit-node {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .section {
    padding: 72px 0;
  }

  .featured-card,
  .newsletter-card {
    padding: 28px;
  }

  .browser-content {
    min-height: 210px;
  }

  .newsletter-form {
    flex-direction: column;
    border-radius: 24px;
  }

  .newsletter-form button {
    width: 100%;
  }
}
