/* =============================================================
   Vision Services Plugin — Frontend Styles
   Primary color: #496ebf
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Open+Sans:wght@400;500;600&display=swap');

:root {
  --vs-primary:     #496ebf;
  --vs-primary-dk:  #2f4e99;
  --vs-accent:      #e8212a;
  --vs-dark:        #1a2340;
  --vs-light-bg:    #f4f7fc;
  --vs-card-radius: 14px;
  --vs-gap:         22px;
  --vs-transition:  0.36s cubic-bezier(.4,0,.2,1);
  --vs-shadow:      0 4px 24px rgba(73,110,191,0.13);
  --vs-shadow-hover:0 14px 40px rgba(73,110,191,0.22);
}

/* ── Shared section wrapper ── */
.vs-full-page-wrap {
  font-family: 'Open Sans', sans-serif;
}

/* ── Section title ── */
.vs-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--vs-primary);
  text-align: center;
  margin: 0 0 36px;
  position: relative;
}
.vs-section-title::after {
  content: '';
  display: block;
  width: 54px;
  height: 3px;
  background: var(--vs-accent);
  border-radius: 2px;
  margin: 10px auto 0;
}

/* ── Grid ── */
.vs-grid {
  display: grid;
  gap: var(--vs-gap);
  margin: 0 auto 56px;
  padding: 0 16px;
  max-width: 1160px;
}
.vs-grid-2 { grid-template-columns: repeat(2, 1fr); }
.vs-grid-3 { grid-template-columns: repeat(3, 1fr); }
.vs-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .vs-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .vs-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .vs-grid-4,
  .vs-grid-3,
  .vs-grid-2 { grid-template-columns: 1fr; }
}

/* =============================================================
   SERVICE CARDS  (What We Do)
   ============================================================= */
.vs-service-card {
  border-radius: var(--vs-card-radius);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: var(--vs-shadow);
  transition: transform var(--vs-transition), box-shadow var(--vs-transition);
  animation: vsCardIn 0.55s ease both;
}
.vs-service-card:hover {
  transform: translateY(-7px) scale(1.02);
  box-shadow: var(--vs-shadow-hover);
}

/* Card with background image */
.vs-service-card.has-bg-image { min-height: 260px; }
.vs-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,35,64,0.55);
  transition: background var(--vs-transition);
  z-index: 1;
}
.vs-service-card.has-bg-image:hover .vs-card-overlay {
  background: rgba(26,35,64,0.72);
}
.vs-service-card.has-bg-image .vs-card-inner {
  position: relative;
  z-index: 2;
  color: #fff;
}
.vs-service-card.has-bg-image .vs-card-title,
.vs-service-card.has-bg-image .vs-card-subtitle,
.vs-service-card.has-bg-image .vs-card-excerpt p {
  color: #fff;
}
.vs-service-card.has-bg-image .vs-btn {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.vs-service-card.has-bg-image .vs-btn:hover {
  background: #fff;
  color: var(--vs-primary);
  border-color: #fff;
}

.vs-card-inner {
  padding: 28px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.vs-card-icon {
  margin-bottom: 16px;
}
.vs-icon-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
}
svg.vs-icon {
  display: block;
  transition: transform var(--vs-transition);
}
.vs-service-card:hover svg.vs-icon {
  transform: scale(1.1) translateY(-2px);
}

.vs-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--vs-dark);
  margin: 0 0 6px;
  line-height: 1.3;
}
.vs-card-subtitle {
  font-size: 0.8rem;
  color: var(--vs-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
}
.vs-card-excerpt {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 18px;
}

/* ── Buttons ── */
.vs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--vs-primary);
  background: transparent;
  border: 2px solid var(--vs-primary);
  border-radius: 50px;
  padding: 7px 18px;
  text-decoration: none;
  transition: background var(--vs-transition), color var(--vs-transition), gap var(--vs-transition);
  align-self: flex-start;
}
.vs-btn:hover {
  background: var(--vs-primary);
  color: #fff;
  gap: 10px;
}
.vs-btn svg { transition: transform var(--vs-transition); }
.vs-btn:hover svg { transform: translateX(3px); }

.vs-btn-white {
  border-color: #fff;
  color: #fff;
}
.vs-btn-white:hover {
  background: #fff;
  color: var(--vs-primary);
}

/* =============================================================
   PROGRAMME AREAS
   ============================================================= */
.vs-programme-grid {
  margin-bottom: 56px;
}
.vs-programme-card {
  background: #fff;
  border-radius: var(--vs-card-radius);
  padding: 30px 26px 26px;
  box-shadow: var(--vs-shadow);
  border-top: 4px solid var(--vs-primary);
  transition: transform var(--vs-transition), box-shadow var(--vs-transition);
  display: flex;
  flex-direction: column;
  animation: vsCardIn 0.55s ease both;
}
.vs-programme-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--vs-shadow-hover);
}
.vs-programme-icon {
  margin-bottom: 16px;
}
.vs-programme-card .vs-card-title {
  font-size: 1rem;
  margin-bottom: 10px;
}
.vs-programme-card .vs-card-body {
  font-size: 0.87rem;
  color: #555;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}
.vs-text-link {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--vs-accent);
  text-decoration: none;
  border-bottom: 2px solid rgba(232,33,42,0.25);
  padding-bottom: 1px;
  transition: border-color var(--vs-transition);
  align-self: flex-start;
}
.vs-text-link:hover { border-color: var(--vs-accent); }

/* =============================================================
   MORE ON OUR WORK — SLIDER
   ============================================================= */
.vs-work-slider-wrap {
  position: relative;
  max-width: 1160px;
  margin: 0 auto 56px;
  padding: 0 50px;
}
.vs-work-slider {
  display: flex;
  gap: 16px;
  overflow: hidden;
  scroll-behavior: smooth;
  /* show ~3 cards at a time */
}
.vs-work-slide {
  flex: 0 0 calc(33.333% - 11px);
  min-height: 280px;
  border-radius: var(--vs-card-radius);
  background-size: cover;
  background-position: center;
  background-color: var(--vs-primary);
  position: relative;
  overflow: hidden;
  transition: transform var(--vs-transition);
}
.vs-work-slide:hover { transform: scale(1.03); }
.vs-work-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,35,64,0.85) 0%, rgba(26,35,64,0.3) 60%, transparent 100%);
}
.vs-work-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 22px 18px;
  text-align: center;
  color: #fff;
}
.vs-work-content h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.97rem;
  font-weight: 700;
  margin: 10px 0 14px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.vs-work-icon-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Slider arrows */
.vs-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--vs-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--vs-transition), transform var(--vs-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vs-slider-prev { left: 4px; }
.vs-slider-next { right: 4px; }
.vs-slider-arrow:hover {
  background: var(--vs-primary-dk);
  transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
  .vs-work-slide { flex: 0 0 calc(50% - 8px); }
}
@media (max-width: 480px) {
  .vs-work-slide { flex: 0 0 100%; }
}

/* =============================================================
   PARTNERS — Auto-scroll strip
   ============================================================= */
.vs-partners-track-wrap {
  overflow: hidden;
  max-width: 100%;
  margin: 0 auto 56px;
  padding: 0 0 8px;
  position: relative;
}
.vs-partners-track-wrap::before,
.vs-partners-track-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.vs-partners-track-wrap::before { left: 0; background: linear-gradient(to right, #fff, transparent); }
.vs-partners-track-wrap::after  { right: 0; background: linear-gradient(to left, #fff, transparent); }

.vs-partners-track {
  display: flex;
  align-items: center;
  gap: 40px;
  animation: vsPartnersScroll 28s linear infinite;
  width: max-content;
}
.vs-partners-track:hover { animation-play-state: paused; }

.vs-partner-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.vs-partner-logo img {
  height: 56px;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(40%);
  opacity: 0.82;
  transition: filter var(--vs-transition), opacity var(--vs-transition), transform var(--vs-transition);
}
.vs-partner-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.07);
}
.vs-partner-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--vs-primary);
  white-space: nowrap;
  padding: 8px 16px;
  border: 2px solid var(--vs-primary);
  border-radius: 6px;
}

/* =============================================================
   ANIMATIONS
   ============================================================= */
@keyframes vsCardIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vs-grid > *:nth-child(1) { animation-delay: 0.05s; }
.vs-grid > *:nth-child(2) { animation-delay: 0.10s; }
.vs-grid > *:nth-child(3) { animation-delay: 0.15s; }
.vs-grid > *:nth-child(4) { animation-delay: 0.20s; }
.vs-grid > *:nth-child(5) { animation-delay: 0.25s; }
.vs-grid > *:nth-child(6) { animation-delay: 0.30s; }
.vs-grid > *:nth-child(7) { animation-delay: 0.35s; }
.vs-grid > *:nth-child(8) { animation-delay: 0.40s; }

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