/* =========================================================
   MARVEL — Services page styles
   Extends styles.css (uses same palette + nav + footer)
   ========================================================= */

/* ===========================================================
   SHARED HELPERS (mirrors about.css patterns)
   =========================================================== */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(24, 127, 176, 0.08);
  color: var(--primary-blue);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 20px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.section-tag.center { margin-left: auto; margin-right: auto; }
.section-tag i { font-size: 0.85rem; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.grad-text-light {
  background: linear-gradient(135deg, #ffe5e8 0%, #ffffff 50%, #b8e7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Active nav link (small visual cue) */
.nav-links a.active {
  color: var(--primary-blue);
  font-weight: 700;
}
.nav-links a.active::after { width: 100%; }

/* ===========================================================
   1. HERO — gradient with floating service icons
   =========================================================== */
.services-hero {
  position: relative;
  padding: 100px 0 150px;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
  background: linear-gradient(135deg, #0a2638 0%, #14516e 50%, #187FB0 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.hero-orb-1 {
  top: -100px;
  right: 10%;
  width: 320px;
  height: 320px;
  background: var(--red);
  opacity: 0.22;
  animation: floatY 12s ease-in-out infinite;
}
.hero-orb-2 {
  bottom: -120px;
  left: 5%;
  width: 360px;
  height: 360px;
  background: var(--lighter-blue);
  opacity: 0.3;
  animation: floatY 14s ease-in-out infinite reverse;
}
.hero-orb-3 {
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 280px;
  background: var(--light-blue);
  opacity: 0.18;
  animation: floatY 18s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(15px, -25px); }
}

/* Floating service icons (decorative) */
.floating-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.float-icon {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.3rem;
  opacity: 0.7;
  animation: bobble 6s ease-in-out infinite;
}
.fi-1 { top: 14%;  left: 8%;   animation-delay: 0s;   transform: rotate(-8deg); }
.fi-2 { top: 22%;  right: 10%; animation-delay: 0.8s; transform: rotate(6deg); }
.fi-3 { top: 60%;  left: 12%;  animation-delay: 1.6s; transform: rotate(4deg); }
.fi-4 { top: 70%;  right: 14%; animation-delay: 2.2s; transform: rotate(-6deg); }
.fi-5 { top: 38%;  left: 18%;  animation-delay: 1.2s; transform: rotate(8deg); }
.fi-6 { top: 50%;  right: 6%;  animation-delay: 0.4s; transform: rotate(-4deg); }
@keyframes bobble {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-14px) rotate(var(--r, 0deg)); }
}
/* per-element rotation kept via initial inline transform; bobble uses translateY only */
.float-icon { animation-name: floatBob; }
@keyframes floatBob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

.services-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.services-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 22px;
  color: var(--white);
}
.hero-lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

.hero-stat-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
  position: relative;
  padding: 0 16px;
}
.hero-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.18);
}
.hero-stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--white);
  line-height: 1.1;
}
.hero-stat span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.4px;
}

.hero-wave-bottom {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  width: 100%;
  height: 100px;
  display: block;
  z-index: 1;
}

/* ===========================================================
   2. SERVICES GRID
   =========================================================== */
.services-section {
  padding: 80px 0;
  background: var(--white);
}
.services-section .section-head {
  text-align: center;
  margin-bottom: 56px;
}
.services-section .section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  color: var(--dark-text);
}
.services-section .section-head p {
  color: var(--light-gray);
  font-size: 1.02rem;
  max-width: 620px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--white);
  border-radius: 20px;
  padding: 32px 28px 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(34, 40, 49, 0.06);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  opacity: 0;
  transform: translateY(30px);
  display: flex;
  flex-direction: column;
}
.service-card.revealed {
  opacity: 1;
  transform: translateY(0);
}
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.12s; }
.service-card:nth-child(3) { transition-delay: 0.20s; }
.service-card:nth-child(4) { transition-delay: 0.28s; }
.service-card:nth-child(5) { transition-delay: 0.36s; }
.service-card:nth-child(6) { transition-delay: 0.44s; }

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.service-card.accent-red::before { background: var(--red); opacity: 0.85; }
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(24, 127, 176, 0.2);
}
.service-card:hover::before { opacity: 1; }
.service-card.accent-red:hover { border-color: rgba(227, 6, 19, 0.2); }

/* Featured card — extra emphasis */
.service-card.featured {
  background: linear-gradient(160deg, #0a2638 0%, #14516e 100%);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.service-card.featured::before {
  background: var(--red);
  opacity: 1;
  height: 5px;
}
.service-card.featured::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 240px;
  height: 240px;
  background: var(--red);
  opacity: 0.18;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.service-card.featured:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 50px rgba(10, 38, 56, 0.4);
}

.card-ribbon {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(227, 6, 19, 0.4);
}
.card-ribbon i { font-size: 0.65rem; }

.card-icon {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: rgba(24, 127, 176, 0.08);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
  position: relative;
  z-index: 1;
}
.service-card:hover .card-icon {
  background: var(--grad);
  color: var(--white);
  transform: scale(1.05) rotate(-6deg);
}
.service-card.accent-red .card-icon {
  background: rgba(227, 6, 19, 0.08);
  color: var(--red);
}
.service-card.accent-red:hover .card-icon {
  background: var(--red);
  color: var(--white);
}
.service-card.featured .card-icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.service-card.featured:hover .card-icon {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.05) rotate(-6deg);
}

.card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-blue);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.service-card.accent-red .card-tag { color: var(--red); }
.service-card.featured .card-tag { color: var(--lighter-blue); }

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark-text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}
.service-card.featured h3 { color: var(--white); }

.service-card > .card-body > p,
.service-card .card-body p:not(.card-tag) {
  color: var(--light-gray);
  font-size: 0.94rem;
  line-height: 1.65;
  margin-bottom: 18px;
}
.service-card.featured p { color: rgba(255, 255, 255, 0.78); }

.card-features {
  list-style: none;
  margin-bottom: 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--dark-text);
  line-height: 1.5;
}
.service-card.featured .card-features li {
  color: rgba(255, 255, 255, 0.9);
}
.card-features li i {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(24, 127, 176, 0.12);
  color: var(--primary-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  margin-top: 2px;
}
.service-card.accent-red .card-features li i {
  background: rgba(227, 6, 19, 0.12);
  color: var(--red);
}
.service-card.featured .card-features li i {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-decoration: none;
  margin-top: auto;
  padding-top: 6px;
  transition: gap 0.25s ease, color 0.25s ease;
  align-self: flex-start;
}
.card-link i { transition: transform 0.25s ease; font-size: 0.85rem; }
.card-link:hover {
  gap: 12px;
  color: var(--light-blue);
}
.card-link:hover i { transform: translateX(3px); }

.service-card.accent-red .card-link { color: var(--red); }
.service-card.accent-red .card-link:hover { color: var(--dark-red); }
.service-card.featured .card-link { color: var(--white); }
.service-card.featured .card-link:hover { color: var(--lighter-blue); }

/* ===========================================================
   3. WHY STRIP — visual bridge before "How it works"
   =========================================================== */
.why-strip {
  padding: 50px 0 70px;
  background: linear-gradient(180deg, var(--white) 0%, rgba(31, 158, 216, 0.05) 100%);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-item {
  background: var(--white);
  padding: 26px 22px;
  border-radius: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(34, 40, 49, 0.06);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.why-item.revealed { opacity: 1; transform: translateY(0); }
.why-item:nth-child(1) { transition-delay: 0.05s; }
.why-item:nth-child(2) { transition-delay: 0.15s; }
.why-item:nth-child(3) { transition-delay: 0.25s; }
.why-item:nth-child(4) { transition-delay: 0.35s; }
.why-item:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(24, 127, 176, 0.18);
}
.why-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--grad);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin: 0 auto 14px;
}
.why-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 6px;
}
.why-item p {
  font-size: 0.85rem;
  color: var(--light-gray);
  line-height: 1.55;
}

/* ===========================================================
   4. HOW IT WORKS — horizontal flow with connecting line
   =========================================================== */
.how-section {
  padding: 80px 0;
  background: var(--white);
}
.how-section .section-head {
  text-align: center;
  margin-bottom: 60px;
}
.how-section .section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  color: var(--dark-text);
}
.how-section .section-head p {
  color: var(--light-gray);
  font-size: 1.02rem;
  max-width: 560px;
  margin: 0 auto;
}

.how-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
/* Dashed connector line behind the icons */
.how-line {
  position: absolute;
  top: 40px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    rgba(24, 127, 176, 0.35),
    rgba(24, 127, 176, 0.35) 8px,
    transparent 8px,
    transparent 16px
  );
  z-index: 0;
}

.how-step {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.how-step.revealed { opacity: 1; transform: translateY(0); }
.how-step:nth-child(2) { transition-delay: 0.1s; }
.how-step:nth-child(3) { transition-delay: 0.2s; }
.how-step:nth-child(4) { transition-delay: 0.3s; }
.how-step:nth-child(5) { transition-delay: 0.4s; }

.how-step-num {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}
.how-step-num span {
  position: absolute;
  top: -14px;
  right: -10px;
  background: var(--red);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(227, 6, 19, 0.35);
}
.how-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid rgba(24, 127, 176, 0.2);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(24, 127, 176, 0.12);
  transition: background 0.35s ease, color 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}
.how-step:hover .how-icon-circle {
  background: var(--grad);
  color: var(--white);
  border-color: var(--primary-blue);
  transform: scale(1.06) rotate(-5deg);
}
.how-step h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--dark-text);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.how-step p {
  font-size: 0.9rem;
  color: var(--light-gray);
  line-height: 1.6;
  max-width: 230px;
  margin: 0 auto;
}

/* ===========================================================
   5. CTA BANNER (services-specific tweaks)
   =========================================================== */
.services-cta {
  margin-top: 0;
}

/* ===========================================================
   6. RESPONSIVE
   =========================================================== */
@media (max-width: 980px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  /* How flow → 2 columns; hide horizontal line, replace with vertical accents */
  .how-flow {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 20px;
  }
  .how-line { display: none; }
}

@media (max-width: 850px) {
  .services-hero { padding: 80px 0 130px; }
  .hero-wave-bottom { height: 60px; }

  /* Tone down floating icons on smaller screens */
  .float-icon { width: 44px; height: 44px; font-size: 1rem; opacity: 0.5; }
  .fi-1 { top: 8%;  left: 4%;  }
  .fi-2 { top: 14%; right: 4%; }
  .fi-3 { top: 64%; left: 4%;  }
  .fi-4 { top: 70%; right: 4%; }
  .fi-5, .fi-6 { display: none; }

  .services-section,
  .how-section { padding: 60px 0; }
  .why-strip { padding: 40px 0 60px; }

  .hero-stat-row { gap: 24px; }
  .hero-stat:not(:last-child)::after { right: -12px; height: 28px; }
  .hero-stat strong { font-size: 1.5rem; }
}

@media (max-width: 620px) {
  .services-grid { grid-template-columns: 1fr; gap: 20px; }
  .why-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

  .how-flow {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .how-step p { max-width: 320px; }
}

@media (max-width: 480px) {
  .services-hero { padding: 60px 0 120px; }
  .services-hero h1 { letter-spacing: -1.2px; }
  .hero-lead { font-size: 1rem; }

  .hero-stat-row { gap: 16px; }
  .hero-stat { padding: 0 10px; }
  .hero-stat:not(:last-child)::after { right: -8px; height: 24px; }
  .hero-stat strong { font-size: 1.3rem; }
  .hero-stat span { font-size: 0.78rem; }

  /* Hide more floating icons on very small screens */
  .fi-3, .fi-4 { display: none; }

  .service-card { padding: 26px 22px 24px; border-radius: 16px; }
  .card-icon { width: 54px; height: 54px; font-size: 1.3rem; border-radius: 14px; }
  .service-card h3 { font-size: 1.15rem; }
  .card-ribbon { font-size: 0.65rem; padding: 4px 10px; top: 14px; right: 14px; }

  .why-item { padding: 22px 16px; }
  .why-icon { width: 44px; height: 44px; font-size: 1rem; }

  .how-step-num { width: 72px; height: 72px; }
  .how-icon-circle { width: 72px; height: 72px; font-size: 1.4rem; }
  .how-step-num span { font-size: 0.72rem; padding: 3px 8px; }
}