/* ==========================================================================
   insights.css — Neodustria Insights Page
   Namespace: ins-* (page-specific), .insight-card & .neo-cta (reusable)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ROOT TOKENS
   -------------------------------------------------------------------------- */
:root {
  --ins-bg:       #02050A;
  --ins-blue:     #168BFF;
  --ins-cyan:     #005dba;
  --ins-green:    #00D68F;
  --ins-border:   rgba(22, 139, 255, 0.14);
  --ins-border2:  rgba(22, 139, 255, 0.28);
  --ins-card-bg:  rgba(4, 10, 24, 0.95);
}

/* --------------------------------------------------------------------------
   2. HERO SECTION
   -------------------------------------------------------------------------- */
.ins-hero {
  min-height: 620px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 72% 42%, rgba(22, 139, 255, 0.14), transparent 34%),
    #02050A;
}

.ins-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 52px;
  padding: 175px 0 80px;
  width: 100%;
}

.ins-hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ins-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #005dba;
  text-shadow: 0 0 14px rgba(0,93,186,0.45);
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 20px;
}
.ins-hero-eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: #005dba;
  box-shadow: 0 0 8px rgba(0,93,186,0.65);
  flex-shrink: 0;
}
.ins-hero-eyebrow::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 36px; height: 1px;
  background: linear-gradient(90deg, #005dba, transparent);
}

.ins-hero-h1 {
  font-size: clamp(32px, 3.8vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0;
}

.ins-accent {
  color: var(--ins-blue);
}

.ins-hero-sub {
  font-size: 15.5px;
  line-height: 1.76;
  color: rgba(169, 184, 200, 0.88);
  max-width: 460px;
  margin: 0;
}

.ins-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ins-hero-visual {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: visible;
}

.ins-hero-visual::before {
  content: "";
  position: absolute;
  inset: -12% -8% -18% -18%;
  background: radial-gradient(ellipse at 50% 50%, rgba(22, 139, 255, 0.18), transparent 70%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}

.ins-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #02050A 0%, transparent 35%),
    linear-gradient(180deg, transparent 65%, #02050A 100%);
  opacity: 0.35;
  pointer-events: none;
  z-index: 2;
}

.ins-hero-image {
  width: min(680px, 100%);
  filter: drop-shadow(0 0 42px rgba(22, 139, 255, 0.22));
  transform: translateY(8px);
  position: relative;
  z-index: 1;
  display: block;
}

/* --------------------------------------------------------------------------
   3. SEARCH BAR
   -------------------------------------------------------------------------- */
.ins-search-section {
  background: #02050A;
  padding: 0 0 32px;
}

.ins-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(4, 10, 24, 0.90);
  border: 1px solid rgba(22, 139, 255, 0.22);
  border-radius: 10px;
  padding: 0 20px;
  box-shadow: 0 0 32px rgba(22, 139, 255, 0.08);
}

.ins-search-icon {
  position: absolute;
  left: 20px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 15px;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.ins-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 15px;
  padding: 16px 16px 16px 44px;
  font-family: inherit;
}

.ins-search-input::placeholder {
  color: rgba(255, 255, 255, 0.30);
}

.ins-search-input:focus {
  box-shadow: inset 0 0 0 0 transparent;
  outline: none;
}

.ins-search-bar:focus-within {
  border-color: rgba(22, 139, 255, 0.45);
  box-shadow:
    0 0 32px rgba(22, 139, 255, 0.08),
    0 0 0 1px rgba(22, 139, 255, 0.18) inset;
}

.ins-search-filter-btn {
  width: 40px;
  height: 40px;
  margin-right: 4px;
  background: rgba(22, 139, 255, 0.08);
  border: 1px solid rgba(22, 139, 255, 0.22);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ins-search-filter-btn:hover {
  border-color: var(--ins-cyan);
  color: var(--ins-cyan);
  background: rgba(0,93,186,0.08);
}

/* --------------------------------------------------------------------------
   4. FILTER / PILLS BAR
   -------------------------------------------------------------------------- */
.ins-filter-section {
  background: #02050A;
  padding: 0 0 40px;
}

.ins-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(4, 10, 24, 0.70);
  border: 1px solid rgba(22, 139, 255, 0.14);
  border-radius: 10px;
  padding: 8px 12px;
}

.ins-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ins-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s, box-shadow 0.3s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1;
}

.ins-pill:hover {
  border-color: rgba(22, 139, 255, 0.35);
  color: #ffffff;
  background: rgba(22, 139, 255, 0.06);
}

.ins-pill.active {
  background: rgba(22, 139, 255, 0.12);
  border-color: rgba(22, 139, 255, 0.50);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(22, 139, 255, 0.18);
}

.ins-pill-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.ins-sort-wrap {
  position: relative;
  flex-shrink: 0;
}

.ins-sort-select {
  background: rgba(4, 10, 24, 0.90);
  border: 1px solid rgba(22, 139, 255, 0.22);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  padding: 8px 32px 8px 12px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' viewBox='0 0 10 6'%3E%3Cpath stroke='rgba(255,255,255,0.45)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.3s;
}

.ins-sort-select:hover,
.ins-sort-select:focus {
  border-color: rgba(22, 139, 255, 0.45);
}

/* --------------------------------------------------------------------------
   5. CARDS GRID
   -------------------------------------------------------------------------- */
.ins-grid-section {
  background: #02050A;
  padding-bottom: 60px;
}

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

.ins-no-results {
  display: none;
  text-align: center;
  padding: 80px 20px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   6. INSIGHT CARD — reusable on sub-pages
   -------------------------------------------------------------------------- */
.insight-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ins-card-bg);
  border: 1px solid rgba(22, 139, 255, 0.18);
  border-radius: 12px;
  overflow: hidden;
  transition:
    border-color 0.4s,
    box-shadow 0.4s,
    transform 0.4s;
}

.insight-card:hover {
  border-color: rgba(0,93,186,0.55);
  box-shadow: 0 0 40px rgba(22, 139, 255, 0.18);
  transform: translateY(-4px);
}

/* Media */
.insight-card__media {
  position: relative;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.insight-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.5s, transform 0.5s;
  filter: brightness(0.70) saturate(0.85);
  display: block;
}

.insight-card:hover .insight-card__media img {
  filter: brightness(0.88) saturate(1.05);
  transform: scale(1.04);
}

/* Scanline sweep overlay */
.insight-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    transparent 0%,
    rgba(22, 139, 255, 0.06) 50%,
    transparent 100%
  );
  background-size: 100% 8px;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.insight-card:hover .insight-card__media::after {
  opacity: 1;
  animation: ins-scan 1.8s linear infinite;
}

/* Meta row */
.insight-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 0;
  gap: 8px;
}

.insight-card__category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ins-cyan);
}

.insight-card__date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
}

/* Body */
.insight-card__body {
  padding: 12px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insight-card__title {
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.insight-card__excerpt {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.52);
  margin: 0;
  flex: 1;
}

/* Footer */
.insight-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px 18px;
  margin-top: auto;
}

.insight-card__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--ins-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s;
}

.insight-card__link:hover {
  color: var(--ins-cyan);
}

.insight-card__arrow {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(22, 139, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  transition: all 0.3s;
  flex-shrink: 0;
}

.insight-card:hover .insight-card__arrow {
  border-color: rgba(0,93,186,0.65);
  color: var(--ins-cyan);
  box-shadow: 0 0 12px rgba(22, 139, 255, 0.25);
}

/* Hidden state (used by filter/search JS) */
.insight-card[data-hidden="true"] {
  display: none;
}

/* Scanline keyframe */
@keyframes ins-scan {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

/* --------------------------------------------------------------------------
   7. PAGINATION
   -------------------------------------------------------------------------- */
.ins-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 20px 0 60px;
}

.ins-page-btn {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(4, 10, 24, 0.90);
  border: 1px solid rgba(22, 139, 255, 0.18);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  font-family: inherit;
  padding: 0 6px;
}

.ins-page-btn:hover {
  border-color: rgba(22, 139, 255, 0.55);
  color: #ffffff;
  background: rgba(22, 139, 255, 0.08);
}

.ins-page-btn.active {
  background: rgba(22, 139, 255, 0.16);
  border-color: rgba(22, 139, 255, 0.60);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(22, 139, 255, 0.22);
}

.ins-page-btn[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.ins-page-ellipsis {
  color: rgba(255, 255, 255, 0.30);
  font-size: 13px;
  padding: 0 4px;
}

/* --------------------------------------------------------------------------
   8. NEWSLETTER CTA — REUSABLE (.neo-cta, .neo-cta--newsletter)
   -------------------------------------------------------------------------- */
.neo-cta {
  position: relative;
  overflow: hidden;
  background: var(--ins-card-bg);
  border: 1px solid rgba(22, 139, 255, 0.20);
  border-radius: 16px;
  margin-bottom: 100px;
}

/* Animated border sweep */
.neo-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(22, 139, 255, 0.18),
    transparent
  );
  background-size: 200% 100%;
  animation: neo-cta-sweep 3s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.neo-cta--newsletter .neo-cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 1;
}

.neo-cta__visual {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  border-radius: 14px 0 0 14px;
  align-self: stretch;
}

.neo-cta__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
  display: block;
}

.neo-cta__content {
  padding: 48px 52px;
}

.neo-cta__title {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 10px;
}

.neo-cta__desc {
  font-size: 14px;
  line-height: 1.70;
  color: rgba(255, 255, 255, 0.58);
  margin: 0 0 28px;
  max-width: 440px;
}

.neo-cta__form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.neo-cta__input {
  flex: 1;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(22, 139, 255, 0.25);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-family: inherit;
}

.neo-cta__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.neo-cta__input:focus {
  border-color: rgba(0,93,186,0.75);
  box-shadow: 0 0 0 3px rgba(0,93,186,0.10), 0 0 20px rgba(22, 139, 255, 0.12);
}

.neo-cta__submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--ins-blue);
  border: 1px solid var(--ins-blue);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  white-space: nowrap;
}

.neo-cta__submit:hover {
  background: rgba(22, 139, 255, 0.82);
  box-shadow: 0 0 24px rgba(22, 139, 255, 0.40);
  border-color: rgba(22, 139, 255, 0.82);
}

.neo-cta__privacy {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.32);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* CTA sweep keyframe */
@keyframes neo-cta-sweep {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --------------------------------------------------------------------------
   9. REVEAL ANIMATIONS
   -------------------------------------------------------------------------- */
.ins-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.ins-reveal.ins-visible {
  opacity: 1;
  transform: none;
}

.ins-reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.ins-reveal-left.ins-visible {
  opacity: 1;
  transform: none;
}

.ins-reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.ins-reveal-right.ins-visible {
  opacity: 1;
  transform: none;
}

/* Stagger delays */
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }

/* --------------------------------------------------------------------------
   10. RESPONSIVE
   -------------------------------------------------------------------------- */

/* 1100px — 2-column grid */
@media (max-width: 1100px) {
  .ins-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 900px — hero stacks, filter bar wraps */
@media (max-width: 900px) {
  .ins-hero {
    min-height: unset;
  }

  .ins-hero-inner {
    grid-template-columns: 1fr;
    padding-top: 100px;
    padding-bottom: 60px;
    gap: 40px;
  }

  .ins-hero-visual {
    order: -1;
    min-height: 280px;
    justify-content: center;
  }

  .ins-hero-image {
    width: min(480px, 100%);
  }

  .ins-filter-bar {
    flex-wrap: wrap;
  }

  .ins-sort-wrap {
    width: auto;
  }

  .neo-cta__visual {
    min-height: 160px;
    border-radius: 14px 0 0 14px;
  }
}

/* 640px — single column, stacked CTA */
@media (max-width: 640px) {
  .ins-hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .ins-grid {
    grid-template-columns: 1fr;
  }

  .ins-filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .ins-pills {
    width: 100%;
  }

  .ins-sort-wrap {
    width: 100%;
  }

  .ins-sort-select {
    width: 100%;
  }

  .neo-cta--newsletter .neo-cta-inner {
    grid-template-columns: 1fr;
  }

  .neo-cta__visual {
    min-height: 160px;
    border-radius: 14px 14px 0 0;
    align-self: auto;
  }

  .neo-cta__content {
    padding: 32px 24px;
  }

  .neo-cta__form {
    flex-direction: column;
  }

  .neo-cta__input {
    width: 100%;
  }

  .neo-cta__submit {
    width: 100%;
    justify-content: center;
  }

  .ins-pagination {
    flex-wrap: wrap;
    padding: 16px 0 40px;
  }
}

/* --------------------------------------------------------------------------
   11. WHITE PAPER FEATURE BLOCK
   -------------------------------------------------------------------------- */
#ins-wp-feature {
  display: none;
  padding: 0 0 80px;
}

#ins-wp-feature.active {
  display: block;
}

/* --------------------------------------------------------------------------
   12. FEATURED PILL — White Papers shimmer
   -------------------------------------------------------------------------- */
.ins-pill--featured {
  position: relative;
  overflow: hidden;
  border-color: rgba(22, 139, 255, 0.32) !important;
}

.ins-pill--featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(22, 139, 255, 0.20),
    transparent
  );
  background-size: 200% 100%;
  animation: ins-wp-shimmer 2.8s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}

.ins-pill--featured.active {
  background: rgba(22, 139, 255, 0.16) !important;
  border-color: rgba(22, 139, 255, 0.55) !important;
  color: #ffffff !important;
  box-shadow:
    0 0 20px rgba(22, 139, 255, 0.22),
    0 0 0 1px rgba(22, 139, 255, 0.18) !important;
}

@keyframes ins-wp-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* --------------------------------------------------------------------------
   13. SECTION SEPARATOR
   -------------------------------------------------------------------------- */
.neo-section-separator {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: visible;
}

.neo-section-separator::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(22, 139, 255, 0.22) 20%,
    rgba(0,93,186,0.48) 50%,
    rgba(22, 139, 255, 0.22) 80%,
    transparent 100%
  );
  transform: translateY(-50%);
}

.neo-sep-node {
  position: relative;
  z-index: 2;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ins-cyan);
  box-shadow:
    0 0 0 3px rgba(0,93,186,0.10),
    0 0 14px rgba(0,93,186,0.50);
  animation: neo-sep-pulse-ins 2.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes neo-sep-pulse-ins {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,93,186,0.10), 0 0 14px rgba(0,93,186,0.50); }
  50%       { box-shadow: 0 0 0 5px rgba(0,93,186,0.05), 0 0 26px rgba(0,93,186,0.78); }
}

/* --------------------------------------------------------------------------
   14. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ins-hero-image,
  .ins-reveal,
  .ins-reveal-left,
  .ins-reveal-right,
  .insight-card,
  .insight-card__media img,
  .neo-cta::before,
  .ins-pill--featured::after,
  .neo-sep-node {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
