/* ================================================================
   Skillsure Testimonials — Frontend Styles
   Colours match Skillsure theme: #1a5fa8 blue, #f4f6fa bg
   ================================================================ */

:root {
  --st-blue:      #1a5fa8;
  --st-blue-mid:  #2572c4;
  --st-blue-dark: #134a85;
  --st-blue-lt:   #e8f0fb;
  --st-border:    #dde3ed;
  --st-bg:        #f4f6fa;
  --st-text:      #1f2937;
  --st-muted:     #6b7280;
  --st-green:     #27ae60;
  --st-red:       #e74c3c;
  --st-radius:    16px;
  --st-shadow:
    0 1px 3px rgba(0,0,0,.06),
    0 4px 12px rgba(0,0,0,.08),
    0 12px 32px rgba(0,0,0,.06);
  --st-shadow-hover:
    0 4px 8px rgba(0,0,0,.08),
    0 12px 28px rgba(0,0,0,.12),
    0 24px 48px rgba(0,0,0,.08);
}

/* ── Card ─────────────────────────────────────────────── */

.st-card {
  position: relative;
  background: #fff;
  border-radius: var(--st-radius);
  box-shadow: var(--st-shadow);
  padding: 2rem 1.875rem 1.625rem;
  overflow: hidden;
  transition: transform .28s cubic-bezier(.22,.68,0,1.1), box-shadow .28s ease;
}

/* Accent bar on left edge — appears on hover */
.st-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--st-blue) 0%, var(--st-blue-mid) 100%);
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity .28s;
}
.st-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--st-shadow-hover);
}
.st-card:hover::before {
  opacity: 1;
}

/* Category heading strip */
.st-card-category {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--st-blue);
  background: var(--st-blue-lt);
  margin: -2rem -1.875rem 1.375rem;
  padding: .55rem 1.875rem;
  border-radius: var(--st-radius) var(--st-radius) 0 0;
  border-bottom: 1px solid #d0e0f5;
}

/* Decorative opening quote */
.st-quote-mark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 6rem;
  line-height: .65;
  color: var(--st-blue);
  opacity: .10;
  position: absolute;
  top: 1.125rem;
  left: 1.375rem;
  pointer-events: none;
  user-select: none;
}

/* Testimonial text */
.st-card-text {
  position: relative;
  z-index: 1;
  color: var(--st-text);
  font-size: 1rem;
  line-height: 1.74;
  margin: 1.375rem 0 1.625rem;
  padding-top: .25rem;
}

/* Card footer row */
.st-card-footer {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--st-border);
}

/* Avatar circle */
.st-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--av-bg, var(--st-blue));
  color: #fff;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* Name + company */
.st-card-meta {
  flex: 1;
  min-width: 0;
}
.st-card-name {
  display: block;
  font-weight: 700;
  font-size: .9rem;
  color: var(--st-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-card-company {
  display: block;
  font-size: .8rem;
  color: var(--st-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: .1rem;
}


/* ── Carousel ─────────────────────────────────────────── */

.st-carousel {
  position: relative;
  padding-bottom: .25rem;
}

.st-carousel-stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--st-radius);
}

.st-slide {
  display: none;
}
.st-slide.is-active {
  display: block;
  animation: st-appear var(--st-anim-ms, 500ms) cubic-bezier(.22,.68,0,1.1) both;
}

@keyframes st-appear {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Controls row */
.st-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Prev / Next arrows */
.st-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--st-border);
  background: #fff;
  color: var(--st-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.st-arrow svg {
  width: 18px;
  height: 18px;
  display: block;
}
.st-arrow:hover {
  background: var(--st-blue);
  border-color: var(--st-blue);
  color: #fff;
  transform: scale(1.08);
}
.st-arrow:focus-visible {
  outline: 2px solid var(--st-blue);
  outline-offset: 3px;
}

/* Dot indicators */
.st-dots {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.st-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  border: none;
  background: var(--st-border);
  cursor: pointer;
  padding: 0;
  transition: background .25s, width .3s cubic-bezier(.22,.68,0,1.1);
}
.st-dot.is-active {
  background: var(--st-blue);
  width: 26px;
}
.st-dot:focus-visible {
  outline: 2px solid var(--st-blue);
  outline-offset: 2px;
}

/* Auto-play progress bar */
.st-progress-bar {
  height: 3px;
  background: var(--st-border);
  border-radius: 3px;
  margin-top: 1.25rem;
  overflow: hidden;
}
.st-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--st-blue) 0%, var(--st-blue-mid) 100%);
  border-radius: 3px;
  transition: width linear;
}

/* ── Scroll Carousel ─────────────────────────────────── */

.st-scroller {
  position: relative;
}

.st-scroller-outer {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* The scrollable track */
.st-scroller-track {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--st-visible, 3), 1fr);
  gap: 1.25rem;
  overflow: hidden;
}

/* Each card slot */
.st-scroller-item {
  transition: opacity .35s ease, transform .35s ease;
}
.st-scroller-item.is-leaving {
  opacity: 0;
  transform: translateX(-12px);
}
.st-scroller-item.is-entering {
  opacity: 0;
  transform: translateX(12px);
}

/* Counter  e.g. "3 / 12" */
.st-scroller-counter {
  text-align: center;
  margin-top: 1.25rem;
  font-size: .85rem;
  color: var(--st-muted);
  font-variant-numeric: tabular-nums;
}
.st-scroller-current {
  font-weight: 700;
  color: var(--st-blue);
}

/* Arrow buttons sit flush left/right of the track */
.st-scroller-outer > .st-arrow {
  flex-shrink: 0;
}

/* Responsive: reduce visible count automatically */
@media (max-width: 960px) {
  .st-scroller-track { --st-visible: 2 !important; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .st-scroller-track { --st-visible: 1 !important; grid-template-columns: 1fr; }
  .st-scroller-outer > .st-arrow { display: none; }
}

/* ── Grid ─────────────────────────────────────────────── */

.st-grid-wrap {}

/* Category filter buttons */
.st-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}
.st-filter {
  background: #fff;
  border: 1.5px solid var(--st-border);
  border-radius: 24px;
  padding: .4rem 1.1rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--st-muted);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.st-filter:hover {
  border-color: var(--st-blue);
  color: var(--st-blue);
  transform: translateY(-1px);
}
.st-filter.is-active {
  background: var(--st-blue);
  border-color: var(--st-blue);
  color: #fff;
  box-shadow: 0 3px 10px rgba(26,95,168,.28);
}
.st-filter:focus-visible {
  outline: 2px solid var(--st-blue);
  outline-offset: 2px;
}

/* Masonry grid */
.st-grid {
  columns: var(--st-cols, 3);
  column-gap: 1.5rem;
}
.st-grid-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  /* Entrance animation */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .45s ease, transform .45s cubic-bezier(.22,.68,0,1.1);
}
.st-grid-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.st-grid-item.is-hidden {
  display: none;
}

/* Grid responsive */
@media (max-width: 960px) {
  .st-grid { columns: 2; }
}
@media (max-width: 540px) {
  .st-grid { columns: 1; }
}

/* ── Submission Form ──────────────────────────────────── */

.st-form-wrap {
  background: #fff;
  border-radius: var(--st-radius);
  box-shadow: var(--st-shadow);
  padding: 2.5rem 2.5rem 2.25rem;
  max-width: 680px;
  margin: 0 auto;
}

.st-form-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--st-text);
  margin: 0 0 1.875rem;
  letter-spacing: -.015em;
}

/* Honeypot — visually hidden */
.st-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.st-row {
  display: flex;
  gap: 1.125rem;
}
.st-two-col > .st-field {
  flex: 1;
  min-width: 0;
}

.st-field {
  margin-bottom: 1.25rem;
}
.st-field label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--st-text);
  margin-bottom: .4rem;
}
.st-req {
  color: var(--st-red);
  margin-left: .1rem;
}
.st-optional {
  font-weight: 400;
  color: var(--st-muted);
  font-size: .8rem;
}

.st-field input,
.st-field select,
.st-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--st-border);
  border-radius: 10px;
  padding: .65rem .9rem;
  font-size: .9375rem;
  font-family: inherit;
  color: var(--st-text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.st-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .875rem center;
  padding-right: 2.5rem;
}
.st-field input:focus,
.st-field select:focus,
.st-field textarea:focus {
  border-color: var(--st-blue);
  box-shadow: 0 0 0 3px rgba(26,95,168,.12);
}
.st-field textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

.st-form-footer {
  margin-top: .5rem;
}

.st-submit-btn {
  position: relative;
  background: var(--st-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .8rem 2.2rem;
  font-size: .9375rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 3px 10px rgba(26,95,168,.25);
}
.st-submit-btn:hover {
  background: var(--st-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(26,95,168,.3);
}
.st-submit-btn:active {
  transform: none;
  box-shadow: 0 2px 8px rgba(26,95,168,.2);
}
.st-submit-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.st-submit-btn:focus-visible {
  outline: 2px solid var(--st-blue);
  outline-offset: 3px;
}

/* Spinner inside button */
.st-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: st-spin .7s linear infinite;
}
.st-submit-btn.is-loading .st-spinner { display: block; }
.st-submit-btn.is-loading .st-btn-text { opacity: .7; }

@keyframes st-spin {
  to { transform: rotate(360deg); }
}

/* Form result message */
.st-msg {
  display: none;
  margin-top: 1rem;
  padding: .9rem 1.1rem;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.5;
}
.st-msg.is-success {
  display: block;
  background: #eafaf1;
  color: #1e7e46;
  border: 1px solid #a3e4bc;
}
.st-msg.is-error {
  display: block;
  background: #fdf0ee;
  color: #c0392b;
  border: 1px solid #f5b7b1;
}

/* ── Utility ─────────────────────────────────────────── */

.st-empty {
  color: var(--st-muted);
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* ── Mobile adjustments ──────────────────────────────── */

@media (max-width: 600px) {
  .st-form-wrap { padding: 1.5rem; }
  .st-row.st-two-col { flex-direction: column; gap: 0; }
  .st-carousel-controls { gap: .6rem; }
  .st-card { padding: 1.5rem 1.375rem 1.25rem; }
  .st-quote-mark { font-size: 4.5rem; }
}
