/* ═══════════════════════════════════════════════════════════════════════════
   Studio Visuali — Project Card Widget
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --f-display: 'Frank Ruhl Libre', 'David Libre', Georgia, serif;
  --f-body:    'Heebo', 'Assistant', system-ui, sans-serif;
}

/* ════════════════════════════════════════════════════════════════════════════
   PROJECT CARD  •  prefix: vpc-
   ════════════════════════════════════════════════════════════════════════════ */
.vpc-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 8px;
  background: #1a1a1a;
  cursor: pointer;
  z-index: 0;
  text-decoration: none;
  color: #fff;
  direction: rtl;
}

.vpc-bg {
  display: block;
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  transform: scale(1.02);
  transition: transform 700ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.vpc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.45) 40%,
    rgba(0, 0, 0, 0.1)  70%,
    rgba(0, 0, 0, 0)    100%
  );
  opacity: 0.7;
  transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.vpc-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  direction: rtl;
  text-align: right;
}

.vpc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateY(0);
  transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.vpc-title {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: #fff;
  letter-spacing: -0.01em;
}

.vpc-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  transform: translateX(8px);
  opacity: 0;
  transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity    400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.vpc-arrow svg {
  width: 100%;
  height: 100%;
  stroke: #fff;
  stroke-width: 1.5;
  fill: none;
}

.vpc-desc {
  font-family: var(--f-body);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
}

.vpc-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
  width: 0;
  margin: 16px 0 0;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1) 100ms;
}

.vpc-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  opacity: 0;
  transform: translateY(20px);
  max-height: 0;
  overflow: hidden;
  transition: opacity   500ms cubic-bezier(0.4, 0, 0.2, 1) 150ms,
              transform 500ms cubic-bezier(0.4, 0, 0.2, 1) 150ms;
}

.vpc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
}
.vpc-meta-item svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  stroke-width: 1.5;
  fill: none;
  flex-shrink: 0;
}

/* ── Hover / focus-visible ──────────────────────────────────────────────── */
.vpc-card:hover .vpc-bg,
.vpc-card:focus-visible .vpc-bg {
  transform: scale(1.08);
}

.vpc-card:hover .vpc-overlay,
.vpc-card:focus-visible .vpc-overlay {
  opacity: 1;
}

.vpc-card:hover .vpc-header,
.vpc-card:focus-visible .vpc-header {
  transform: translateY(-4px);
}

.vpc-card:hover .vpc-arrow,
.vpc-card:focus-visible .vpc-arrow {
  transform: translateX(0);
  opacity: 1;
}

.vpc-card:hover .vpc-divider,
.vpc-card:focus-visible .vpc-divider {
  width: 100%;
}

.vpc-card:hover .vpc-meta,
.vpc-card:focus-visible .vpc-meta {
  opacity: 1;
  transform: translateY(0);
  max-height: 60px;
}

/* ── Elementor flex context fix ─────────────────────────────────────────── */
.elementor-widget-visuali-project-card {
  width: 100%;
  align-self: flex-start;
}

.elementor-widget-visuali-project-card .elementor-widget-container {
  width: 100%;
}


/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .vpc-title   { font-size: 1.25rem; }
  .vpc-content { padding: 18px; }
}

/* ── Touch devices — ביטול hover, מטא קבוע ─────────────────────────────── */
@media (max-width: 768px) {
  .vpc-card:hover .vpc-bg      { transform: scale(1.02); }
  .vpc-card:hover .vpc-overlay { opacity: 0.7; }
  .vpc-card:hover .vpc-header  { transform: translateY(0); }
  .vpc-card:hover .vpc-arrow   { transform: translateX(8px); opacity: 0; }

  .vpc-card .vpc-divider,
  .vpc-card:hover .vpc-divider { width: 100%; }

  .vpc-card .vpc-meta,
  .vpc-card:hover .vpc-meta {
    opacity: 1;
    transform: translateY(0);
    max-height: 60px;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   PROJECT GRID  •  prefix: vpg-
   ════════════════════════════════════════════════════════════════════════════ */
.vpg-grid {
  display: grid;
  width: 100%;
}

.vpg-item {
  min-width: 0; /* מונע פריצת גריד */
}

.vpg-notice {
  color: #999;
  padding: 1rem;
  font-style: italic;
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .vpc-bg, .vpc-overlay, .vpc-header, .vpc-arrow, .vpc-divider, .vpc-meta {
    transition-duration: 0.01ms !important;
  }
}
