/* ==========================================================================
   Hoffman Bio Blocks — Shared CSS (Front-end + Editor)
   ========================================================================== */

/* ── Embed wrappers ─────────────────────────────────────────────────────── */
.hp-embed-wrap { margin-block: 1.5rem; }
.hp-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #F8FAFC;
}
.hp-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0.75rem;
}
.hp-office-embed {
  padding-bottom: 0;
  position: relative;
}
.hp-embed-placeholder,
.hp-embed-fallback {
  padding: 2rem;
  background: #F8FAFC;
  border: 1px dashed rgba(14,69,119,0.2);
  border-radius: 0.75rem;
  text-align: center;
  color: #94A3B8;
  font-size: 0.875rem;
}
.hp-embed-fallback a { color: #2563EB; text-decoration: underline; }

/* ── OneDrive Image ─────────────────────────────────────────────────────── */
.hp-onedrive-img { margin-block: 1rem; }
.hp-onedrive-img img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  display: block;
}
.hp-onedrive-img figcaption {
  font-size: 0.8125rem;
  color: #94A3B8;
  text-align: center;
  margin-top: 0.5rem;
}

/* ── Google Drive image ─────────────────────────────────────────────────── */
.hp-gdrive-img img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

/* ── Smart Gallery ──────────────────────────────────────────────────────── */
.hb-smart-gallery { margin-block: 1rem; }
.hb-smart-gallery--masonry { column-count: 3; column-gap: 1rem; }
.hb-smart-gallery--masonry .hb-gallery-item { break-inside: avoid; margin-bottom: 1rem; }
.hb-smart-gallery--justified-rows { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.hb-smart-gallery--justified-rows .hb-gallery-item { flex: 1 1 200px; }
.hb-smart-gallery--uniform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.hb-smart-gallery--uniform-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.hb-smart-gallery--uniform-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.hb-smart-gallery--uniform-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.hb-smart-gallery--uniform-grid.columns-5 { grid-template-columns: repeat(5, 1fr); }
.hb-smart-gallery--carousel { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 1rem; }
.hb-smart-gallery--carousel .hb-gallery-item { flex: 0 0 300px; scroll-snap-align: start; }
.hb-gallery-item img { width: 100%; height: auto; display: block; border-radius: 0.5rem; cursor: pointer; transition: opacity 0.2s; }
.hb-gallery-item img:hover { opacity: 0.88; }
.hb-gallery-item figcaption { font-size: 0.75rem; color: #94A3B8; text-align: center; margin-top: 0.375rem; }
@media (max-width: 768px) { .hb-smart-gallery--masonry { column-count: 2; } }
@media (max-width: 480px) { .hb-smart-gallery--masonry { column-count: 1; } }

/* ── Lightbox ───────────────────────────────────────────────────────────── */
.hb-lightbox-overlay {
  position: fixed; inset: 0; background: rgba(11,18,32,0.92);
  z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  cursor: zoom-out;
}
.hb-lightbox-overlay img {
  max-width: 90vw; max-height: 90vh;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  cursor: default;
}
.hb-lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%; width: 36px; height: 36px; cursor: pointer;
  color: #fff; font-size: 1.125rem; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ── Project Card ───────────────────────────────────────────────────────── */
.hp-project-card {
  background: #fff;
  border: 1px solid rgba(14,69,119,0.12);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex; flex-direction: column;
}
.hp-project-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(14,69,119,0.12); border-color: rgba(14,69,119,0.2); }
.hp-project-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.hp-project-card__body { padding: 1.25rem; flex: 1; }
.hp-project-card__tag { font-size: 0.75rem; font-weight: 600; color: #2563EB; text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 0.375rem; }
.hp-project-card__title { font-size: 1.125rem; font-weight: 700; color: #0B1220; margin: 0 0 0.375rem; letter-spacing: -0.02em; }
.hp-project-card__title a { color: inherit; text-decoration: none; }
.hp-project-card__title a:hover { color: #2563EB; }
.hp-project-card__tagline { font-size: 0.875rem; color: #475569; margin: 0; line-height: 1.6; }

/* ── Stat ───────────────────────────────────────────────────────────────── */
.hp-stat { text-align: center; padding: 1rem; }
.hp-stat__number { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: #0E4577; }
.hp-stat__delta { font-size: 0.875rem; font-weight: 600; color: #2563EB; margin-top: 0.25rem; }
.hp-stat__label { font-size: 0.875rem; font-weight: 600; color: #475569; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.5rem; }

/* ── Timeline ───────────────────────────────────────────────────────────── */
.hp-timeline {
  position: relative;
  padding-left: 2rem;
}
.hp-timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem; top: 0.5rem; bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, #2563EB, transparent);
  border-radius: 1px;
}
.hp-timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2.5rem;
  display: flex; flex-direction: column; gap: 0;
}
.hp-timeline-dot {
  position: absolute; left: -1.75rem; top: 0.375rem;
  width: 12px; height: 12px;
  background: #2563EB; border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}
.hp-timeline-year {
  font-size: 0.8125rem; font-weight: 700; color: #2563EB;
  letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.25rem;
}
.hp-timeline-item h4, .hp-timeline-title {
  font-size: 1.125rem; font-weight: 700; color: #0B1220; margin: 0 0 0.5rem;
}
.hp-timeline-desc { font-size: 0.875rem; color: #475569; margin: 0; line-height: 1.7; }
.hp-timeline-item img { border-radius: 0.5rem; margin-top: 0.75rem; max-width: 100%; }

/* ── Testimonial ────────────────────────────────────────────────────────── */
.hp-testimonial {
  background: #fff; border: 1px solid rgba(14,69,119,0.12);
  border-radius: 1.25rem; padding: 2rem; margin: 0;
}
.hp-testimonial__quote {
  font-size: 1rem; line-height: 1.7; font-style: italic; color: #475569; margin: 0 0 1.25rem;
}
.hp-testimonial__footer { display: flex; align-items: center; gap: 0.75rem; }
.hp-testimonial__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.hp-testimonial__name { font-weight: 700; font-size: 0.875rem; color: #0B1220; font-style: normal; display: block; }
.hp-testimonial__role { font-size: 0.8125rem; color: #94A3B8; display: block; }

/* ── Pricing Card ───────────────────────────────────────────────────────── */
.hp-pricing-card {
  background: #fff; border: 1px solid rgba(14,69,119,0.15);
  border-radius: 1.25rem; padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.hp-pricing-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(14,69,119,0.12); }
.hp-pricing-card--featured {
  background: #0E4577; border-color: transparent;
  box-shadow: 0 8px 32px rgba(14,69,119,0.25);
}
.hp-pricing-card__title { font-size: 1.125rem; font-weight: 700; margin: 0 0 1rem; }
.hp-pricing-card--featured .hp-pricing-card__title { color: #fff; }
.hp-pricing-card__price { margin-bottom: 1.25rem; }
.hp-pricing-card__amount { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em; color: #0E4577; }
.hp-pricing-card--featured .hp-pricing-card__amount { color: #60A5FA; }
.hp-pricing-card__period { font-size: 0.875rem; color: #94A3B8; }
.hp-pricing-card--featured .hp-pricing-card__period { color: #93C5FD; }
.hp-pricing-card__features { list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: 0.9375rem; color: #475569; }
.hp-pricing-card--featured .hp-pricing-card__features { color: #BAE6FD; }
.hp-pricing-card__features li { padding: 0.375rem 0; border-bottom: 1px solid rgba(14,69,119,0.08); }
.hp-pricing-card--featured .hp-pricing-card__features li { border-color: rgba(255,255,255,0.1); }
.hp-pricing-card__cta {
  display: block; text-align: center; background: #0E4577; color: #fff;
  border-radius: 9999px; padding: 0.75rem 1.5rem;
  font-weight: 600; font-size: 0.9375rem; text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.hp-pricing-card--featured .hp-pricing-card__cta { background: #2563EB; }
.hp-pricing-card__cta:hover { background: #2563EB; transform: translateY(-1px); text-decoration: none; }

/* ── Editor-only styles ─────────────────────────────────────────────────── */
.hb-smart-gallery-editor .hb-gallery-item img { cursor: default; }
.wp-block[data-type="hoffman/timeline"] { border-left: 2px solid rgba(37,99,235,0.3); padding-left: 1.5rem; }
.wp-block[data-type="hoffman/timeline-item"] { padding-left: 1.5rem; position: relative; margin-bottom: 2rem; }

/* ── Accessibility ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hp-project-card, .hp-pricing-card, .hp-testimonial { transition: none !important; }
}
