/*
 * SenseDent Editorial Luxury
 * A calm, magazine-led visual layer built from the clinic identity.
 */

:root {
  --sd-editorial-teal: #00a992;
  --sd-editorial-teal-deep: #087f76;
  --sd-editorial-navy: #073c4d;
  --sd-editorial-coral: #ea776f;
  --sd-editorial-paper: #fbfaf7;
  --sd-editorial-mint: #e8f7f3;
  --sd-editorial-rose: #fff0ed;
  --sd-editorial-rule: rgba(7, 60, 77, .12);
  --sd-editorial-shadow: 0 28px 70px rgba(7, 60, 77, .09);
}

body {
  background:
    radial-gradient(circle at 8% 18%, rgba(0, 169, 146, .035), transparent 21rem),
    radial-gradient(circle at 92% 62%, rgba(234, 119, 111, .025), transparent 24rem),
    var(--bg-page);
}

/* Official CBAHI accreditation lockup beside the SenseDent identity. */
.brand-wrap .brand-identity { display: none !important; }
.sd-accreditation-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 132px;
  padding-inline-start: 13px;
  border-inline-start: 1px solid var(--border-soft);
}
.sd-cbahi-logo {
  display: block;
  flex: 0 0 auto;
  width: 88px;
  height: auto;
  max-height: 39px;
  object-fit: contain;
}
.sd-accreditation-copy {
  display: flex;
  flex-direction: column;
  width: 130px;
  color: var(--sd-editorial-navy);
  line-height: 1.18;
  text-align: center;
}
.sd-accreditation-copy strong {
  font-size: .61rem;
  font-weight: 850;
  white-space: nowrap;
}
.sd-accreditation-copy small {
  color: var(--text-muted);
  font-size: .53rem;
  font-weight: 750;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .sd-accreditation-copy { display: none; }
  .sd-cbahi-logo { width: 82px; }
  .sd-accreditation-mark { min-width: 0; padding-inline-start: 10px; }
}

@media (max-width: 640px) {
  .header-vip > .container { gap: 10px; }
  .brand-wrap { gap: 8px; }
  .brand-wrap .logo img { width: auto; height: 36px; max-width: 112px; }
  .sd-cbahi-logo { width: 67px; max-height: 30px; }
  .sd-accreditation-mark { padding-inline-start: 7px; }
}

@media (max-width: 380px) {
  .brand-wrap .logo img { max-width: 100px; }
  .sd-cbahi-logo { width: 58px; }
  .sd-accreditation-mark { padding-inline-start: 5px; }
}

/* Newspaper-inspired identity highlights — deliberately selective. */
.vip-heading span,
.sd-archive-hero .vip-heading span {
  color: var(--sd-editorial-navy);
  padding-inline: .06em;
  background-image: linear-gradient(
    to top,
    rgba(0, 169, 146, .20) 0,
    rgba(0, 169, 146, .20) 30%,
    transparent 30%
  );
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.posts-section .vip-heading span,
.magic-reviews-section .vip-heading span {
  background-image: linear-gradient(
    to top,
    rgba(234, 119, 111, .20) 0,
    rgba(234, 119, 111, .20) 30%,
    transparent 30%
  );
}

.section-kicker {
  letter-spacing: .015em;
}

.section-kicker::before {
  width: 32px;
  background: linear-gradient(90deg, var(--sd-editorial-teal), var(--sd-editorial-coral));
}

/* Editorial cards */
.service-card-vip,
.home-offer-card,
.post-card,
.review-card,
.doctor-card {
  border-color: rgba(7, 60, 77, .09);
}

.post-card {
  position: relative;
  isolation: isolate;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 36px rgba(7, 60, 77, .055);
}

.post-card::after {
  content: "";
  position: absolute;
  inset-inline-start: 22px;
  inset-block-end: 0;
  width: 46px;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--sd-editorial-teal), var(--sd-editorial-coral));
  transition: width .28s ease;
}

.post-card:hover::after { width: 88px; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 22px 52px rgba(7, 60, 77, .10); }
.post-image { position: relative; }
.post-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 60, 77, .14), transparent 50%);
  pointer-events: none;
}
.post-meta { display: inline-flex; align-items: center; gap: 7px; }
.post-meta::before { content: ""; width: 18px; height: 1px; background: var(--sd-editorial-coral); }
.post-copy h2,
.post-copy h3 { font-weight: 850; letter-spacing: -.012em; }

@media (min-width: 992px) {
  .posts-section .sd-grid { grid-template-columns: 1.22fr .89fr .89fr; }
  .posts-section .post-card:first-child .post-image { height: 246px; }
  .posts-section .post-card:first-child .post-copy h3 { font-size: 1.26rem; }
}

/* Doctor imagery: branded gallery backdrop for transparent portraits. */
.doctor-card {
  position: relative;
  isolation: isolate;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 16px 42px rgba(7, 60, 77, .07);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.doctor-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 169, 146, .24);
  box-shadow: 0 26px 62px rgba(7, 60, 77, .12);
}

.doctor-photo,
.strict-img-box {
  isolation: isolate;
  background:
    radial-gradient(circle at 16% 18%, rgba(234, 119, 111, .18) 0 9%, transparent 9.5%),
    radial-gradient(circle at 83% 22%, rgba(0, 169, 146, .17) 0 13%, transparent 13.5%),
    linear-gradient(145deg, #effaf7 0%, #f8fbfa 56%, #fff3ef 100%);
}

.doctor-photo { position: relative; }

.doctor-photo::before,
.strict-img-box::before,
.sd-doctor-profile-visual::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 190px;
  height: 105px;
  inset-inline-start: 24px;
  inset-block-start: 25px;
  background-image: var(--sd-brand-mark);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: .075;
  filter: saturate(.7);
  pointer-events: none;
}

.doctor-photo::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset-inline-end: 20px;
  inset-block-end: 18px;
  width: 42px;
  height: 2px;
  border-radius: 2px;
  background: var(--sd-editorial-coral);
  box-shadow: -14px 6px 0 rgba(0, 169, 146, .62);
}

.doctor-photo img { position: relative; z-index: 2; }

/*
 * Keep every hero portrait in the same frame. The slides must remain absolute;
 * making them relative stacks hidden portraits below one another and lets the
 * image layer cover the doctor's title.
 */
.strict-slide {
  position: absolute !important;
  inset: 0 !important;
  width: 100%;
  height: 100%;
}
.strict-slide img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding-top: 12px;
  object-fit: contain;
  object-position: center bottom;
}
.strict-slide .slide-caption {
  z-index: 4;
}

.doctor-copy {
  position: relative;
  padding: 23px 24px 25px;
  border-top: 1px solid rgba(7, 60, 77, .07);
}

.doctor-copy::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 24px;
  width: 3px;
  height: 42px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(var(--sd-editorial-teal), var(--sd-editorial-coral));
}

.doctor-copy h2,
.doctor-copy h3 {
  margin: 0 0 6px;
  color: var(--text-dark);
  font-size: 1.12rem;
  font-weight: 850;
  line-height: 1.55;
  letter-spacing: -.012em;
}
.doctor-copy p { font-size: .92rem; }
.doctor-rank {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--sd-editorial-teal-deep);
  font-size: .72rem;
  font-weight: 800;
}
.doctor-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--sd-editorial-navy);
  font-size: .82rem;
  font-weight: 850;
}
.doctor-profile-link i { color: var(--sd-editorial-teal); transition: transform .2s ease; }
.doctor-card:hover .doctor-profile-link i { transform: translateX(-4px); }

/* Article masthead and long-form reading experience. */
.sd-editorial-page { padding-top: 72px; }
.sd-editorial-page .container { width: min(1080px, calc(100% - 32px)); }
.sd-editorial-page .sd-article {
  position: relative;
  max-width: 960px;
  overflow: hidden;
  padding: clamp(28px, 5.5vw, 64px);
  border: 1px solid rgba(7, 60, 77, .10);
  border-radius: 30px;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(0,169,146,.08) calc(100% - 1px)),
    rgba(255, 255, 255, .94);
  box-shadow: var(--sd-editorial-shadow);
}

.sd-editorial-page .sd-article::before {
  content: "";
  position: absolute;
  inset-inline-start: -44px;
  inset-block-start: -52px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(0, 169, 146, .11);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(234, 119, 111, .025), 0 0 0 54px rgba(0, 169, 146, .018);
  pointer-events: none;
}

.sd-article-header { position: relative; z-index: 1; }
.sd-article-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--sd-editorial-rule);
}
.sd-article-eyebrow .section-kicker { margin: 0; }
.sd-article-issue {
  color: var(--text-muted);
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .02em;
}
.sd-article-header h1 {
  max-width: 820px;
  margin: 28px 0 18px;
  color: var(--sd-editorial-navy);
  font-size: clamp(2.15rem, 5.2vw, 4.2rem);
  font-weight: 850;
  line-height: 1.28;
  letter-spacing: -.035em;
}
.sd-article-header h1::after {
  content: "";
  display: block;
  width: 88px;
  height: 7px;
  margin-top: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(0,169,146,.25), rgba(234,119,111,.32));
}
.sd-article-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-muted); font-size: .82rem; }
.sd-article-meta span { display: inline-flex; align-items: center; gap: 7px; }
.sd-article-meta i { color: var(--sd-editorial-teal-deep); }

.sd-article-cover {
  position: relative;
  margin: 34px 0 36px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--sd-editorial-mint);
  box-shadow: 0 18px 44px rgba(7, 60, 77, .09);
}
.sd-article-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: inherit;
  box-shadow: inset 0 -80px 80px rgba(7,60,77,.08);
  pointer-events: none;
}
.sd-article-cover img { display: block; width: 100%; max-height: 520px; margin: 0; object-fit: cover; border-radius: 0; }

.sd-editorial-quote,
.sd-article-content blockquote {
  position: relative;
  margin: 38px 0 44px;
  padding: 30px clamp(26px, 5vw, 48px) 27px;
  overflow: hidden;
  border: 0;
  border-inline-start: 4px solid var(--sd-editorial-teal);
  border-radius: 4px 18px 18px 4px;
  background:
    linear-gradient(115deg, rgba(0,169,146,.105), rgba(255,255,255,.88) 62%),
    var(--sd-editorial-paper);
  color: var(--sd-editorial-navy);
  box-shadow: 0 14px 36px rgba(7,60,77,.055);
}
.sd-editorial-quote::before,
.sd-article-content blockquote::before {
  content: "“";
  position: absolute;
  inset-inline-start: 18px;
  inset-block-start: -18px;
  color: rgba(234,119,111,.24);
  font-family: Georgia, serif;
  font-size: 7rem;
  line-height: 1;
}
.sd-editorial-quote p,
.sd-article-content blockquote p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  font-weight: 750;
  line-height: 1.9;
}
.sd-editorial-quote cite {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  color: var(--sd-editorial-teal-deep);
  font-size: .76rem;
  font-style: normal;
  font-weight: 850;
}

.sd-editorial-page .sd-article-content {
  max-width: 780px;
  margin-inline: auto;
  color: #304b55;
  font-size: clamp(1.02rem, 1.3vw, 1.1rem);
  line-height: 2.1;
}
.sd-article-content > p:first-child { font-size: 1.08em; color: var(--text-dark); }
.sd-article-content h2 {
  display: table;
  position: relative;
  margin: 2.35em 0 .8em;
  padding: 0 .06em .04em;
  color: var(--sd-editorial-navy);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 850;
  line-height: 1.55;
  letter-spacing: -.02em;
  background-image: linear-gradient(to top, rgba(0,169,146,.16) 0 24%, transparent 24%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.sd-article-content h2:nth-of-type(3n + 2) {
  background-image: linear-gradient(to top, rgba(234,119,111,.15) 0 24%, transparent 24%);
}
.sd-article-content h3 { margin-top: 1.8em; color: var(--sd-editorial-navy); font-weight: 850; }
.sd-article-content a:not(.sd-inline-cta) {
  color: var(--sd-editorial-teal-deep);
  text-decoration: underline;
  text-decoration-color: rgba(0,169,146,.28);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.sd-article-content ul,
.sd-article-content ol { padding-inline-start: 1.25rem; }
.sd-article-content li { margin-block: .42em; }
.sd-article-content li::marker { color: var(--sd-editorial-teal); }

.sd-key-points {
  position: relative;
  margin: 34px 0 42px;
  padding: 26px clamp(24px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(0,169,146,.14);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(232,247,243,.9), rgba(255,255,255,.96));
}
.sd-key-points::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 70px;
  inset-inline-end: 16px;
  inset-block-start: 14px;
  background: var(--sd-brand-mark) center/contain no-repeat;
  opacity: .055;
}
.sd-key-points h2 { margin-top: 0; background-image: none; }

.sd-article-content table {
  width: 100%;
  margin: 30px 0 38px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--sd-editorial-rule);
  border-radius: 16px;
  font-size: .91rem;
  line-height: 1.75;
}
.sd-article-content th,
.sd-article-content td { padding: 14px 16px; border: 0; border-bottom: 1px solid var(--sd-editorial-rule); }
.sd-article-content th { background: var(--sd-editorial-navy); color: #fff; font-weight: 800; }
.sd-article-content tr:nth-child(even) td { background: rgba(232,247,243,.45); }
.sd-article-content tr:last-child td { border-bottom: 0; }
.sd-faq {
  margin-top: 28px;
  padding: 8px 26px;
  border: 1px solid var(--sd-editorial-rule);
  border-radius: 20px;
  background: rgba(251,250,247,.78);
}
.sd-faq h3 { padding-top: 18px; border-top: 1px solid var(--sd-editorial-rule); }
.sd-faq h3:first-child { border-top: 0; }

/* Dedicated doctor profile */
.sd-doctor-profile-page { padding-block: 70px 96px; }
.sd-doctor-profile-card {
  display: grid;
  grid-template-columns: minmax(330px, .88fr) minmax(0, 1.12fr);
  max-width: 1120px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(7,60,77,.10);
  border-radius: 30px;
  background: rgba(255,255,255,.95);
  box-shadow: var(--sd-editorial-shadow);
}
.sd-doctor-profile-visual {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 16%, rgba(234,119,111,.22) 0 11%, transparent 11.5%),
    radial-gradient(circle at 83% 28%, rgba(0,169,146,.20) 0 17%, transparent 17.5%),
    linear-gradient(150deg, #eaf8f4, #f7fbfa 54%, #fff0ec);
}
.sd-doctor-profile-visual::before { width: 235px; height: 130px; inset: 48px auto auto 38px; opacity: .09; }
.sd-doctor-profile-visual::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(transparent, rgba(7,60,77,.16));
  pointer-events: none;
}
.sd-doctor-profile-visual img { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.sd-profile-seal {
  position: absolute;
  z-index: 3;
  inset-inline-start: 26px;
  inset-block-end: 25px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 999px;
  background: rgba(7,60,77,.78);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}
.sd-doctor-profile-copy { align-self: center; padding: clamp(34px, 6vw, 74px); }
.sd-doctor-profile-copy h1 {
  margin: 4px 0 14px;
  color: var(--sd-editorial-navy);
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  font-weight: 850;
  line-height: 1.38;
  letter-spacing: -.03em;
}
.sd-doctor-specialty {
  display: inline;
  margin: 0;
  color: var(--sd-editorial-teal-deep);
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.9;
  background-image: linear-gradient(to top, rgba(0,169,146,.15) 0 28%, transparent 28%);
}
.sd-doctor-bio { margin-top: 27px; }
.sd-doctor-bio:empty { display: none; }
.sd-doctor-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 34px; }

[data-theme="dark"] .post-card,
[data-theme="dark"] .doctor-card,
[data-theme="dark"] .sd-editorial-page .sd-article,
[data-theme="dark"] .sd-doctor-profile-card { background: rgba(23,37,43,.96); }
[data-theme="dark"] .sd-editorial-page .sd-article-content { color: var(--text-body); }
[data-theme="dark"] .sd-editorial-quote,
[data-theme="dark"] .sd-article-content blockquote,
[data-theme="dark"] .sd-key-points,
[data-theme="dark"] .sd-faq { background: rgba(27,43,49,.92); }

@media (max-width: 991px) {
  .clinic-hero .hero-copy { order: 1; }
  .clinic-hero .strict-img-box { order: 2; }
  .sd-doctor-profile-card { grid-template-columns: 1fr; max-width: 720px; }
  .sd-doctor-profile-visual { min-height: 560px; }
  .sd-doctor-profile-copy { padding: 38px; }
}

@media (max-width: 767px) {
  .sd-editorial-page { padding-top: 34px; }
  .sd-editorial-page .sd-article { padding: 26px 20px 36px; border-radius: 24px; }
  .sd-article-eyebrow { align-items: flex-start; flex-direction: column; gap: 8px; }
  .sd-article-header h1 { margin-top: 22px; font-size: clamp(2rem, 9.2vw, 3.1rem); line-height: 1.34; }
  .sd-article-meta { gap: 9px 15px; }
  .sd-article-cover { margin: 28px 0; border-radius: 18px; }
  .sd-editorial-quote,
  .sd-article-content blockquote { margin: 28px 0 34px; padding: 26px 22px; }
  .sd-editorial-page .sd-article-content { font-size: 1rem; line-height: 2; }
  .sd-article-content h2 { margin-top: 2em; }
  .sd-article-content table { display: block; overflow-x: auto; white-space: nowrap; }
  .sd-doctor-profile-page { padding-block: 34px 70px; }
  .sd-doctor-profile-card { border-radius: 24px; }
  .sd-doctor-profile-visual { min-height: 470px; }
  .sd-doctor-profile-copy { padding: 30px 24px 36px; }
  .sd-doctor-actions > a { flex: 1 1 160px; }
}

@media (max-width: 480px) {
  .sd-editorial-page .container,
  .sd-doctor-profile-page .container { width: min(100% - 20px, 1180px); }
  .sd-article-issue { display: none; }
  .sd-article-cover img { min-height: 230px; }
  .sd-doctor-profile-visual { min-height: 410px; }
  .doctor-photo::before { width: 150px; height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .doctor-card,
  .post-card,
  .post-card::after { transition: none; }
}
