/* Article card rhythm, scoped to the site's content, independent of Bootstrap. */
body .teorema-article .related .related-card{display:flex!important;flex-direction:column!important;height:100%!important;padding:0 0 26px!important;color:#193e36!important}
body .teorema-article .related .related-card h3{font:700 clamp(18px,1.45vw,20px)/1.4 Onest,Arial,sans-serif!important;letter-spacing:0!important;min-height:5.6em;height:5.6em;max-height:5.6em;margin:0 24px 20px!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;color:#193e36!important}
body .teorema-article .related .related-card>span:last-child{margin: auto 24px 0!important;font-size:16px!important;line-height:1.5!important;color:#245743!important}
body .teorema-article .related .related-photo{height:230px!important;aspect-ratio:3/2;object-fit:cover;margin:0 0 24px!important;flex:none}
body .teorema-article .related .related-card:hover h3,body .teorema-article .related .related-card:hover>span{color:#0e5341!important}
body .teorema-article .reading-section ul,body .th-home section ul{list-style:none!important;padding:0!important;margin:16px 0 24px!important}
body .teorema-article .reading-section ul li,body .th-home section ul li{list-style:none!important;padding:0!important;margin:0 0 12px!important}
body .teorema-article .reading-section ul li::before,body .th-home section ul li::before{content:'✓';display:inline-block;margin-inline-end:10px;color:#287357;font-weight:700}
/* Native dialog gives keyboard focus containment and an inert background. */
.tm-booking{padding:0!important;border:0!important;border-radius:24px!important;width:min(920px,calc(100vw - 32px));max-width:none;height:min(820px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);color:#193e36;background:#f6f8f3;overflow:hidden;box-shadow:0 20px 80px #123d3640}
.tm-booking[open]{display:flex;flex-direction:column;animation:tm-booking-in .35s ease both}
.tm-booking::backdrop{background:#102d28a8;backdrop-filter:blur(3px)}
.tm-booking-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;background:#e1ebe3;flex:none}
.tm-booking-head h2{font:700 22px/1.3 Onest,Arial,sans-serif!important;margin:0!important;color:#193e36!important}
.tm-booking-close{width:44px;height:44px;flex:none;border:0!important;border-radius:50%;background:#245743!important;color:#fff!important;font-size:28px!important;line-height:1;cursor:pointer}
.tm-booking-frame{display:block;border:0;width:100%;flex:1;min-height:0;background:white}
.tm-booking-status{margin:0;padding:12px 24px;font-size:16px}
.tm-booking-foot{padding:12px 24px;font:400 14px/1.5 Onest,Arial,sans-serif;flex:none}
.tm-booking-foot a{color:#245743!important;text-decoration:underline!important}
.tm-booking :focus-visible{outline:3px solid #ae894a;outline-offset:3px}
@keyframes tm-booking-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@media(max-width:600px){.tm-booking{width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:18px!important}.tm-booking-head{padding:12px 16px}.tm-booking-head h2{font-size:18px!important}.tm-booking-foot{padding:10px 16px}body .teorema-article .related .related-card h3{margin-inline:18px!important}body .teorema-article .related .related-card>span:last-child{margin-inline:18px!important}}
@media(prefers-reduced-motion:reduce){.tm-booking[open]{animation:none}}

/* Editorial refinement 24.09. */
body .teorema-article .breadcrumbs,body .teorema-article .breadcrumbs a,body .teorema-article .breadcrumbs span,body .breadcrumb,body .breadcrumb a{font-size:.7rem!important;line-height:1.5!important;letter-spacing:.02em!important}
body.teorema a:hover,body.teorema a:focus-visible{color:#207349!important}
body.teorema :is(.article-hero,.article-cta,.tm-footer,.th-dark) a:hover,body.teorema :is(.article-hero,.article-cta,.tm-footer,.th-dark) a:focus-visible{color:#bde7a8!important}
body.teorema a.button:hover,body.teorema a.btn:hover,body.teorema .th-home a.th-button:hover{background:#eef5e8!important;color:#207349!important}
body .tm-article-author{display:flex;align-items:center;gap:16px;background:#edf3ec;padding:20px 24px;border-radius:20px;margin:0 0 28px}
body .tm-article-author img{width:64px!important;height:64px!important;object-fit:cover;object-position:50% 20%;border-radius:50%;margin:0!important}
body .tm-article-author span{display:block;font-size:14px;color:#596d61}
body .tm-article-author a{display:block;font-size:16px;font-weight:700;color:#245743!important;text-decoration:underline}
body .breadcrumb *,body .mod-breadcrumbs *{font-size:.7rem!important}
body.teorema :is(.article-hero,.article-cta,.tm-footer,.th-dark) a:is(.button,.btn,.th-btn,.th-button):hover{background:#eef5e8!important;color:#207349!important}
/* Mobile readability and compact tablet header. */
@media(max-width:1199px){body .tc-header .tm-social{display:none!important}}
@media(max-width:767px){
html{font-size:16px!important}
body .teorema-article :is(p,li,td,th,label,summary,small,.eyebrow,.breadcrumbs,.breadcrumbs a,.breadcrumbs span,.help-card a,.tm-article-author span),body .th-home :is(p,li,td,th,label,summary,small,.eyebrow),body .tm-footer :is(p,a),body .tm-booking-foot,body .breadcrumb *{font-size:1rem!important;line-height:1.6!important}
body .teorema-article :is(.button,.btn,.th-text-link),body .tc-header :is(button,.button),body .teorema-article .related-card>span{font-size:1rem!important}
}
body .teorema-article .tm-related-slider{padding:0!important}
body .teorema-article .tm-related-slider>.tm-related-nav{z-index:2}
body .teorema-article .tm-related-slider>.tm-related-nav button{width:64px!important;height:48px!important;border-radius:24px!important;box-shadow:0 3px 12px #123d3630;font-size:28px!important}
body .teorema-article .tm-related-nav .owl-prev{left:-24px!important}
body .teorema-article .tm-related-nav .owl-next{right:-24px!important}
@media(max-width:600px){body .teorema-article .tm-related-slider>.tm-related-nav button{width:48px!important;height:44px!important}body .teorema-article .tm-related-nav .owl-prev{left:-12px!important}body .teorema-article .tm-related-nav .owl-next{right:-12px!important}}
/* Service cards: consistent rows without cropping the text. */
body .th-home .th-services{align-items:stretch}
body .th-home .th-services>.th-card{display:flex!important;flex-direction:column!important;min-width:0}
body .th-home .th-services>.th-card>h3{min-height:2.8em;line-height:1.4!important;margin-bottom:16px!important}
body .th-home .th-services>.th-card>p{min-height:6.4em;line-height:1.6!important;margin-bottom:24px!important}
body .th-home .th-services>.th-card>.th-text-link{margin-top:auto!important}
body .tm-footer-phones{display:flex;flex-direction:column;gap:10px;margin-block:18px;font-size:1rem;line-height:1.5}
body .article-faq .tm-faq-content{display:flow-root;overflow:hidden}
/* Contrast on the pale results panel, including inherited theme colours. */
body .th-home #th-results{background:#dce9df!important;color:#193e36!important}
body .th-home #th-results :is(h2,h3,p,.eyebrow,.th-small,figcaption){color:#193e36!important;opacity:1!important}
body .tc-header a{transition:color .3s ease,background-color .3s ease,box-shadow .3s ease!important}
body .tc-header a:not(.brand):hover,body .tc-header a:not(.brand):focus-visible{box-shadow:inset 0 -2px 0 #287357}
@media(prefers-reduced-motion:reduce){body .tc-header a{transition:none!important}}
body .tc-header .tc-shortcuts a:hover,body .tc-header .tc-shortcuts a:focus-visible{text-decoration:none!important;border-bottom:0!important;box-shadow:none!important}
body.teorema .tc-header a.tc-book,body.teorema .tc-header a.tc-book:hover,body.teorema .tc-header a.tc-book:focus-visible{background:#245743!important;color:#fff!important;text-decoration:none!important;box-shadow:none!important}
body.teorema .tc-header a.tc-book:hover{background:#193e36!important}
body .th-home .th-proof{align-items:stretch}
body .th-home .th-proof>.th-card{display:flex!important;flex-direction:column!important;min-width:0}
body .th-home .th-proof>.th-card>h2{font-size:clamp(24px,2.2vw,30px)!important;line-height:1.35!important;min-height:4.05em}
body .th-home .th-proof>.th-card>p{min-height:8em;line-height:1.6!important}
body .th-home .th-proof>.th-card>.th-text-link{margin-top:auto!important;padding-top:20px}
body .th-home #th-results [data-owl-results]{position:relative}
body .th-home #th-results .owl-nav{position:absolute!important;inset:0!important;display:block!important;margin:0!important;pointer-events:none;z-index:3}
body .th-home #th-results .owl-nav button{position:absolute!important;top:50%!important;transform:translateY(-50%);width:54px!important;height:48px!important;border:0!important;border-radius:24px!important;background:#245743!important;color:white!important;margin:0!important;pointer-events:auto}
body .th-home #th-results .owl-nav .owl-prev{left:0!important;right:auto!important}
body .th-home #th-results .owl-nav .owl-next{right:0!important;left:auto!important}
body.teorema .tm-footer a:hover,body.teorema .tm-footer a:focus-visible{color:#173f39!important}
body .tm-menu-phones{display:flex;flex-direction:column;gap:8px;min-width:0}
body .tm-menu-phones a{white-space:nowrap;font-size:1rem!important;line-height:1.5}
/* Restore the image–title–link layout regardless of inherited card rules. */
body .teorema-article .related .related-card{display:flex!important;flex-flow:column nowrap!important;justify-content:flex-start!important;align-items:stretch!important;overflow:hidden!important;padding:0 0 26px!important}
body .teorema-article .related .related-card>.related-photo{order:-1!important;position:static!important;float:none!important;width:100%!important;max-width:100%!important;height:230px!important;min-height:230px!important;flex:0 0 230px!important;object-fit:cover!important;align-self:stretch!important;margin:0 0 24px!important;border-radius:0!important}
body .teorema-article .related .related-card>h3{order:0!important;flex:0 0 auto!important}
body .teorema-article .related .related-card>span:last-child{order:1!important;position:static!important;float:none!important;margin: auto 24px 0!important;padding:0!important}
body .teorema-article #specialist-certificates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-block:40px}
body .teorema-article #specialist-certificates>h2,body .teorema-article #specialist-certificates>p{grid-column:1/-1;margin:0}
body .teorema-article #specialist-certificates figure{margin:0;padding:12px;background:#edf3ed;border-radius:20px;min-width:0}
body .teorema-article #specialist-certificates img{display:block;width:100%;object-fit:contain;background:white;border-radius:12px}
body .teorema-article #specialist-certificates figcaption{font-size:1rem;line-height:1.5;padding:14px 4px 4px;color:#173f39}
@media(max-width:600px){body .teorema-article #specialist-certificates{grid-template-columns:1fr}}
/* Documents retain their full proportions without letterboxing. */
body .teorema-article #specialist-certificates figure{padding:0!important;align-self:start;overflow:hidden}
body .teorema-article #specialist-certificates figure>a{display:block;line-height:0}
body .teorema-article #specialist-certificates img{width:100%!important;max-height:none!important;object-fit:initial!important;border-radius:0!important;margin:0!important}
body .teorema-article #specialist-certificates figcaption{padding:16px!important}
body .teorema-article:is(.page-127,.page-136,.page-137,.page-138,.page-139,.page-140) .reading-section>figure{background:transparent!important;padding:0!important}
body .teorema-article:is(.page-127,.page-136,.page-137,.page-138,.page-139,.page-140) .reading-section>figure img{width:100%!important;height:560px!important;max-height:none!important;object-fit:cover!important;object-position:50% 20%!important}
@media(max-width:600px){body .teorema-article:is(.page-127,.page-136,.page-137,.page-138,.page-139,.page-140) .reading-section>figure img{height:430px!important}}

/* Override the generic article figure height while retaining natural document proportions. */
body .teorema-article #specialist-certificates figure>a>img{height:auto!important;aspect-ratio:auto!important;object-fit:contain!important}
/* Specialist portraits and uniform document cards. */
body .teorema-article:is(.page-127,.page-136,.page-137,.page-138,.page-139,.page-140) .hero-photo{width:100%;max-width:420px;justify-self:center;margin-inline:auto}
body .teorema-article:is(.page-127,.page-136,.page-137,.page-138,.page-139,.page-140) .hero-photo img{display:block;width:100%!important;height:480px!important;object-fit:cover!important;object-position:center top!important}
body .teorema-article #specialist-certificates figure{height:350px!important;display:flex;flex-direction:column;align-self:stretch}
body .teorema-article #specialist-certificates figure>a{height:250px;flex:0 0 250px;overflow:hidden}
body .teorema-article #specialist-certificates figure>a>img{height:250px!important;width:100%!important;object-fit:cover!important;object-position:center!important}
body .teorema-article #specialist-certificates figcaption{flex:1;overflow:auto;line-height:1.4!important}
body .teorema-article .tm-model-links{margin-top:30px!important}
body .tm-footer,body .tm-footer :is(p,a,span,li,strong){font-weight:700!important}
@media(max-width:600px){body .teorema-article:is(.page-127,.page-136,.page-137,.page-138,.page-139,.page-140) .hero-photo img{height:430px!important}}
body.teorema .button.secondary{--th-button-bg:#edf3ed;background:#edf3ed!important;color:#173f39!important}
body.teorema .button.secondary:hover{background:#d4e5d8!important;color:#173f39!important}
body .th-home .th-proof>.th-card{flex-flow:column nowrap!important}
body .th-home .th-proof>.th-card>img,body .th-home .th-proof>.th-card>picture{order:-2!important;flex-shrink:0!important;margin-bottom:24px!important}
body .th-home .th-proof>.th-card>.eyebrow{order:-1!important}
body .th-home .th-proof>.th-card>h2{order:0!important}
body .th-home .th-proof>.th-card>p{order:1!important}
body .th-home .th-proof>.th-card>.th-text-link{order:2!important}
body .tm-model-links{margin:30px 0 0!important;padding:0!important}
body .th-home #th-model .th-model-frame+.th-text-link{display:inline-block;margin-top:30px!important}
body.teorema .th-home .th-contact a,body.teorema .th-home .th-contact a:hover{color:#fff!important;text-decoration:underline;text-underline-offset:4px}
body .tm-about-gallery .owl-stage{display:flex}
body .tm-about-gallery a{display:block}
body .tm-about-gallery img{width:100%!important;height:300px!important;object-fit:cover!important;border-radius:20px}
body .tm-about-gallery .owl-nav{display:flex;justify-content:space-between;margin-top:20px}
body .tm-about-gallery .owl-nav button{background:#245743!important;color:white!important;border-radius:24px!important;width:54px;height:48px}
html body.teorema .th-home a.button.secondary,html body.teorema a.button.secondary,html body.teorema button.button.secondary{background-color:#edf3ed!important;color:#173f39!important;--th-button-bg:#edf3ed!important}
html body.teorema .th-home a.button.secondary:hover{background-color:#d4e5d8!important;color:#173f39!important}

/* Keep the opened catalog controls aligned with the right container edge. */
body.teorema .tc-top-inner > .tm-menu-phones{margin-left:auto;align-items:flex-end}
body.teorema .tc-top-inner > .tm-menu-phones .tc-phone{margin-left:0}

/* Booking controls retain contrast and position in the catalog and doctor panels. */
html body.teorema .tc-catalog a.button.tc-catalog-book,
html body.teorema .th-home .th-doctor-panel a.button.secondary{background:#245743!important;color:#fff!important;border:1px solid #245743!important;transform:none!important;translate:none!important;transition:background-color .2s ease,color .2s ease!important}
html body.teorema .tc-catalog a.button.tc-catalog-book:is(:hover,:focus-visible,:active),
html body.teorema .th-home .th-doctor-panel a.button.secondary:is(:hover,:focus-visible,:active){background:#173f39!important;color:#fff!important;transform:none!important;translate:none!important}
html body.teorema .tc-catalog :is(a.button,button):hover{transform:none!important;translate:none!important}
html body.teorema .tc-catalog a.button:focus-visible,
html body.teorema .th-home .th-doctor-panel a.button:focus-visible{outline:3px solid #b59b58!important;outline-offset:3px}
@media(max-width:767px){
 html body.teorema .th-home>section:is(#th-center,#th-services,#th-doctors,#th-reviews,#th-results,#th-price,#th-visit,#th-licenses,#th-faq,#th-model,.th-section,.th-tint):not(.th-hero):not(.th-final){box-sizing:border-box;width:calc(100% - 24px)!important;max-width:none!important;margin:16px 12px!important;border:1px solid #93b0a2!important;border-radius:24px!important}
 html body.teorema .th-home>section.th-section{padding:28px 16px!important}
 html body.teorema .th-home>section.th-tint{padding:0!important}
 html body.teorema .th-home>section.th-tint>.th-section{width:100%!important;margin:0!important;padding:28px 16px!important;box-sizing:border-box}
 html body.teorema .th-home .th-heading{margin-bottom:24px!important;gap:16px!important}
 html body.teorema .th-home :is(h2,h3){margin-top:0!important;margin-bottom:16px!important}
 html body.teorema .th-home .th-hero{padding:28px 0 32px!important}
 html body.teorema .teorema-article :is(.related.wrap,.tm-related,.related){border:1px solid #93b0a2!important;border-radius:24px!important;padding:28px 16px!important}
 html body.teorema .teorema-article .reading-section{padding-block:24px!important}
 html body.teorema .teorema-article .reading-section :is(h2,h3){margin-top:28px!important;margin-bottom:16px!important}
}
body.teorema .teorema-article .tm-about-photos>h2{margin-bottom:30px!important}
body.teorema .tm-specialist-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
body.teorema .tm-specialist-grid article{padding:20px;background:#edf3ed;border-radius:24px;min-width:0}
body.teorema .tm-specialist-grid img{width:100%;height:300px!important;object-fit:cover!important;object-position:center top;border-radius:18px}
body.teorema .tm-specialist-grid h2{font-size:22px!important;margin:20px 0!important}
body.teorema .tm-about-gallery a{position:relative;overflow:hidden;border-radius:20px}
body.teorema .tm-about-gallery a::after,.fancybox-slide .fancybox-content:has(img[src*="/images/about-gallery/"])::after{content:'ТЕОРЕМА КРАСОТЫ';position:absolute;bottom:0;left:0;right:0;min-height:13%;display:flex;align-items:center;justify-content:center;background:#173f39;color:#e4d6a0;font-family:Onest,sans-serif;font-size:clamp(12px,1.5vw,20px);font-weight:700;letter-spacing:1px;pointer-events:none;z-index:2;padding:12px;box-sizing:border-box}
@media(max-width:600px){body.teorema .tm-specialist-grid{grid-template-columns:1fr}}
