/* ==========================================================================
   CREDENTIALS — ISO, Safety, Awards, In-House Capabilities
   Shared across all homepage variants
   ========================================================================== */

.cred-section {
  padding: clamp(80px, 12vw, 140px) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cred-header {
  text-align: center;
  margin-bottom: clamp(48px, 6vw, 72px);
}

.cred-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 400;
  color: var(--text);
  margin-top: 8px;
}

.cred-header h2 em {
  font-style: italic;
  color: var(--accent-dark);
}

/* ── Grid of 4 credential cards ────────────────────────────────────────── */

.cred-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}

.cred-card {
  background: var(--bg);
  padding: clamp(32px, 3vw, 48px);
  position: relative;
  overflow: hidden;
  transition: background 0.5s var(--ease);
}

.cred-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.cred-card:hover::before {
  transform: scaleX(1);
}

.cred-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  color: var(--accent-dark);
  opacity: 0.8;
}

.cred-icon svg {
  width: 100%;
  height: 100%;
}

.cred-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.3;
}

.cred-card p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.cred-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  transition: all 0.3s var(--ease);
}

.cred-card:hover .cred-badge {
  background: var(--accent);
  color: #fafaf8;
}

.cred-badge svg {
  width: 12px;
  height: 12px;
}

/* ── Dark mode ─────────────────────────────────────────────────────────── */

[data-theme="dark"] .cred-grid {
  background: rgba(255,255,255,0.06);
}

[data-theme="dark"] .cred-card {
  background: var(--bg);
}

[data-theme="dark"] .cred-card:hover .cred-badge {
  color: var(--black);
}

/* ── V2 Variant — Horizontal scroll style ──────────────────────────────── */

.cred-v2 {
  padding: clamp(80px, 12vw, 140px) 0;
  background: var(--bg-alt);
  transition: background 0.5s var(--ease);
  overflow: hidden;
}

.cred-v2 .cred-header {
  text-align: left;
  padding: 0 var(--container-pad);
  max-width: var(--container-max);
  margin: 0 auto clamp(40px, 5vw, 60px);
}

.cred-v2-track {
  display: flex;
  gap: 20px;
  padding: 0 var(--container-pad);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cred-v2-track::-webkit-scrollbar { display: none; }

.cred-v2-card {
  flex: 0 0 calc(25% - 15px);
  min-width: 280px;
  scroll-snap-align: start;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: clamp(28px, 3vw, 40px);
  position: relative;
  transition: all 0.4s var(--ease);
}

.cred-v2-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.cred-v2-card .cred-icon {
  margin-bottom: 24px;
}

.cred-v2-card h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}

.cred-v2-card p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── V3 Variant — Floating badges with icon strip ──────────────────────── */

.cred-v3 {
  padding: clamp(60px, 8vw, 100px) 0;
  background: var(--black);
}

.cred-v3-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.cred-v3-label {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(36px, 5vw, 56px);
  display: block;
}

.cred-v3-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.cred-v3-item {
  text-align: center;
}

.cred-v3-item .cred-icon {
  margin: 0 auto 20px;
  color: var(--accent);
  opacity: 1;
}

.cred-v3-item h4 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: #fafaf8;
  margin-bottom: 10px;
}

.cred-v3-item p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(250,250,248,0.4);
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .cred-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cred-v3-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .cred-grid {
    grid-template-columns: 1fr;
  }

  .cred-v3-row {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .cred-v2-card {
    min-width: 260px;
  }
}
