/* ============================================================
   PUBLICATION STAGES — Centered Premium Layout
   4-column service cards, glassmorphism, academic accents
   ============================================================ */

.pub-stages {
  --ps-navy:       #0c2340;
  --ps-teal:       #1a6b7a;
  --ps-teal-light: #2d8f9e;
  --ps-accent:     #3b82c4;
  --ps-muted:      #5b6b7d;
  --ps-glass:      rgba(255, 255, 255, 0.72);
  position: relative;
  overflow: hidden;
  padding: 3rem 0 0;
  background: linear-gradient(180deg, #fafcfe 0%, #f0f6fa 48%, #f8fafc 100%);
  border-top: 1px solid rgba(12, 35, 64, 0.05);
  border-bottom: 1px solid rgba(12, 35, 64, 0.05);
}

/* ===================== BACKGROUND LAYER ===================== */
.pub-stages__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.pub-stages__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 8% 30%, rgba(26, 107, 122, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 92% 70%, rgba(59, 130, 196, 0.05) 0%, transparent 50%);
}

.pub-stages__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(75px);
  opacity: 0.4;
}
.pub-stages__orb--1 {
  width: 380px; height: 380px;
  top: -120px; left: -70px;
  background: radial-gradient(circle, rgba(45, 143, 158, 0.25) 0%, transparent 70%);
  animation: psOrbDrift1 10s ease-in-out infinite;
}
.pub-stages__orb--2 {
  width: 320px; height: 320px;
  bottom: -90px; right: -50px;
  background: radial-gradient(circle, rgba(59, 130, 196, 0.2) 0%, transparent 70%);
  animation: psOrbDrift2 12s ease-in-out infinite;
}

@keyframes psOrbDrift1 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(20px, 15px); }
}
@keyframes psOrbDrift2 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-15px, -20px); }
}

/* Decorative shapes */
.pub-stages__shape {
  position: absolute;
  pointer-events: none;
}
.pub-stages__shape--ring {
  top: 10%;
  right: 5%;
  width: 140px; height: 140px;
  border: 1.5px solid rgba(26, 107, 122, 0.1);
  border-radius: 50%;
  opacity: 0.6;
}
.pub-stages__shape--dots {
  bottom: 18%;
  left: 3%;
  width: 110px; height: 110px;
  opacity: 0.4;
  background-image: radial-gradient(rgba(26, 107, 122, 0.3) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
}

/* Subtle grid overlay */
.pub-stages__grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(12, 35, 64, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 35, 64, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(0,0,0,0.5) 0%, transparent 75%);
  opacity: 0.5;
}

/* SVG scientific accents */
.pub-stages__svg-accent {
  position: absolute;
  opacity: 0.08;
}
.pub-stages__svg-accent--molecule {
  top: 15%;
  right: 12%;
  width: 140px; height: 140px;
  animation: psSvgPulse 7s ease-in-out infinite;
}
.pub-stages__svg-accent--chart {
  bottom: 12%;
  left: 6%;
  width: 160px; height: 110px;
  animation: psSvgPulse 9s ease-in-out infinite 2s;
}

@keyframes psSvgPulse {
  0%, 100% { opacity: 0.08; transform: scale(1); }
  50%      { opacity: 0.15; transform: scale(1.04); }
}

/* ===================== CONTAINER ===================== */
.pub-stages .container {
  position: relative;
  z-index: 1;
}

/* ===================== CENTERED HEADER ===================== */
.pub-stages__header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 3rem;
}

.pub-stages__label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.95rem;
  margin-bottom: 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ps-teal);
  background: rgba(26, 107, 122, 0.07);
  border: 1px solid rgba(26, 107, 122, 0.18);
  border-radius: 100px;
}
.pub-stages__label i {
  font-size: 0.68rem;
}

.pub-stages__title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ps-navy);
  margin-bottom: 1.15rem;
}

.pub-stages__title-accent {
  position: relative;
  color: var(--ps-teal);
  white-space: nowrap;
}

.pub-stages__title-accent::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 6px;
  background: rgba(26, 107, 122, 0.12);
  border-radius: 3px;
  z-index: -1;
}

.pub-stages__lead {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  line-height: 1.7;
  color: var(--ps-muted);
  max-width: 660px;
  margin: 0 auto 1.5rem;
}

.pub-stages__highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.25rem;
}

.pub-stages__highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--ps-navy);
  background: rgba(26, 107, 122, 0.05);
  border: 1px solid rgba(26, 107, 122, 0.12);
  border-radius: 50px;
}

.pub-stages__highlight i {
  font-size: 0.7rem;
  color: var(--ps-teal);
}

/* Description block (legacy) */
.pub-stages__desc {
   max-width: 760px;
   margin: 0 auto;
}

.pub-stages__desc-heading {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 700;
  color: var(--ps-teal);
  margin-bottom: 0.85rem;
  line-height: 1.3;
}

.pub-stages__desc-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.925rem, 1.12vw, 1.02rem);
  line-height: 1.75;
  color: var(--ps-muted);
  margin: 0;
}

/* ===================== 4-COLUMN CARD GRID ===================== */
.pub-stages__cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

/* Card */
.pub-stages__card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.75rem 1.5rem 1.5rem;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(26, 107, 122, 0.1);
  background:
    linear-gradient(165deg, rgba(255,255,255,0.95) 0%, rgba(240,248,252,0.7) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 4px 24px rgba(12, 35, 64, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition:
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.45s ease;
  text-align: center;
}

/* Top gradient glow on hover */
.pub-stages__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ps-teal-light), var(--ps-accent), var(--ps-teal));
  border-radius: 20px 20px 0 0;
  opacity: 0;
  transition: opacity 0.45s ease;
}

/* Radial glow accent on hover */
.pub-stages__card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(45, 143, 158, 0.1) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.pub-stages__card > * {
  position: relative;
  z-index: 1;
}

.pub-stages__card:hover {
  transform: translateY(-7px);
  border-color: rgba(45, 143, 158, 0.3);
  box-shadow:
    0 0 0 1px rgba(45, 143, 158, 0.1),
    0 0 32px rgba(45, 143, 158, 0.1),
    0 18px 48px rgba(12, 35, 64, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}
.pub-stages__card:hover::before { opacity: 1; }
.pub-stages__card:hover::after  { opacity: 1; }

/* Card icon */
.pub-stages__card-icon {
  width: 58px; height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.25rem;
  color: var(--ps-teal);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(232,244,248,0.9) 100%);
  border: 1px solid rgba(26, 107, 122, 0.12);
  box-shadow:
    0 4px 18px rgba(12, 35, 64, 0.06),
    0 0 0 4px rgba(26, 107, 122, 0.04);
  transition:
    color 0.4s ease,
    background 0.4s ease,
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-radius 0.4s ease;
}

.pub-stages__card:hover .pub-stages__card-icon {
  color: #fff;
  transform: scale(1.08) translateY(-2px);
  background: linear-gradient(135deg, var(--ps-teal-light) 0%, var(--ps-navy) 100%);
  border-color: transparent;
  border-radius: 50%;
  box-shadow:
    0 8px 24px rgba(26, 107, 122, 0.3),
    0 0 0 4px rgba(26, 107, 122, 0.1);
}

/* Card title */
.pub-stages__card-title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ps-navy);
  margin-bottom: 0.55rem;
  line-height: 1.3;
  transition: color 0.3s ease;
}
.pub-stages__card:hover .pub-stages__card-title {
  color: var(--ps-teal);
}

/* Card description */
.pub-stages__card-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--ps-muted);
  margin: 0;
  flex-grow: 1;
}

/* ===================== TRUST CTA BLOCK ===================== */
.pub-stages__trust {
  position: relative;
  padding: 2rem 2rem;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(26, 107, 122, 0.92) 0%, rgba(12, 35, 64, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 8px 40px rgba(12, 35, 64, 0.16),
    0 0 0 1px rgba(45, 143, 158, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pub-stages__trust::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.14) 0%, transparent 55%);
  pointer-events: none;
}

.pub-stages__trust::after {
  content: '';
  position: absolute;
  top: -50%; right: -5%;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.pub-stages__trust-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.pub-stages__trust-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--ps-teal-light);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.pub-stages__trust-content {
  flex: 1;
  min-width: 0;
}

.pub-stages__trust-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.9375rem, 1.2vw, 1.05rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.92);
  margin: 0 0 1.25rem;
}
.pub-stages__trust-text strong {
  color: #fff;
  font-weight: 700;
}

.pub-stages__trust-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ps-navy) !important;
  background: #fff;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pub-stages__trust-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.2);
  color: var(--ps-navy) !important;
}
.pub-stages__trust-btn i {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}
.pub-stages__trust-btn:hover i {
  transform: translateX(3px);
}

/* ===================== SCROLL REVEAL ===================== */
.pub-stages-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.pub-stages-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.pub-stages-reveal[data-delay="1"] { transition-delay: 0.08s; }
.pub-stages-reveal[data-delay="2"] { transition-delay: 0.16s; }
.pub-stages-reveal[data-delay="3"] { transition-delay: 0.24s; }
.pub-stages-reveal[data-delay="4"] { transition-delay: 0.32s; }
.pub-stages-reveal[data-delay="5"] { transition-delay: 0.2s;  }

/* ===================== RESPONSIVE — TABLET ===================== */
@media (max-width: 991.98px) {
  .pub-stages {
    padding: 3.5rem 0 3rem;
  }

  .pub-stages__header {
    margin-bottom: 2rem;
  }

  .pub-stages__cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
  }

  .pub-stages__card {
    padding: 1.75rem 1.4rem 1.6rem;
  }
}

/* ===================== RESPONSIVE — MOBILE ===================== */
@media (max-width: 767.98px) {
  .pub-stages {
    padding: 2.5rem 0 2.5rem;
  }

  .pub-stages__header {
    margin-bottom: 1.75rem;
  }

  .pub-stages__title {
    font-size: 1.55rem;
  }

  .pub-stages__lead {
    font-size: 0.9rem;
    margin-bottom: 1.15rem;
  }

  .pub-stages__highlights {
    gap: 0.45rem 0.65rem;
  }

  .pub-stages__highlight {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }

  .pub-stages__desc-heading {
    font-size: 1.05rem;
  }

  .pub-stages__cards {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .pub-stages__card {
    padding: 1.6rem 1.35rem 1.45rem;
    border-radius: 16px;
  }

  .pub-stages__card-icon {
    width: 50px; height: 50px;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-radius: 14px;
  }

  .pub-stages__trust {
    padding: 1.75rem 1.35rem;
    border-radius: 16px;
  }

  .pub-stages__trust-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .pub-stages__trust-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .pub-stages__shape--ring {
    display: none;
  }

  .pub-stages__svg-accent {
    display: none;
  }
}

/* ===================== TOUCH DEVICES ===================== */
@media (hover: none) and (pointer: coarse) {
  .pub-stages__card:hover {
    transform: none;
  }
  .pub-stages__card:active {
    transform: translateY(-4px);
    border-color: rgba(45, 143, 158, 0.35);
  }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  .pub-stages-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .pub-stages__card,
  .pub-stages__card-icon,
  .pub-stages__trust-btn {
    transition: none;
  }
  .pub-stages__card:hover,
  .pub-stages__card:active {
    transform: none;
  }
  .pub-stages__orb,
  .pub-stages__svg-accent {
    animation: none;
  }
}

/* ============================================================
   STANDALONE INTRO SECTION (reuses pub-stages typography)
   ============================================================ */
.pub-stages__intro {
  --ps-navy:       #0c2340;
  --ps-teal:       #1a6b7a;
  --ps-muted:      #5b6b7d;
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.pub-stages__intro .pub-stages__title {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.pub-stages__intro .pub-stages__lead {
  max-width: 720px;
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .pub-stages__intro {
    padding: 2.5rem 0 2rem;
  }
}

/* ============================================================
   TEAM EXPERTISE INTRO — card with left accent bar
   ============================================================ */
.team-intro {
  padding: 3.5rem 0;
  text-align: center;
  background: linear-gradient(160deg, #0c2340 0%, #162d50 50%, #0f2444 100%);
}

.team-intro__title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: clamp(1.65rem, 3.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 700px;
  margin: 0 auto 1rem;
}

.team-intro__divider {
  width: 56px;
  height: 3.5px;
  background: linear-gradient(90deg, #38b2ac, #6366f1);
  border-radius: 2px;
  margin: 0 auto 1.1rem;
}

.team-intro__text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.75);
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 767.98px) {
  .team-intro {
    padding: 2.5rem 0 2rem;
  }
  .team-intro__title {
    font-size: 1.45rem;
  }
}
