
/* TLC multilingual headline and RTL layout */

.tlc-cinematic-headline.tlc-localized-hero {
  max-width: min(100%, 16ch);
  overflow: visible;
}

.tlc-cinematic-headline.tlc-localized-hero[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

.tlc-cinematic-headline .tlc-localized-word {
  display: inline-block;
  white-space: nowrap;
  vertical-align: baseline;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

.tlc-cinematic-headline .tlc-localized-piece {
  display: inline-block;
  opacity: 0;
  transform: translateY(15px);
  filter: blur(5px);
  animation: tlc-letter-reveal .65s cubic-bezier(.22,1,.36,1) both;
  animation-delay: var(--letter-delay);
}

.tlc-cinematic-headline.tlc-localized-hero .squiggle path {
  animation: tlc-brush-draw .9s cubic-bezier(.45,0,.2,1)
    var(--tlc-underline-delay,1.6s) both !important;
}

@media(max-width:620px) {
  .tlc-cinematic-headline.tlc-localized-hero {
    font-size: clamp(2.5rem, 9vw, 3.8rem);
    max-width: 100%;
  }
}

@media(prefers-reduced-motion:reduce) {
  .tlc-cinematic-headline .tlc-localized-piece {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }

  .tlc-cinematic-headline.tlc-localized-hero .squiggle path {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* Preserve carousel movement for RTL languages */

html[dir="rtl"] .insurance .wrap,
html[dir="rtl"] .insurance-roll,
html[dir="rtl"] .insurance-belt,
html[dir="rtl"] .insurance-set,
html[dir="rtl"] .review-deck,
html[dir="rtl"] .review-viewport,
html[dir="rtl"] .review-rail {
  direction: ltr !important;
}

html[dir="rtl"] .insurance h2,
html[dir="rtl"] .patient-review h4,
html[dir="rtl"] .patient-review p {
  direction: rtl;
}

/* Keep the footer columns physically consistent */

html[dir="rtl"] footer,
html[dir="rtl"] footer .foot-top,
html[dir="rtl"] footer .foot-cols,
html[dir="rtl"] footer .foot-bottom {
  direction: ltr !important;
}

footer a[href^="tel:"],
footer a[href^="mailto:"],
footer .tlc-footer-address,
footer .tlc-footer-fax-number {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

footer .tlc-footer-address {
  text-align: left !important;
}

html[dir="rtl"] footer .foot-col .label {
  direction: rtl !important;
  text-align: left !important;
}

html[dir="rtl"] footer .foot-bottom p {
  unicode-bidi: plaintext;
}


/* TLC CONNECTED-SCRIPT FLOW START */

/*
 Arabic, Urdu, and Bengali:
 smoothly reveal connected writing instead of
 popping individual words upward.
*/

.tlc-cinematic-headline.tlc-script-flow
.tlc-localized-piece {
  transform: none !important;
  will-change: clip-path, filter;
  animation-duration: 1.2s !important;
  animation-timing-function:
    cubic-bezier(.22, .7, .25, 1) !important;
  animation-fill-mode: both !important;
}

/* Arabic and Urdu: reveal from right to left */

.tlc-cinematic-headline.tlc-script-flow[dir="rtl"]
.tlc-localized-piece {
  animation-name: tlc-connected-reveal-rtl !important;
}

/* Bengali: reveal from left to right */

.tlc-cinematic-headline.tlc-script-flow[dir="ltr"]
.tlc-localized-piece {
  animation-name: tlc-connected-reveal-ltr !important;
}

@keyframes tlc-connected-reveal-rtl {
  0% {
    clip-path: inset(0 0 0 100%);
    filter: blur(3px);
    opacity: .4;
  }
  75% {
    filter: blur(0);
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0 0 0);
    filter: blur(0);
    opacity: 1;
  }
}

@keyframes tlc-connected-reveal-ltr {
  0% {
    clip-path: inset(0 100% 0 0);
    filter: blur(3px);
    opacity: .4;
  }
  75% {
    filter: blur(0);
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0 0 0);
    filter: blur(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tlc-cinematic-headline.tlc-script-flow
  .tlc-localized-piece {
    animation: none !important;
    clip-path: none !important;
    filter: none !important;
    opacity: 1 !important;
    will-change: auto;
  }
}

/* TLC CONNECTED-SCRIPT FLOW END */

/* TLC FULL PHRASE RULES START */

/* No independent animations for Arabic, Urdu or Bengali. */
/* The entire headline is animated by one parent animation. */

.tlc-cinematic-headline.tlc-script-flow.tlc-whole-flow[dir="rtl"] .tlc-localized-piece,
.tlc-cinematic-headline.tlc-script-flow.tlc-whole-flow[dir="ltr"] .tlc-localized-piece,
.tlc-cinematic-headline.tlc-whole-flow .tlc-localized-piece {
  animation: none !important;
  animation-delay: 0s !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  clip-path: none !important;
  will-change: auto !important;
}

/* TLC FULL PHRASE RULES END */

/* TLC JOINED FLOW START */

/* Continuous reveal, matching English headline duration. */

.tlc-cinematic-headline.tlc-joined-flow {
  -webkit-mask-image:
    linear-gradient(to right, transparent 48%, #000 52%);
  mask-image:
    linear-gradient(to right, transparent 48%, #000 52%);

  -webkit-mask-size: 220% 100%;
  mask-size: 220% 100%;

  animation: tlc-joined-rtl 2.225s linear both;
}

/* Bengali reads left to right. */

.tlc-cinematic-headline.tlc-joined-flow[dir="ltr"] {
  -webkit-mask-image:
    linear-gradient(to left, transparent 48%, #000 52%);
  mask-image:
    linear-gradient(to left, transparent 48%, #000 52%);

  animation-name: tlc-joined-ltr;
}

/* Keep all letters connected. */

.tlc-cinematic-headline.tlc-joined-flow
.tlc-joined-phrase {
  display: inline;
  white-space: normal;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}

.tlc-cinematic-headline.tlc-joined-flow
.underline-wrap {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

/* Same animated pink underline. */

.tlc-cinematic-headline.tlc-joined-flow
.squiggle path {
  animation: tlc-brush-draw .9s
    cubic-bezier(.45, 0, .2, 1)
    2s forwards !important;
}

@keyframes tlc-joined-rtl {
  from {
    -webkit-mask-position: 0% 0%;
    mask-position: 0% 0%;
  }
  to {
    -webkit-mask-position: 100% 0%;
    mask-position: 100% 0%;
  }
}

@keyframes tlc-joined-ltr {
  from {
    -webkit-mask-position: 100% 0%;
    mask-position: 100% 0%;
  }
  to {
    -webkit-mask-position: 0% 0%;
    mask-position: 0% 0%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tlc-cinematic-headline.tlc-joined-flow {
    animation: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  .tlc-cinematic-headline.tlc-joined-flow
  .squiggle path {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* TLC JOINED FLOW END */
