/* ============================================================
   Valens Clinic — Updates / blog v2
   Listing: template-updates.php (/updates/)
   Article: single-update.php (/update/slug/)
   Palette synced with header / FAQ / doctor v2
   ============================================================ */

.update-v2 {
  --upd-navy: hsl(218, 55%, 9%);
  --upd-navy-soft: hsl(218, 48%, 14%);
  --upd-text: rgb(22, 36, 59);
  --upd-muted: hsl(218, 15%, 42%);
  --upd-border: hsl(218, 20%, 88%);
  --upd-cyan: rgb(27, 155, 187);
  --upd-cyan-bright: rgb(37, 188, 244);
  --upd-cyan-soft: rgba(27, 155, 187, 0.12);
  --upd-tint: rgb(243, 248, 251);
  --upd-radius: 1.25rem;
  --upd-radius-lg: 1.75rem;
  --upd-shadow: 0 18px 50px rgba(8, 20, 40, 0.12);
  --upd-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --upd-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--upd-text);
  background: #fff;
  font-family: var(--upd-sans);
}

.update-v2 .container-s {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

body.single-update .inner-banner,
body.single-updates .inner-banner,
body.post-type-update .inner-banner,
body.post-type-updates .inner-banner,
body.page-template-template-updates .inner-banner,
body.page-template-template-updates-php .inner-banner {
  display: none !important;
}

body.single-update,
body.single-updates,
body.post-type-update,
body.post-type-updates,
body.page-template-template-updates,
body.page-template-template-updates-php {
  padding-top: 0 !important;
}

/* ---- Buttons ---- */
.update-v2__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.update-v2__btn--primary {
  background: var(--upd-cyan);
  border-color: var(--upd-cyan);
  color: #fff;
}

.update-v2__btn--primary:hover {
  background: rgb(23, 138, 168);
  border-color: rgb(23, 138, 168);
  color: #fff;
}

.update-v2__btn--light {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.update-v2__btn--light:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.update-v2__btn--block {
  width: 100%;
}

.update-v2__btn--block + .update-v2__btn--block {
  margin-top: 0.65rem;
}

/* ---- Hero ---- */
.update-v2__hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--upd-navy) 0%, var(--upd-navy-soft) 58%, hsl(218, 45%, 18%) 100%);
  color: #fff;
  padding: calc(var(--v2-bar-h, 72px) + 2.25rem) 0 2.5rem;
}

.update-v2__hero--listing {
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3rem;
}

.update-v2__hero--article.update-v2__hero--photo {
  min-height: 58vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3rem;
}

.update-v2__hero-media,
.update-v2__hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.update-v2__hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, hsl(218 55% 9% / 0.28) 0%, hsl(218 60% 7% / 0.82) 100%),
    radial-gradient(42rem 22rem at 82% 8%, rgba(37, 188, 244, 0.18), transparent 70%);
}

.update-v2__hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(42rem 22rem at 82% 8%, rgba(37, 188, 244, 0.22), transparent 70%),
    radial-gradient(30rem 18rem at 6% 92%, rgba(27, 155, 187, 0.18), transparent 72%);
}

.update-v2__hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.update-v2__hero-inner--center {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 0.5rem;
}

.update-v2__breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

.update-v2__breadcrumb a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.update-v2__breadcrumb a:hover {
  color: var(--upd-cyan-bright);
}

.update-v2__eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--upd-cyan-bright);
}

.update-v2__title {
  margin: 0;
  font-family: var(--upd-serif);
  font-size: clamp(2rem, 6.2vw, 3.6rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fff;
}

.update-v2__hero--listing .update-v2__title {
  font-size: clamp(2.2rem, 7vw, 4.4rem);
}

.update-v2__lead {
  margin: 1.15rem 0 0;
  max-width: 62ch;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.update-v2__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.68);
}

.update-v2__meta li + li {
  position: relative;
  padding-left: 1.1rem;
}

.update-v2__meta li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--upd-cyan-bright);
  transform: translateY(-50%);
}

/* ---- Listing feed ---- */
.update-v2__feed {
  padding: 2.25rem 0 4.5rem;
  background: #fff;
}

.update-v2__featured {
  display: grid;
  gap: 0;
  overflow: hidden;
  margin-bottom: 1.75rem;
  border: 1px solid var(--upd-border);
  border-radius: var(--upd-radius-lg);
  background: var(--upd-tint);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 30px rgba(8, 20, 40, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.update-v2__featured:hover {
  transform: translateY(-3px);
  box-shadow: var(--upd-shadow);
}

.update-v2__featured-media {
  min-height: 220px;
  background: hsl(218, 20%, 90%);
}

.update-v2__featured-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.update-v2__featured-copy {
  padding: 1.4rem 1.35rem 1.55rem;
}

.update-v2__featured-copy h2 {
  margin: 0.35rem 0 0.7rem;
  font-family: var(--upd-serif);
  font-size: clamp(1.45rem, 3.4vw, 2.05rem);
  font-weight: 500;
  line-height: 1.18;
  color: var(--upd-navy);
}

.update-v2__featured-copy p {
  margin: 0;
  color: var(--upd-muted);
  line-height: 1.65;
  font-size: 0.98rem;
}

.update-v2__read {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--upd-cyan);
}

.update-v2__read::after {
  content: "→";
}

.update-v2__date {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--upd-cyan);
}

.update-v2__grid {
  display: grid;
  gap: 1.15rem;
}

.update-v2__post {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--upd-border);
  border-radius: var(--upd-radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.update-v2__post:hover {
  transform: translateY(-3px);
  border-color: rgba(27, 155, 187, 0.28);
  box-shadow: var(--upd-shadow);
}

.update-v2__post-media {
  aspect-ratio: 16 / 10;
  background: var(--upd-tint);
  overflow: hidden;
}

.update-v2__post-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.update-v2__post:hover .update-v2__post-media img {
  transform: scale(1.04);
}

.update-v2__post-copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1;
}

.update-v2__post-copy h3 {
  margin: 0;
  font-family: var(--upd-serif);
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--upd-navy);
}

.update-v2__post-copy p:not(.update-v2__date) {
  margin: 0;
  color: var(--upd-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.update-v2__post.is-deferred[hidden] {
  display: none !important;
}

.update-v2__more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.25rem;
}

/* ---- Article body ---- */
.update-v2__body {
  padding: 2rem 0 4.5rem;
  background: #fff;
}

.update-v2__layout {
  display: grid;
  gap: 2.25rem;
}

.update-v2__figure {
  margin: 0 0 1.75rem;
  border-radius: var(--upd-radius);
  overflow: hidden;
}

.update-v2__figure img {
  display: block;
  width: 100%;
  height: auto;
}

.update-v2__prose {
  font-family: var(--upd-sans);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--upd-text);
}

.update-v2__prose > *:first-child {
  margin-top: 0;
}

.update-v2__prose p,
.update-v2__prose li,
.update-v2__prose span,
.update-v2__prose div {
  margin: 0 0 1.25em;
  font-family: var(--upd-sans) !important;
  font-size: 1.0625rem !important;
  font-weight: 400 !important;
  line-height: 1.8 !important;
  color: var(--upd-text) !important;
  letter-spacing: 0 !important;
}

.update-v2__prose li {
  margin-bottom: 0.65em;
}

.update-v2__prose .update-v2__dek {
  font-weight: 500 !important;
  color: var(--upd-muted) !important;
}

.update-v2__prose b,
.update-v2__prose strong {
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: 600 !important;
  color: inherit !important;
}

.update-v2__prose em,
.update-v2__prose i {
  font-family: inherit !important;
  font-size: inherit !important;
  font-style: italic;
  font-weight: inherit !important;
}

.update-v2__prose h2,
.update-v2__prose h2 b,
.update-v2__prose h2 strong,
.update-v2__prose h3,
.update-v2__prose h3 b,
.update-v2__prose h3 strong,
.update-v2__prose h4,
.update-v2__prose h4 b,
.update-v2__prose h4 strong {
  font-family: var(--upd-serif) !important;
  color: var(--upd-navy) !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em !important;
}

.update-v2__prose h2,
.update-v2__prose h2 b,
.update-v2__prose h2 strong {
  margin: 2.1em 0 0.7em;
  font-size: 1.7rem !important;
  font-weight: 500 !important;
}

.update-v2__prose h3,
.update-v2__prose h3 b,
.update-v2__prose h3 strong {
  margin: 1.7em 0 0.55em;
  font-size: 1.28rem !important;
  font-weight: 600 !important;
}

.update-v2__prose h4,
.update-v2__prose h4 b,
.update-v2__prose h4 strong {
  margin: 1.5em 0 0.5em;
  font-size: 1.08rem !important;
  font-weight: 600 !important;
}

.update-v2__prose [style] {
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}

.update-v2__prose a {
  color: var(--upd-cyan) !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 155, 187, 0.35);
  font-size: inherit !important;
}

.update-v2__prose ul,
.update-v2__prose ol {
  margin: 0 0 1.5em;
  padding-left: 1.2rem;
}

.update-v2__prose img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

.update-v2__quote,
.update-v2__prose blockquote {
  margin: 2rem 0;
  padding: 1.4rem 1.35rem;
  border: 0;
  border-left: 3px solid var(--upd-cyan);
  border-radius: 0 var(--upd-radius) var(--upd-radius) 0;
  background: var(--upd-tint);
}

.update-v2__quote p,
.update-v2__prose blockquote p {
  margin: 0 !important;
  font-family: var(--upd-serif) !important;
  font-size: 1.28rem !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  color: var(--upd-navy) !important;
}

.update-v2__quote footer,
.update-v2__prose blockquote footer,
.update-v2__prose blockquote cite {
  display: block;
  margin-top: 0.85rem;
  font-family: var(--upd-sans);
  font-size: 0.82rem;
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--upd-muted);
}

.update-v2__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--upd-border);
}

.update-v2__back,
.update-v2__copy {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--upd-muted);
  text-decoration: none;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.update-v2__copy {
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--upd-border);
  border-radius: 999px;
  background: #fff;
}

.update-v2__back:hover,
.update-v2__copy:hover,
.update-v2__copy.is-copied {
  color: var(--upd-cyan);
}

.update-v2__copy.is-copied {
  border-color: var(--upd-cyan);
  background: var(--upd-cyan-soft);
}

/* ---- Sidebar ---- */
.update-v2__aside {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}

.update-v2__card {
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--upd-border);
  border-radius: var(--upd-radius);
  background: #fff;
}

.update-v2__card-label {
  margin: 0 0 0.95rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--upd-cyan);
}

.update-v2__card-label--light {
  color: var(--upd-cyan-bright);
}

.update-v2__toc {
  background: var(--upd-tint);
  border-color: rgba(27, 155, 187, 0.18);
}

.update-v2__toc-list,
.update-v2__more-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.update-v2__toc-list li {
  margin-bottom: 0.7rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.update-v2__toc-list a {
  color: var(--upd-text);
  text-decoration: none;
}

.update-v2__toc-list a:hover {
  color: var(--upd-cyan);
}

.update-v2__more-list li + li {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--upd-border);
}

.update-v2__more-list a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--upd-navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

.update-v2__more-list small {
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--upd-muted);
}

.update-v2__contact {
  background: linear-gradient(160deg, var(--upd-navy) 0%, hsl(218, 45%, 18%) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--upd-shadow);
}

.update-v2__contact-copy {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.76);
}

/* ---- Desktop ---- */
@media (min-width: 768px) {
  .update-v2 .container-s {
    padding-left: 24px;
    padding-right: 24px;
  }

  .update-v2__hero--listing {
    min-height: 48vh;
    padding-bottom: 4rem;
  }

  .update-v2__hero--article.update-v2__hero--photo {
    min-height: 64vh;
    padding: calc(var(--v2-bar-h, 72px) + 3rem) 0 3.5rem;
  }

  .update-v2__featured {
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }

  .update-v2__featured-media,
  .update-v2__featured-media img {
    min-height: 100%;
    height: 100%;
  }

  .update-v2__featured-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.1rem 2rem;
  }

  .update-v2__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
  }

  .update-v2__feed {
    padding-top: 2.75rem;
  }

  .update-v2__body {
    padding-top: 3rem;
  }
}

@media (min-width: 992px) {
  .update-v2__layout {
    grid-template-columns: minmax(0, 1fr) 20.5rem;
    gap: 3.25rem;
    align-items: start;
  }

  .update-v2__aside {
    position: sticky;
    top: calc(var(--v2-bar-h, 72px) + 1.35rem);
  }

  .update-v2__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .update-v2__prose {
    font-size: 1.08rem;
  }
}

/* ---- Small phones ---- */
@media (max-width: 479px) {
  .update-v2__hero {
    padding-top: calc(var(--v2-bar-h, 72px) + 1.5rem);
    padding-bottom: 2rem;
  }

  .update-v2__hero--listing,
  .update-v2__hero--article.update-v2__hero--photo {
    min-height: 0;
  }

  .update-v2__title {
    font-size: clamp(1.85rem, 9vw, 2.35rem);
  }

  .update-v2__featured-copy,
  .update-v2__post-copy,
  .update-v2__card {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .update-v2__btn {
    width: 100%;
  }
}
