/*
 * Vela Cards Widget — style.css
 * Pixel-perfect match to original vela.org card section.
 * All values overridable via Elementor Style tab.
 */

/* ── Section ── */
.vcw-section {
  width: 100%;
  padding: 75px 0 45px;
}

/* ── Container ── */
.vcw-container {
  width: min(1280px, calc(100vw - 80px));
  margin: 0 auto;
}

/* ── Grid ── */
.vcw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ════════════════════════════════════════
   CARD
   ════════════════════════════════════════ */
.vcw-card {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 30px;
  padding: 6.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition:
    border-color 0.4s ease,
    box-shadow   0.4s ease,
    transform    0.3s ease;

  /* Scroll-in start state */
  opacity: 0;
  transform: translateY(40px);
}

/* Hover state */
.vcw-card:hover {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-4px);
}

/* ── Scroll-in animation (triggered by JS adding .vcw-in-view) ── */
.vcw-animate.vcw-in-view .vcw-card:nth-child(1) {
  opacity: 1;
  transform: none;
  transition:
    opacity      0.6s ease 0.1s,
    transform    0.6s ease 0.1s,
    border-color 0.4s,
    box-shadow   0.4s;
}
.vcw-animate.vcw-in-view .vcw-card:nth-child(2) {
  opacity: 1;
  transform: none;
  transition:
    opacity      0.6s ease 0.25s,
    transform    0.6s ease 0.25s,
    border-color 0.4s,
    box-shadow   0.4s;
}
.vcw-animate.vcw-in-view .vcw-card:nth-child(3) {
  opacity: 1;
  transform: none;
  transition:
    opacity      0.6s ease 0.4s,
    transform    0.6s ease 0.4s,
    border-color 0.4s,
    box-shadow   0.4s;
}
/* Extra cards beyond 3 */
.vcw-animate.vcw-in-view .vcw-card:nth-child(n+4) {
  opacity: 1;
  transform: none;
  transition:
    opacity      0.6s ease 0.55s,
    transform    0.6s ease 0.55s,
    border-color 0.4s,
    box-shadow   0.4s;
}
/* In editor: always show */
.elementor-editor-active .vcw-card {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Background image (hidden by default, revealed on hover) ── */
.vcw-card-bg {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

/* Dark scrim overlay on image for text readability */
.vcw-card-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: rgba(15, 20, 50, 0.55);
}

.vcw-card:hover .vcw-card-bg {
  opacity: 1;
}

/* ── Card content (always above bg image) ── */
.vcw-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 375px;
}

/* ── "For" label ── */
.vcw-for {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #31405B;
  transition: color 0.4s;
  line-height: 1;
}
.vcw-card:hover .vcw-for {
  color: rgba(255, 255, 255, 0.75);
}

/* ── Title (big serif word) ── */
.vcw-title {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400;
  color: #31405B;
  line-height: 1.1;
  margin: 0;
  transition: color 0.4s;
}
.vcw-card:hover .vcw-title {
  color: #ffffff;
}

/* ── Description ── */
.vcw-desc {
  font-size: 22px;
  font-weight: 400;
  color: #31405B;
  line-height: 1.35;
  margin: 0 0 10px;
  transition: color 0.4s;
}
.vcw-card:hover .vcw-desc {
  color: rgba(255, 255, 255, 0.88);
}

/* ── Link / CTA ── */
.vcw-link {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #31405B;
  text-decoration: none;
  transition: color 0.4s, letter-spacing 0.3s;
  display: inline-block;
}
.vcw-card:hover .vcw-link {
  color: #ffffff;
  letter-spacing: 0.22em;
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 1280px) {
  .vcw-card { padding: 4rem 2rem; }
  .vcw-title { font-size: clamp(2.5rem, 6vw, 4rem); }
}

@media (max-width: 860px) {
  .vcw-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }
  .vcw-desc  { font-size: 1.2rem; }
  .vcw-for   { font-size: 24px; }
  .vcw-section { padding-top: 0; padding-bottom: 50px; }
}

@media (max-width: 640px) {
  .vcw-container { width: calc(100vw - 40px); }
}

@media (max-width: 480px) {
  .vcw-card  { padding: 3rem 1.5rem; }
  .vcw-desc  { font-size: 1.1rem; }
  .vcw-title { font-size: clamp(2.5rem, 14vw, 4rem); }
}
