/* ================================================================
   credentials.css — Running Certifications (Certificate-Frame style)
   Vivek Pal
================================================================ */

.cert-marquee-section {
  padding: 60px 0 80px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.cert-marquee-title {
  color: #00f2ff;
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 4px;
  text-shadow: 0 0 30px rgba(0,242,255,0.5);
}

.marquee-wrapper {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: max-content;
  gap: 28px;
  animation: marqueeScroll 32s linear infinite;
  padding: 0 22px;
}

.marquee-track.no-loop {
  animation: marqueeSinglePass 18s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes marqueeSinglePass {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-110%); }
}

@keyframes marqueeSinglePassReverse {
  from { transform: translateX(-110%); }
  to   { transform: translateX(100vw); }
}

.cert-marquee-section .marquee-track.no-loop {
  animation: marqueeSinglePassReverse 18s linear infinite;
}

/* ----------------------------------------------------------------
   CERTIFICATE-FRAME CARD — unique namespaced classes (cnf-*) so
   nothing else on the page (background.js / fluid-cursor.js /
   other sections) can collide with or override these rules.
---------------------------------------------------------------- */

.cred-card {
  flex: 0 0 auto !important;
  width: clamp(230px, 30vw, 380px) !important;
  height: auto !important;
  box-sizing: border-box !important;
  position: relative !important;
  display: block !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: transform 0.3s ease !important;

  padding: 12px !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  background: #1a1a1a !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    14px 14px 28px rgba(0,0,0,0.5),
    -4px -4px 10px rgba(255,255,255,0.03) !important;
}
.cred-card:hover {
  transform: translateY(-6px) !important;
}

.cnf-ring {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  overflow: visible !important;
  display: block !important;
  pointer-events: none !important;
}

.cnf-dot {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 60px !important;
  height: 4px !important;
  margin: -2px 0 0 -30px !important;
  background: var(--neon-color, #00ff66) !important;
  border-radius: 3px !important;
  box-shadow:
    0 0 10px 3px var(--neon-color, #00ff66),
    0 0 24px 8px var(--neon-color, #00ff66) !important;
  animation: cnfOrbit 3.5s linear infinite !important;
}

@keyframes cnfOrbit {
  0%    { top: 0%;   left: 0%;   transform: rotate(0deg); }
  12.5% { top: 0%;   left: 50%;  transform: rotate(0deg); }
  25%   { top: 0%;   left: 100%; transform: rotate(0deg); }
  25.01%{ top: 0%;   left: 100%; transform: rotate(90deg); }
  37.5% { top: 50%;  left: 100%; transform: rotate(90deg); }
  50%   { top: 100%; left: 100%; transform: rotate(90deg); }
  50.01%{ top: 100%; left: 100%; transform: rotate(180deg); }
  62.5% { top: 100%; left: 50%;  transform: rotate(180deg); }
  75%   { top: 100%; left: 0%;   transform: rotate(180deg); }
  75.01%{ top: 100%; left: 0%;   transform: rotate(270deg); }
  87.5% { top: 50%;  left: 0%;   transform: rotate(270deg); }
  100%  { top: 0%;   left: 0%;   transform: rotate(270deg); }
}



.cred-card-inner {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  background: #333 !important;
  border-radius: 3px;
  padding: 12px 10px 14px;
  box-shadow:
    inset 6px 6px 12px rgba(255,255,255,0.08),
    inset -6px -6px 14px rgba(0,0,0,0.6);
}

.cred-frame-box {
  position: relative;
  width: 100%;
  height: clamp(150px, 19vw, 240px);
  overflow: hidden;
  border-radius: 2px;
  background: #000;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.7);
}

.cred-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

.cred-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.cred-name {
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #e0fbfc;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  text-align: center;
  white-space: normal;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cred-issuer-row {
  display: flex !important;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.cred-institute-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}

.cred-issuer-name {
  font-size: 0.9rem;
  color: #cfd8dc;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .cert-marquee-section { padding: 40px 0 60px; }
  .cert-marquee-title { margin-bottom: 32px; }
}

@media (max-width: 480px) {
  .marquee-track { gap: 16px; padding: 0 14px; }
  .cred-card { width: 80vw !important; }
  .cred-name { font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cnf-dot { animation: none !important; }
}