/*
 * Bootstrap-free compatibility layer for inner pages.
 *
 * Existing page content and the shortcodes in inc/legacy.php were written for
 * Bootstrap 4 (grid, spacing utilities, form controls, tabs, owl carousels).
 * This file re-creates just those classes on top of the new design so old
 * content keeps its layout without loading Bootstrap or jQuery.
 */

/* Grid */
.container,.container-fluid,.container-xxl{width:100%;margin-inline:auto;padding-inline:var(--gutter,16px)}
.container{max-width:var(--wrap,1200px)}
.page-layout .container,.entry-content .container{padding-inline:0}
.row{display:flex;flex-wrap:wrap;margin-inline:-12px}
.row>*{padding-inline:12px;width:100%;max-width:100%}
.no-gutters{margin-inline:0}.no-gutters>*{padding-inline:0}
[class*="col-"]{position:relative;width:100%;min-height:1px}
.row>[class*="col-"]{padding-inline:12px}
.no-gutters>[class*="col-"]{padding-inline:0}
.col{flex:1 0 0%}
.col-1{flex:0 0 8.333%;max-width:8.333%}.col-2{flex:0 0 16.667%;max-width:16.667%}.col-3{flex:0 0 25%;max-width:25%}.col-4{flex:0 0 33.333%;max-width:33.333%}.col-5{flex:0 0 41.667%;max-width:41.667%}.col-6,.col-xs-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.333%;max-width:58.333%}.col-8{flex:0 0 66.667%;max-width:66.667%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.333%;max-width:83.333%}.col-11{flex:0 0 91.667%;max-width:91.667%}.col-12,.col-xs-12{flex:0 0 100%;max-width:100%}
@media (min-width:576px){.col-sm-3{flex:0 0 25%;max-width:25%}.col-sm-4{flex:0 0 33.333%;max-width:33.333%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-8{flex:0 0 66.667%;max-width:66.667%}.col-sm-12{flex:0 0 100%;max-width:100%}}
@media (min-width:768px){.col-md-2{flex:0 0 16.667%;max-width:16.667%}.col-md-3{flex:0 0 25%;max-width:25%}.col-md-4{flex:0 0 33.333%;max-width:33.333%}.col-md-5{flex:0 0 41.667%;max-width:41.667%}.col-md-6{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.333%;max-width:58.333%}.col-md-8{flex:0 0 66.667%;max-width:66.667%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.333%;max-width:83.333%}.col-md-12{flex:0 0 100%;max-width:100%}.d-md-flex{display:flex!important}.px-md-0{padding-inline:0!important}.px-md-5{padding-inline:3rem!important}.py-md-3{padding-block:1rem!important}.py-md-5{padding-block:3rem!important}.p-md-3{padding:1rem!important}.pt-md-0{padding-top:0!important}}
@media (min-width:992px){.col-lg-2{flex:0 0 16.667%;max-width:16.667%}.col-lg-3{flex:0 0 25%;max-width:25%}.col-lg-4{flex:0 0 33.333%;max-width:33.333%}.col-lg-5{flex:0 0 41.667%;max-width:41.667%}.col-lg-6{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.333%;max-width:58.333%}.col-lg-8{flex:0 0 66.667%;max-width:66.667%}.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-12{flex:0 0 100%;max-width:100%}}
/* Inside the 75% content column, 4-up grids are too tight: drop to 2-up. */
@media (min-width:992px){.entry-content .col-lg-3,.entry-content .col-md-3{flex:0 0 50%;max-width:50%}}
.clear{clear:both}

/* Display / flex / alignment */
.d-block{display:block!important}.d-flex{display:flex!important}.flex-column{flex-direction:column!important}
.align-items-center{align-items:center!important}.align-items-end{align-items:flex-end!important}.align-self-stretch{align-self:stretch!important}
.justify-content-center{justify-content:center!important}
.text-center{text-align:center!important}.text-left{text-align:left!important}
.w-100{width:100%!important}
.img-fluid{max-width:100%;height:auto}
.rounded{border-radius:12px!important}.rounded-circle{border-radius:50%!important}
.relative{position:relative}.absolute{position:absolute}
.font-weight-medium{font-weight:500}
.display-1{font-size:clamp(4rem,10vw,6rem);line-height:1}
.text-primary{color:var(--primary)!important}
.bg-primary{background-color:var(--primary)!important}

/* Spacing utilities used in existing content (0–5 = 0, .25, .5, 1, 1.5, 3rem) */
.m-0{margin:0!important}.mb-0{margin-bottom:0!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}
.mt-1{margin-top:.25rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mr-2{margin-right:.5rem!important}
.p-0{padding:0!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}
.pt-2{padding-top:.5rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pb-5{padding-bottom:3rem!important}.pl-3{padding-left:1rem!important}
.px-2{padding-inline:.5rem!important}.px-4{padding-inline:1.5rem!important}.py-3{padding-block:1rem!important}.py-4{padding-block:1.5rem!important}.py-5{padding-block:3rem!important}

/* Forms used by the [HorizonForm], [SidebarForm], [SimpleForm] and PPC shortcodes */
.form-group{margin-bottom:12px}
.form-control{display:block;width:100%;min-height:48px;padding:12px 14px;font:400 1rem/1.4 var(--sans);color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:12px}
textarea.form-control{min-height:96px;resize:vertical}
.form-control:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(101,71,156,.2)}
.marg-bot{margin-bottom:12px}
.contact-wrap,.heading-section-white{border-radius:var(--r)!important}
.contact-wrap .form-control,.heading-section-white .form-control{border-color:transparent}
.contact-wrap h3,.heading-section-white h4{font-family:var(--serif)}
.btn-lg{min-height:56px;font-size:1rem}
.btn-block{display:flex;width:100%}
input.btn,button.btn{font-family:var(--sans)}
.primary-btn,.site-btn{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:0 28px;border:0;border-radius:999px;background:var(--ink);color:#fff!important;font:600 .95rem/1 var(--sans);text-decoration:none;cursor:pointer;transition:background .2s,transform .2s}
.primary-btn:hover,.site-btn:hover{background:var(--primary-deep);transform:translateY(-1px)}
.contact-wrap .primary-btn,.heading-section-white .primary-btn{background:#fff;color:var(--primary)!important}
.contact-wrap .primary-btn:hover,.heading-section-white .primary-btn:hover{background:var(--primary-light)}
.sidebar-form{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:24px;overflow:hidden}
.sidebar-form .header-form h3{font-size:1.4rem;margin-bottom:16px}
.sidebar-form form::after{content:"";display:table;clear:both}

/* Tabs (graft / surgery calculators) */
.nav{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}
.nav-fill .nav-item{flex:1 1 auto;text-align:center}
.nav-link{display:block;padding:10px 16px;text-decoration:none;color:var(--muted);border-radius:999px;font-weight:600}
.nav-tabs,.nav-pills{gap:6px;margin-bottom:16px}
.nav-link.active,.nav-pills .nav-link.active{background:var(--primary);color:#fff}
.tab-content>.tab-pane{display:none}
.tab-content>.tab-pane.active{display:block}

/* Owl carousels (doctors, reviews) as a CSS scroll-snap strip: no jQuery needed */
.owl-carousel{display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;padding:4px 2px 16px;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.owl-carousel>.item{flex:0 0 min(280px,80%);scroll-snap-align:start}
.owl-carousel img{max-width:100%}
.new-doc-sc-col,#google-reviews .item>div{height:100%;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:20px;text-align:center}
.rel-doc-img{width:140px;height:140px;object-fit:cover;border-radius:50%;margin:0 auto}
.new-doc-sc-col p{text-align:left!important}

/* Bootstrap-style pagination from bootstrap_pagination() */
ul.pagination{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:40px 0 0}
.page-item .page-link{min-width:44px;height:44px;display:inline-grid;place-items:center;padding:0 16px;border-radius:999px;border:1px solid var(--line);text-decoration:none;font-weight:600;background:var(--surface)}
.page-item.active .page-link,.page-item .page-link.current{background:var(--primary);border-color:var(--primary);color:#fff}

/* Old blog cards ([recent_post], [related_post_cat], related posts) */
.blog__item{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;margin-bottom:24px;height:calc(100% - 24px)}
.blog__item__pic img{width:100%;aspect-ratio:16/10;object-fit:cover}
.blog__item__text{padding:18px 20px}
.blog__item__text h5{font-size:1.15rem;margin-bottom:8px}
.blog__item__text h5 a{text-decoration:none}
.blog__item__text p{color:var(--muted);font-size:.92rem}
.blog__item__text ul{list-style:none;padding:0;margin:10px 0 0;display:flex;gap:14px;font-size:.8rem;color:var(--muted)}
.blog__item__text ul img{display:none}

