/* blog: buttons to the other Chulatutor sites. The desktop menu never shows them. */
.navlinks .ctbs-sites,.ctbs-hd{display:none}
@media(max-width:650px){
.navlinks.open .ctbs-sites{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:2px 0 12px}
.navlinks.open .ctbs-sites a{display:flex;align-items:center;justify-content:center;min-height:42px;padding:8px 6px;border:0;border-radius:12px;background:#ff2c78;color:#fff;font-size:14px;font-weight:700;line-height:1.2;text-align:center;box-shadow:0 4px 10px rgba(255,44,120,.25)}
.nav{gap:8px}
.ctbs-hd{display:flex;align-items:center;gap:6px;margin-left:auto;min-width:0}
.ctbs-hd a{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 12px;border:0;border-radius:100px;background:#ff2c78;color:#fff;font-size:12px;font-weight:700;line-height:1;white-space:nowrap;box-shadow:0 4px 10px rgba(255,44,120,.28)}
.ctbs-hd a:nth-child(n+2){display:none}
.menu-toggle{flex:none}
}
@media(min-width:400px) and (max-width:650px){.ctbs-hd a:nth-child(2){display:inline-flex}}
@media(min-width:520px) and (max-width:650px){.ctbs-hd a:nth-child(3){display:inline-flex}}
@media(max-width:650px){.ctbs-hd{gap:4px;flex:0 1 auto}.ctbs-hd a{min-height:30px;padding:5px 10px;font-size:11px;flex:0 0 auto}}

/* cards for the parts of an article (made by blocks.js) */
.ctw-block{box-sizing:border-box;width:100%;margin:0 0 12px;padding:26px 28px;background:#fff;border:1px solid #f3e3ea;border-radius:22px;box-shadow:0 10px 26px rgba(40,30,80,.07)}
.ctw-block>*:first-child{margin-top:0}
.ctw-block>*:last-child{margin-bottom:0}
.ctw-block>.elementor-widget:not(:last-child){margin-bottom:14px}
.ctw-block h2,.ctw-block .elementor-heading-title{overflow-wrap:anywhere}
.ctw-block>.elementor-widget-heading h2{position:relative;padding-left:18px;font-size:clamp(20px,2.4vw,26px);line-height:1.35}
.ctw-block>.elementor-widget-heading h2:before{content:"";position:absolute;left:0;top:50%;bottom:auto;height:.95em;width:5px;margin-top:-.475em;border-radius:3px;background:#e0206a}
.ctw-block img{max-width:100%;height:auto;border-radius:14px}
.ctw-block table{max-width:100%}
@media(max-width:700px){.ctw-block{padding:18px 16px;border-radius:18px;margin-bottom:12px}}

.ctw-sub{margin:18px 0;padding:18px 20px;background:#fff8fb;border:1px solid #ffe3ee;border-radius:16px}
.ctw-sub>*:first-child{margin-top:0}
.ctw-sub>*:last-child{margin-bottom:0}
.ctw-sub>h3{position:relative;padding-left:14px;line-height:1.4}
.ctw-sub>h3:before{content:"";position:absolute;left:0;top:.35em;width:6px;height:.9em;border-radius:3px;background:#ff6aa2}
@media(max-width:700px){.ctw-sub{padding:14px 14px}}

/* table of contents: a small pink dot instead of the big black circle icon */
.elementor-toc__list-item-text-wrapper{display:flex;align-items:flex-start}
.elementor-toc__list-item-text-wrapper>i,.elementor-toc__list-item-text-wrapper>svg{flex:none;font-size:8px!important;width:8px!important;height:8px!important;margin:.62em 12px 0 0!important;color:#ff2c78!important;fill:#ff2c78!important}
.elementor-toc__list-item-text-wrapper>i:before{font-size:8px}

/* table of contents and accordion, same look as the main site: Elementor table of contents and accordion drawn in the theme style (soft pink card, no hard frames, no underlines) */
html body .entry-content .elementor-widget-table-of-contents .elementor-widget-container{background:#fff7fa;border:1px solid #ffd3e3!important;border-radius:16px!important;overflow:hidden;box-shadow:0 8px 22px rgba(224,32,106,.06);--toc-body-color:#202c3d;font-family:Prompt,system-ui,sans-serif}
html body .entry-content .elementor-toc__header{padding:16px 22px!important;background:none!important;border:0!important;display:flex;align-items:center;justify-content:space-between}
html body .entry-content .elementor-toc__header-title{margin:0!important;font-size:18px!important;font-weight:700!important;color:#202c3d!important;font-family:Prompt,system-ui,sans-serif}
html body .entry-content .elementor-toc__toggle-button{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#fff;color:#e0206a!important;box-shadow:0 2px 8px rgba(224,32,106,.15);cursor:pointer}
html body .entry-content .elementor-toc__toggle-button svg{width:14px;height:14px;fill:currentColor}
html body .entry-content .elementor-toc__body{padding:4px 22px 18px!important;border-top:1px solid #ffd3e3!important;margin:0}
html body .entry-content .elementor-toc__list-wrapper{margin:0!important;padding:0 0 0 4px!important;list-style:none}
html body .entry-content .elementor-toc__list-wrapper .elementor-toc__list-wrapper{padding-left:20px!important}
html body .entry-content .elementor-toc__list-item{padding:0!important;margin:0!important}
html body .entry-content .elementor-toc__list-item-text-wrapper{padding:6px 0!important;align-items:baseline}
html body .entry-content a.elementor-toc__list-item-text{color:#202c3d!important;text-decoration:none!important;font-size:16px;line-height:1.55;transition:color .2s}
html body .entry-content a.elementor-toc__list-item-text:hover,html body .entry-content a.elementor-toc__list-item-text.elementor-item-active{color:#d81b60!important;text-decoration:none!important}
html body .entry-content .elementor-toc__list-item-text-wrapper:before,html body .entry-content .elementor-toc__list-item-text-wrapper i,html body .entry-content .elementor-toc__list-item-text-wrapper svg{color:#e0206a;fill:#e0206a}
html body .entry-content .elementor-toc__list-item-text-wrapper svg{width:7px;height:7px;margin-right:10px}
html body .entry-content .elementor-widget-table-of-contents ol.elementor-toc__list-wrapper{list-style:none;counter-reset:ctwtoc}
html body .entry-content .elementor-widget-table-of-contents ol>li.elementor-toc__list-item{counter-increment:ctwtoc}
html body .entry-content .elementor-widget-table-of-contents ol>li>.elementor-toc__list-item-text-wrapper:before{content:counters(ctwtoc,".") ".";min-width:2.4em;font-weight:600;font-size:15px;color:#e0206a}
/* accordion */
html body .entry-content .elementor-accordion{display:flex;flex-direction:column;gap:10px}
html body .entry-content .elementor-accordion .elementor-accordion-item{border:1px solid #ffd3e3!important;border-radius:14px;overflow:hidden;background:#fff;transition:box-shadow .2s,border-color .2s}
html body .entry-content .elementor-accordion .elementor-accordion-item:hover{box-shadow:0 8px 20px rgba(224,32,106,.1)}
html body .entry-content .elementor-accordion .elementor-tab-title{display:flex;align-items:center;gap:12px;padding:14px 18px!important;border:0!important;background:#fff7fa;cursor:pointer;margin:0}
html body .entry-content .elementor-accordion .elementor-tab-title.elementor-active{background:#ffeaf2}
html body .entry-content .elementor-accordion .elementor-accordion-icon{order:2;margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:#e0206a;color:#fff!important;flex:none;float:none!important;width:30px!important}
html body .entry-content .elementor-accordion .elementor-accordion-icon svg{width:12px;height:12px;fill:#fff;color:#fff}
html body .entry-content .elementor-accordion a.elementor-accordion-title{order:1;color:#202c3d!important;text-decoration:none!important;font-weight:600;font-size:16px;line-height:1.5;flex:1;min-width:0}
html body .entry-content .elementor-accordion .elementor-tab-title:hover a.elementor-accordion-title,html body .entry-content .elementor-accordion .elementor-tab-title.elementor-active a.elementor-accordion-title{color:#d81b60!important}
html body .entry-content .elementor-accordion .elementor-tab-content{padding:14px 18px 16px!important;border:0!important;border-top:1px solid #ffd3e3!important;background:#fff;font-size:15.5px;line-height:1.7;color:#2b3445}
html body .entry-content .elementor-accordion .elementor-tab-content p{margin:0 0 .5em}

/* the reading time ("อ่าน N นาที") is not shown any more */
.post-hero .post-meta{display:none!important}

/* the blog theme draws its own pink left border on every H2: removed, the pink bar of the card heading stays */
html body .entry-content h2{border-left:0}

/* bar above the header: phone numbers and social links (same as exam.chulatutor.com) */
.ctbs-topbar{background:#fff;border-bottom:1px solid #f0f0f0;font:400 12px/1.4 Prompt,system-ui,sans-serif;color:#78808b}
.ctbs-topbar-in{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:8px;padding-bottom:8px}
.ctbs-ph{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:11.5px}
.ctbs-ph em{font-style:normal}
.ctbs-ph a{color:inherit}
.ctbs-ph a:hover,.ctbs-soc a:hover{color:#E94D8B}
.ctbs-ph small{font-size:inherit;color:inherit}
.ctbs-soc{display:flex;align-items:center;gap:12px;margin-left:auto}
.ctbs-soc a{color:inherit;transition:color .2s}
@media(max-width:700px){.ctbs-topbar-in{justify-content:center}
.ctbs-ph{display:none}
.ctbs-soc{gap:20px;margin-left:0}}

/* same spacing between the cards as between the blocks of the right column (12px): no extra padding or margin from the page builder around them */
[data-ctw-blocks] .e-con{--padding-top:0px;--padding-bottom:0px;--margin-top:0px;--margin-bottom:0px;--row-gap:0px;--gap:0px}
[data-ctw-blocks] .elementor-section,[data-ctw-blocks] .elementor-container,[data-ctw-blocks] .elementor-widget-wrap,[data-ctw-blocks] .elementor-column,[data-ctw-blocks] .elementor-element-populated{padding-top:0!important;padding-bottom:0!important;margin-top:0!important;margin-bottom:0!important}
[data-ctw-blocks] .ctw-block{margin:0 0 12px}

/* the contents box is always open (no fold button) */
.elementor-widget-table-of-contents .elementor-toc__body{display:block!important}
.elementor-widget-table-of-contents .elementor-toc__toggle-button{display:none!important}

/* the contents box already has its own frame: no second frame around it */
.ctw-block:has(>.elementor-widget-table-of-contents:only-child){padding:0;border:0;box-shadow:none;background:none;border-radius:0}

/* Related posts: picture first, the title under it (two lines at most, so every card has the same height); no picture or a broken one = the logo on a soft pink box */
.related-post .post-list .item{display:flex!important;flex-direction:column!important;gap:12px;vertical-align:top}
.related-post .post-list .item .thumb{order:1;margin:0;width:100%}
.related-post .post-list .item .title{order:2;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;margin:0;font-size:16px;line-height:1.5;min-height:3em;overflow-wrap:anywhere}
.related-post .post-list .item .thumb{position:relative;aspect-ratio:1024/730;border-radius:14px;overflow:hidden;background:#fff0f6}
.related-post .post-list .item .thumb>a{display:block;width:100%;height:100%}
.related-post .post-list .item .thumb img{display:block;width:100%;height:100%;object-fit:cover;border-radius:0}
.related-post .post-list .item .thumb.cts-noimg{background:#fff0f6 var(--cts-logo,none) center/38% auto no-repeat}
.related-post .post-list .item .thumb.cts-noimg img{display:none}
.related-post .post-list{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px 22px}
.related-post .post-list .item{width:auto!important;max-width:none!important;margin:0!important;float:none!important;padding:0!important}
@media(max-width:760px){.related-post .post-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 14px}}
@media(max-width:420px){.related-post .post-list{grid-template-columns:minmax(0,1fr)}}

/* captions with a fixed width must not push the page wider than the screen */
.entry-content .wp-caption,.entry-content figure.wp-caption,.cb-content .wp-caption{width:auto!important;max-width:100%!important}.entry-content .wp-caption img,.cb-content .wp-caption img{max-width:100%;height:auto}

/* ---------- main menu with drop-downs (menu.php) ---------- */
.navlinks .ctbs-menu{flex-wrap:nowrap;gap:22px;white-space:nowrap}
.navlinks .ctbs-menu>li>a{display:block;padding:10px 0}
.navlinks .ctbs-menu>li.menu-item-has-children>a:after{content:"";display:inline-block;width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);margin:0 0 3px 7px}
.navlinks .ctbs-menu .sub-menu{max-height:72vh;overflow-y:auto;min-width:210px;z-index:60}
.navlinks .ctbs-menu li.sub-open>.sub-menu{display:flex}
.navlinks .ctbs-menu .sub-menu a{white-space:nowrap}
.navlinks .ctbs-menu .sub-menu a:hover{background:#fff1f6;border-radius:8px;color:var(--pink,#e0206a)}
@media(max-width:1240px){
.navlinks .ctbs-menu{gap:15px;font-size:12.5px}
}
@media(max-width:1120px){
.navlinks{display:none}
.menu-toggle{display:block}
.navlinks.open{display:block;position:absolute;top:68px;left:0;right:0;background:#fff;padding:12px 22px;box-shadow:0 14px 20px #0001;max-height:calc(100vh - 190px);max-height:calc(100dvh - 190px);overflow-y:auto;overscroll-behavior:contain}
.navlinks.open ul{flex-direction:column;align-items:stretch;gap:0;white-space:normal}
.navlinks.open a{display:block;padding:10px;border:0}
.navlinks.open .ctbs-menu .sub-menu{display:none;position:static;box-shadow:none;padding:0 0 4px 14px;max-height:none;min-width:0}
.navlinks.open .ctbs-menu li.sub-open>.sub-menu{display:flex}
.navlinks.open .ctbs-menu li:hover>.sub-menu{display:none}
.navlinks.open .ctbs-menu li.sub-open:hover>.sub-menu{display:flex}
.navlinks.open .ctbs-menu>li.menu-item-has-children>a{display:flex;justify-content:space-between;align-items:center}
.navlinks.open .ctbs-menu li.sub-open>a:after{transform:rotate(-135deg)}
}

/* Accessibility (PageSpeed): text contrast of at least 4.5:1, touch targets of at least 24px */
:root{--pink:#d41a5d;--muted:#5f6877}
.ctbs-topbar,.ctbs-topbar a{color:#5f6877}
.ctbs-hd a,.navlinks.open .ctbs-sites a{background:#d41a5d}
.ctbs-ph a,.ctbs-soc a{display:inline-flex;align-items:center;min-height:24px;padding:2px 4px}
.btn-book{color:#b8134f!important}
.btn-book-red{color:#c40000!important}
.footer-cols a{padding:4px 0;min-height:24px;box-sizing:border-box}
/* the floating share bar sat on top of the 4 buttons of the phone bottom menu (and hid them): it now stands above the menu */
@media(max-width:650px){div.heateor_sss_bottom_sharing{bottom:64px!important;top:auto!important}}
.meta,.page-hero .crumbs,.post-nav small,.cb-card .cb-meta{color:#5f6877}
.related-post .headline,div.related-post div.headline{color:#4d4d4d!important}
.lb-line{color:#007a28}
.review-row .google,.review-brands .google{color:#1a56c2}
.elementor-button-success .elementor-button{background-color:#2e7d32!important;color:#fff!important}
/* the header logo was squeezed into a box of a different proportion (63x57 for a 240x171 picture): kept in proportion */
img.custom-logo{object-fit:contain}

/* article body below the first screen is laid out only when scrolled near (less style/layout work before the first paint) */
.single-post .entry-content > .elementor > :nth-child(n+3){content-visibility:auto;contain-intrinsic-size:auto 1200px}
