/* Extra dental sections and footer on the Dr. S. Mutharam page.
   The default layout is a plain readable list. dental-extra.js adds .dx-live to
   switch on the pinned 3D scenes when the screen is large enough. */

.dx { position: relative; padding: clamp(72px, 12vh, 130px) clamp(20px, 5vw, 64px); background: #fff; color: #475569; line-height: 1.7; scroll-margin-top: 76px; }
.dx *, .dx-footer * { box-sizing: border-box; }
.dx-wrap { max-width: 1200px; margin: 0 auto; width: 100%; }
.dx-narrow { max-width: 820px; }
.dx img { max-width: 100%; display: block; }
.dx figure { margin: 0; }
.dx-head { margin-bottom: 44px; max-width: 700px; }
.dx-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #0d9488; margin: 0 0 12px; }
.dx h2 { font-size: clamp(1.9rem, 3.6vw, 3.1rem); font-weight: 800; line-height: 1.1; letter-spacing: -.028em; color: #0f1419; margin: 0; }
.dx h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; color: #0f1419; margin: 0; }
.dx-sub { margin: 16px 0 0; font-size: .98rem; }
.dx-num { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #0ea5a4; margin-bottom: 6px; }
.dx-btn { display: inline-block; padding: 13px 28px; border-radius: 999px; background: #f05265; border: 2px solid #f05265; color: #fff !important; font-size: .88rem; font-weight: 700; text-decoration: none; transition: translate .2s ease, box-shadow .2s ease; }
.dx-btn:hover { translate: 0 -3px; box-shadow: 0 14px 30px -10px rgba(240,82,101,.7); }
.dx-btn.dx-ghost { background: transparent; border-color: rgba(255,255,255,.55); }
.dx-dark { background: radial-gradient(120% 90% at 80% 10%, #0f3b40 0%, #07151a 55%, #05090d 100%); color: #b6c5cc; }
.dx-dark h2 { color: #fff; }
.dx-dark .dx-kicker { color: #5eead4; }

/* ---------- Treatments: flip cards ---------- */
.dx-treat { background: linear-gradient(180deg, #fff 0%, #eef7f7 100%); }
.dx-flips { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.dx-flip { perspective: 1400px; }
.dx-flip-inner { display: grid; height: 100%; min-height: 390px; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,.75,.2,1); }
.dx-face { grid-area: 1 / 1; display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(15,23,42,.38); }
.dx-front { background: #fff; border: 1px solid #dbe7e9; }
.dx-front figure { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; min-height: 220px; }
.dx-front figure img { max-height: 220px; width: auto; border-radius: 12px; }
.dx-front figure + div { padding: 20px 26px 26px; border-top: 1px solid #eef2f6; }
.dx-back { background: linear-gradient(150deg, #0f766e, #07262b); color: #d9f3f0; padding: 32px 28px; gap: 14px; justify-content: center; }
.dx .dx-back h3 { color: #fff; }
.dx-back p { margin: 0; font-size: .9rem; }
.dx-back ul { margin: 0; padding: 0; list-style: none; font-size: .86rem; font-weight: 600; }
.dx-back li { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.dx-back a { color: #fff; font-weight: 700; font-size: .88rem; text-underline-offset: 4px; }
.dx-flip-cta .dx-front { justify-content: center; align-items: center; text-align: center; padding: 34px; gap: 24px; background: linear-gradient(150deg, #fff1f3, #ecfdfa); }
/* mouse and keyboard: turn the card over */
@media (hover: hover) and (pointer: fine) {
  .dx-flip:not(.dx-flip-cta) .dx-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
  .dx-back { transform: rotateY(180deg); }
  .dx-flip:not(.dx-flip-cta):hover .dx-flip-inner,
  .dx-flip:not(.dx-flip-cta):focus-within .dx-flip-inner { transform: rotateY(180deg); }
}
/* touch screens: show both sides, one under the other */
@media not all and (hover: hover) and (pointer: fine) {
  .dx-flip-inner { display: flex; flex-direction: column; min-height: 0; }
  .dx-front figure { min-height: 180px; }
  .dx-face { border-radius: 20px 20px 0 0; }
  .dx-back { border-radius: 0 0 20px 20px; }
  .dx-flip-cta .dx-face { border-radius: 20px; }
}

/* ---------- Journey: static list, then depth tunnel ---------- */
.dx-tunnel { display: grid; gap: 22px; }
.dx-step { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 32px; align-items: center; background: #fff; color: #475569; border-radius: 26px; padding: clamp(22px, 3vw, 40px); box-shadow: 0 40px 80px -30px rgba(0,0,0,.65); }
.dx-step figure { display: flex; justify-content: center; align-items: center; background: #f1f7f8; border-radius: 18px; padding: 18px; height: 100%; }
.dx-step img { max-height: 250px; width: auto; border-radius: 10px; }
.dx-step h3 { font-size: clamp(1.25rem, 2.2vw, 1.8rem); margin-bottom: 12px; }
.dx-step p { margin: 0; }
.dx-meter { display: none; }
@media (max-width: 700px) { .dx-step { grid-template-columns: 1fr; gap: 18px; } }

.dx-journey.dx-live { padding: 0; height: calc(var(--dx-count) * 85vh + 100vh); }
.dx-live .dx-pin { position: sticky; top: 76px; height: calc(100vh - 76px); overflow: hidden; display: flex; align-items: center; padding: 0 clamp(20px, 5vw, 64px); }
.dx-journey.dx-live .dx-head { margin-bottom: 26px; }
.dx-journey.dx-live .dx-tunnel { position: relative; height: min(390px, 52vh); perspective: 1300px; transform-style: preserve-3d; }
.dx-journey.dx-live .dx-step { position: absolute; inset: 0; margin: 0 auto; max-width: 940px; will-change: transform, opacity; }
.dx-journey.dx-live .dx-step img { max-height: min(250px, 36vh); }
.dx-journey.dx-live .dx-meter { display: block; height: 4px; max-width: 940px; margin: 30px auto 0; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; }
.dx-meter i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #5eead4, #f05265); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Gum health: static grid, then cube ---------- */
.dx-gums { background: #f4f8fb; }
.dx-gum-grid { display: grid; gap: 36px; }
.dx-stage-list { display: none; }
.dx-cube { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.dx-side-face { display: flex; flex-direction: column; gap: 12px; padding: 30px 28px; border-radius: 24px; color: #fff; }
.dx .dx-side-face h3 { color: #fff; font-size: 1.35rem; }
.dx-side-face p { margin: 0; font-size: .92rem; }
.dx-big { font-size: 3.6rem; font-weight: 900; line-height: 1; opacity: .35; }
.dx-side-face em { margin-top: auto; align-self: flex-start; font-style: normal; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.18); }
.dx-tone-1 { background: linear-gradient(150deg, #0f766e, #115e59); }
.dx-tone-2 { background: linear-gradient(150deg, #0e7490, #164e63); }
.dx-tone-3 { background: linear-gradient(150deg, #b45309, #78350f); }
.dx-tone-4 { background: linear-gradient(150deg, #be123c, #881337); }

.dx-gums.dx-live { padding: 0; height: 420vh; }
.dx-gums.dx-live .dx-gum-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.dx-gums.dx-live .dx-head { margin-bottom: 24px; }
.dx-gums.dx-live .dx-stage-list { display: block; list-style: none; margin: 0 0 26px; padding: 0; counter-reset: stage; }
.dx-stage-list li { counter-increment: stage; padding: 9px 0 9px 18px; border-left: 3px solid #dbe4ea; font-weight: 700; font-size: .92rem; color: #94a3b8; transition: color .25s, border-color .25s; }
.dx-stage-list li::before { content: counter(stage) ". "; }
.dx-stage-list li.is-on { color: #0f1419; border-left-color: #0ea5a4; }
.dx-gums.dx-live .dx-scene { --dx-size: min(420px, 34vw, 60vh); width: var(--dx-size); height: var(--dx-size); margin: 0 auto; perspective: 1400px; }
.dx-gums.dx-live .dx-cube { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; will-change: transform; }
.dx-gums.dx-live .dx-side-face { position: absolute; inset: 0; justify-content: center; padding: clamp(24px, 2.6vw, 40px); backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 28px; }
.dx-gums.dx-live .dx-side-face em { margin-top: 6px; }
.dx-gums.dx-live .dx-side-face:nth-child(1) { transform: rotateY(0deg) translateZ(calc(var(--dx-size) / 2)); }
.dx-gums.dx-live .dx-side-face:nth-child(2) { transform: rotateY(90deg) translateZ(calc(var(--dx-size) / 2)); }
.dx-gums.dx-live .dx-side-face:nth-child(3) { transform: rotateY(180deg) translateZ(calc(var(--dx-size) / 2)); }
.dx-gums.dx-live .dx-side-face:nth-child(4) { transform: rotateY(270deg) translateZ(calc(var(--dx-size) / 2)); }

/* ---------- Restoration rows ---------- */
.dx-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 84px); align-items: center; padding: 34px 0; }
.dx-rev .dx-visual { order: 2; }
.dx-visual { perspective: 1200px; }
.dx-plate { display: flex; align-items: center; justify-content: center; min-height: 320px; padding: 28px; border-radius: 28px; background: linear-gradient(145deg, #ecfdfa, #f8fafc 60%, #fff1f3); border: 1px solid #e2e8f0; box-shadow: 0 40px 70px -40px rgba(15,23,42,.45); will-change: transform; }
.dx-plate img { max-height: 270px; width: auto; min-width: 190px; object-fit: contain; border-radius: 14px; }
.dx-copy h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin-bottom: 14px; }
@media (max-width: 800px) {
  .dx-row { grid-template-columns: 1fr; }
  .dx-rev .dx-visual { order: 0; }
  .dx-plate { min-height: 240px; }
}

/* ---------- Questions ---------- */
.dx-faq { background: #f4f8fb; }
.dx-faq .dx-head { text-align: center; margin-left: auto; margin-right: auto; }
.dx-q { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; margin-bottom: 14px; box-shadow: 0 10px 26px -18px rgba(15,23,42,.4); }
.dx-q summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 18px; padding: 20px 24px; font-weight: 700; color: #0f1419; }
.dx-q summary::-webkit-details-marker { display: none; }
.dx-q summary::after { content: '+'; color: #0ea5a4; font-size: 1.4rem; line-height: 1; transition: rotate .25s ease; }
.dx-q[open] summary::after { rotate: 45deg; }
.dx-q p { margin: 0; padding: 0 24px 22px; font-size: .94rem; }
.dx-q[open] p { animation: dxAnswer .45s cubic-bezier(.2,.75,.2,1); transform-origin: 50% 0; }
@keyframes dxAnswer { from { opacity: 0; transform: perspective(700px) rotateX(-55deg); } to { opacity: 1; transform: none; } }

/* ---------- Call to action ---------- */
.dx-cta-sec { background: #f4f8fb; padding-top: 20px; }
.dx-cta { text-align: center; padding: clamp(44px, 8vw, 90px) 24px; border-radius: 36px; color: #d9f3f0; background: linear-gradient(130deg, #0f766e 0%, #0b3b43 55%, #4a1526 100%); box-shadow: 0 50px 90px -40px rgba(7,38,43,.75); }
.dx .dx-cta h2 { color: #fff; }
.dx-cta .dx-kicker { color: #99f6e4; }
.dx-cta p { max-width: 560px; margin: 16px auto 0; }
.dx-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }

/* ---------- Footer ---------- */
.dx-footer { position: relative; overflow: hidden; padding: 80px clamp(20px, 5vw, 64px) 28px; background: radial-gradient(90% 70% at 15% 0%, #0f3338 0%, #081216 55%, #05090c 100%); color: #94a8b0; font-size: .86rem; line-height: 1.75; }
.dx-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #0ea5a4, #5eead4 45%, #f05265); }
.dx-cols { display: grid; grid-template-columns: 1.5fr 1.1fr .8fr 1.35fr 1.1fr; gap: 34px; }
.dx-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.dx-col h4 { margin: 0 0 10px; color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.dx-col p { margin: 0 0 6px; }
.dx-col strong { color: #fff; }
.dx-col a:not(.dx-btn) { color: #b9cbd1; text-decoration: none; overflow-wrap: anywhere; transition: color .2s, translate .2s; }
.dx-col a:not(.dx-btn):hover { color: #5eead4; translate: 5px 0; }
.dx-brand img { width: 170px; height: auto; background: #fff; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.dx-col dl { margin: 0 0 12px; }
.dx-col dt { color: #fff; font-weight: 600; }
.dx-col dd { margin: 0 0 10px; }
.dx-word { perspective: 700px; text-align: center; margin: 54px 0 10px; }
.dx-word span { display: block; font-size: clamp(2rem, 8.4vw, 6.8rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; color: transparent; background: linear-gradient(180deg, rgba(94,234,212,.75), rgba(94,234,212,.04)); -webkit-background-clip: text; background-clip: text; transform-origin: 50% 100%; }
.dx-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; }
.dx-base a { color: #5eead4; text-decoration: none; }
@media (max-width: 1100px) { .dx-cols { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .dx-cols { grid-template-columns: 1fr 1fr; } .dx-brand, .dx-cols > :nth-child(4) { grid-column: 1 / -1; } }
