/* ═══════════════════════════════════════════════
   ANIMATED GRADIENT BORDER — style.css
   Uses CSS variables so admin color changes work
═══════════════════════════════════════════════ */

@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── SHARED BASE ── */
.expertise-card,
.service-card,
.port-card,
.skill-item,
.stat,
.tl-item {
  position: relative;
  z-index: 0;
  border: none !important;
  border-radius: 16px;
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  box-shadow: none !important;
}

/* ── ANIMATED GRADIENT RING ── */
.expertise-card::before,
.service-card::before,
.port-card::before,
.skill-item::before,
.stat::before,
.tl-item::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  z-index: -1;
  background: linear-gradient(
    270deg,
    #c0c0c0,
    #a8c0e8,
    #2563EB,
    #7C3AED,
    #c0c0c0,
    #ffffff,
    #0EA5E9,
    #c0c0c0
  );
  background-size: 400% 400%;
  animation: gradientMove 6s ease infinite;
}

/* ── INNER DIV — uses CSS variable so it matches admin color ── */
.expertise-card-inner,
.service-card-inner,
.skill-item-inner,
.stat-inner,
.tl-item-inner {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  height: 100%;
  /* Uses the same variable as the page background */
  background: var(--bg, #F4F6FB);
}

/* Port card inner is always white (has image) */
.port-card-inner {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
  background: var(--card, #ffffff);
}

/* ── PADDING on inners ── */
.expertise-card-inner { padding: 1.8rem; }
.service-card-inner   { padding: 1.8rem; }
.skill-item-inner     { padding: 0.75rem 1rem; }
.stat-inner           { padding: 0.8rem 1.1rem; text-align: center; min-width: 72px; }
.tl-item-inner        { padding: 1.2rem 1.4rem; margin-bottom: 0.5rem; }

/* ── STAGGERED DELAYS ── */
.expertise-card:nth-child(1)::before { animation-delay: 0s; }
.expertise-card:nth-child(2)::before { animation-delay: 0.5s; }
.expertise-card:nth-child(3)::before { animation-delay: 1s; }
.expertise-card:nth-child(4)::before { animation-delay: 1.5s; }
.expertise-card:nth-child(5)::before { animation-delay: 2s; }
.expertise-card:nth-child(6)::before { animation-delay: 2.5s; }

.service-card:nth-child(1)::before { animation-delay: 0.2s; }
.service-card:nth-child(2)::before { animation-delay: 0.7s; }
.service-card:nth-child(3)::before { animation-delay: 1.2s; }
.service-card:nth-child(4)::before { animation-delay: 1.7s; }
.service-card:nth-child(5)::before { animation-delay: 2.2s; }
.service-card:nth-child(6)::before { animation-delay: 2.7s; }

.port-card:nth-child(1)::before { animation-delay: 0.3s; }
.port-card:nth-child(2)::before { animation-delay: 1s; }
.port-card:nth-child(3)::before { animation-delay: 2s; }

.skill-item:nth-child(1)::before { animation-delay: 0s; }
.skill-item:nth-child(2)::before { animation-delay: 0.4s; }
.skill-item:nth-child(3)::before { animation-delay: 0.8s; }
.skill-item:nth-child(4)::before { animation-delay: 1.2s; }
.skill-item:nth-child(5)::before { animation-delay: 1.6s; }
.skill-item:nth-child(6)::before { animation-delay: 2.0s; }
.skill-item:nth-child(7)::before { animation-delay: 2.4s; }
.skill-item:nth-child(8)::before { animation-delay: 2.8s; }

.stat:nth-child(1)::before { animation-delay: 0s; }
.stat:nth-child(2)::before { animation-delay: 0.5s; }
.stat:nth-child(3)::before { animation-delay: 1s; }
.stat:nth-child(4)::before { animation-delay: 1.5s; }

.tl-item:nth-child(1)::before { animation-delay: 0s; }
.tl-item:nth-child(2)::before { animation-delay: 1s; }
.tl-item:nth-child(3)::before { animation-delay: 2s; }

/* ── HOVER: speed up ── */
.expertise-card:hover::before,
.service-card:hover::before,
.port-card:hover::before,
.skill-item:hover::before,
.stat:hover::before,
.tl-item:hover::before {
  animation-duration: 1.5s;
  filter: brightness(1.3);
}

/* ── TIMELINE dot stays on top ── */
.tl-item::after {
  content: '';
  position: absolute;
  left: -2.45rem;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2563EB;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
  z-index: 2;
}

/* Skills section bg is --bg, expertise/services sections are --bg3 (white) */
#expertise .expertise-card-inner { background: var(--bg, #F4F6FB); }
#services  .service-card-inner   { background: var(--bg, #F4F6FB); }
#skills    .skill-item-inner      { background: var(--bg2, #EAEEF8); }
#experience .tl-item-inner        { background: var(--bg3, #ffffff); }
