/* ============================================================
   Agratix — Insights hub + article styles
   ============================================================ */

/* ---------- Hub hero ---------- */
.ins-hero {
  padding: 150px 5% 8px;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}
.ins-hero .ins-eyebrow {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  background: rgba(72, 145, 86, 0.1);
  color: #489156;
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.ins-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.12;
  color: #1a1a1a;
  margin: 0 0 1rem;
}
.ins-hero p { font-size: 1.12rem; line-height: 1.6; color: #4a5568; margin: 0; }
body.dark-theme .ins-hero h1 { color: #f8f9fa; }
body.dark-theme .ins-hero p { color: rgba(226,232,240,.82); }

/* Wrapper gives the fading footer room to breathe */
.ins-wrap { max-width: 1140px; margin: 0 auto; padding: 40px 5% 130px; }

/* ---------- Featured article ---------- */
.ins-featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(28, 55, 101, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  margin-bottom: 40px;
  transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease;
}
.ins-featured:hover { transform: translateY(-4px); box-shadow: 0 26px 54px rgba(15, 23, 42, 0.12); }
.ins-featured-visual {
  position: relative;
  min-height: 280px;
  background: linear-gradient(135deg, #1c3765, #3a5a9a);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ins-featured-visual::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.16), transparent 55%);
}
.ins-featured-visual i { font-size: 4.4rem; color: rgba(255,255,255,.92); position: relative; }
.ins-featured-badge {
  position: absolute; top: 20px; left: 20px; z-index: 2;
  background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
  color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 6px 12px; border-radius: 50px;
}
.ins-featured-body { padding: 40px 40px; display: flex; flex-direction: column; justify-content: center; }
.ins-featured-body .ins-tag { color: #489156; }
.ins-featured-body h2 { font-size: 1.7rem; line-height: 1.2; color: #1c3765; margin: 0 0 14px; }
.ins-featured-body p { font-size: 1.02rem; line-height: 1.6; color: #4a5568; margin: 0 0 20px; }

/* ---------- Article grid ---------- */
.ins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}
.ins-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(28, 55, 101, 0.08);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, border-color .3s ease;
}
.ins-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.10);
  border-color: rgba(72, 145, 86, 0.28);
}
.ins-card-top {
  height: 96px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1c3765, #3a5a9a);
}
.ins-card-top::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 75% 25%, rgba(255,255,255,.16), transparent 55%);
}
.ins-card-top i {
  font-size: 1.5rem; color: #fff; position: relative;
  width: 54px; height: 54px; border-radius: 14px;
  background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s ease;
}
.ins-card:hover .ins-card-top i { transform: scale(1.08) rotate(-4deg); }
.ins-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.ins-tag {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #489156; margin-bottom: 8px;
}
.ins-card h2 { font-size: 1.16rem; line-height: 1.3; color: #1c3765; margin: 0 0 10px; }
.ins-card p { font-size: 0.93rem; line-height: 1.55; color: #4a5568; margin: 0 0 16px; flex: 1; }
.ins-meta { font-size: 0.8rem; color: #94a3b8; display: flex; gap: 12px; }
.ins-readmore { margin-top: 14px; font-weight: 700; color: #489156; font-size: 0.9rem; }

body.dark-theme .ins-card, body.dark-theme .ins-featured { background: #161c2a; border-color: rgba(255,255,255,.08); }
body.dark-theme .ins-card h2, body.dark-theme .ins-featured-body h2 { color: #e2e8f0; }
body.dark-theme .ins-card p, body.dark-theme .ins-featured-body p { color: rgba(226,232,240,.75); }

/* ---------- Newsletter card ---------- */
.ins-news-card {
  background: linear-gradient(150deg, #1c3765 0%, #16213e 100%);
  border-radius: 18px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  border: none;
}
.ins-news-card .ins-news-ico {
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(135deg, #5da86a, #489156);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 16px;
}
.ins-news-card h3 { font-size: 1.2rem; margin: 0 0 8px; }
.ins-news-card p { font-size: .9rem; line-height: 1.5; color: rgba(255,255,255,.78); margin: 0 0 16px; }
.ag-newsletter { display: flex; flex-direction: column; gap: 9px; }
.ag-newsletter input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08); color: #fff; font-size: .92rem; font-family: inherit;
  outline: none; box-sizing: border-box; transition: border-color .2s;
}
.ag-newsletter input::placeholder { color: rgba(255,255,255,.55); }
.ag-newsletter input:focus { border-color: #5da86a; }
.ag-newsletter button {
  padding: 12px 16px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, #5da86a, #489156); color: #fff; font-weight: 700; font-size: .92rem;
  transition: transform .2s;
}
.ag-newsletter button:hover { transform: translateY(-1px); }
.ag-newsletter button:disabled { opacity: .6; }
.ins-news-note { font-size: .72rem; color: rgba(255,255,255,.5); margin: 10px 0 0; }
.ag-news-done { color: #a7e0b2; font-size: .95rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }

/* ---------- Article page ---------- */
.art-wrap { max-width: 760px; margin: 0 auto; padding: 0 5%; }
.art-breadcrumb { max-width: 760px; margin: 0 auto; padding: 152px 5% 0; font-size: 0.85rem; color: #6b7280; }
.art-breadcrumb a { color: #489156; text-decoration: none; font-weight: 600; }
.art-header { padding: 22px 0 26px; }
.art-tag {
  display: inline-block; padding: 0.4rem 1rem; background: rgba(72,145,86,.1); color: #489156;
  border-radius: 50px; font-size: 0.74rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.art-header h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.15; font-weight: 800; color: #1a1a1a; margin: 0 0 0.9rem; }
.art-meta { font-size: 0.88rem; color: #94a3b8; display: flex; gap: 16px; align-items: center; }
.art-body { padding-bottom: 40px; }
.art-body h2 { font-size: 1.5rem; color: #1c3765; margin: 2rem 0 0.8rem; }
.art-body h3 { font-size: 1.2rem; color: #1c3765; margin: 1.6rem 0 0.6rem; }
.art-body p { font-size: 1.08rem; line-height: 1.78; color: #33404f; margin: 0 0 1.3rem; }
.art-body ul, .art-body ol { margin: 0 0 1.4rem 1.3rem; color: #33404f; line-height: 1.78; }
.art-body li { margin-bottom: 0.6rem; font-size: 1.06rem; }
.art-body strong { color: #1a1a1a; }
.art-body blockquote {
  border-left: 4px solid #489156; background: #f7f9fc; border-radius: 0 14px 14px 0;
  padding: 18px 24px; margin: 1.6rem 0; font-size: 1.1rem; color: #23303f; font-style: italic;
}
body.dark-theme .art-header h1 { color: #f8f9fa; }
body.dark-theme .art-body h2, body.dark-theme .art-body h3 { color: #e2e8f0; }
body.dark-theme .art-body p, body.dark-theme .art-body li { color: rgba(226,232,240,.82); }
body.dark-theme .art-body blockquote { background: rgba(255,255,255,.04); color: #e2e8f0; }

/* ---------- Article CTA ---------- */
.art-cta {
  text-align: center; background: linear-gradient(135deg, #1c3765, #16213e);
  border-radius: 22px; padding: 40px 30px; margin: 40px auto 90px; max-width: 760px;
}
.art-cta h2 { color: #fff; font-size: 1.45rem; margin: 0 0 0.6rem; }
.art-cta p { color: rgba(255,255,255,.8); margin: 0 0 1.5rem; }
.art-cta a {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #5da86a, #489156); color: #fff; text-decoration: none;
  font-weight: 700; padding: 14px 28px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(72,145,86,.3); transition: transform .25s ease;
}
.art-cta a:hover { transform: translateY(-2px); }

@media (max-width: 780px) {
  .ins-featured { grid-template-columns: 1fr; }
  .ins-featured-visual { min-height: 170px; }
  .ins-featured-body { padding: 28px 26px; }
}
@media (max-width: 600px) {
  .ins-hero { padding-top: 120px; }
  .art-breadcrumb { padding-top: 124px; }
}

/* ---------- Optional article images (drop-in over the gradient) ----------
   Add  <img src="assets/insights/<slug>.jpg" alt="...">  inside a
   .ins-card-top or .ins-featured-visual and it covers the gradient.
   No image = the gradient + icon shows. Recommended: 1200x630, real
   diagrams/screenshots/illustrations, not generic stock. */
.ins-card-top img,
.ins-featured-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.ins-card-top img + i,
.ins-featured-visual img + i,
.ins-card-top:has(img) i,
.ins-featured-visual:has(img) i { display: none; }
