/* Site polish (2026-11-07): Thai-safe wrapping, even section rhythm, readable text on photos.
   Loaded after ccf52dd43.css. Content-independent: no fixed heights/widths tied to one title.
   Webflow IX inline styles are left alone on purpose. */

/* Section rhythm = the template's .empty-space scale (130 / 88 / 64 / 40). */
:root { --re-space: 130px; }
@media screen and (max-width: 991px) { :root { --re-space: 88px; } }
@media screen and (max-width: 767px) { :root { --re-space: 64px; } }
@media screen and (max-width: 479px) { :root { --re-space: 40px; } }

/* ---------- Thai wrapping ----------
   Thai has no spaces; the browser breaks at dictionary word boundaries. "anywhere"/"break-all" let it split
   inside a word, so only allow a forced break when a single run (URL, email) cannot fit. */
body { word-break: normal; overflow-wrap: break-word; hyphens: none; }
.hero-heading, .hero-sub-title, .hero-text, .counter-text,
.re-footer-contact-line, .re-footer-contact-note { overflow-wrap: break-word; }
.blog-description-wrap > h2, .blog-description h1, .blog-description h2, .blog-description h3,
.blog-description p, .blog-details-summary { word-break: normal !important; overflow-wrap: break-word; }
h1, h2, h3, h4, .section-heading, .page-hero-heading, .hero-sub-title, .service-title, .accordion-tittle { text-wrap: balance; }
p, li, .hero-text, .service-text, .re-footer-contact-note { text-wrap: pretty; }

/* ---------- Section spacing ---------- */
/* Stray spacer left between the last section and the footer (blog, blog-post, 404): the footer has its own. */
.main > .empty-space { display: none; }
/* Team block on about-us started straight after the previous section's spacer (half the usual gap). */
.about-team-section { padding-top: var(--re-space); }
/* Index blog list sat 28px under the FAQ block instead of a full spacer. */
.blog-section { padding-top: var(--re-space) !important; }
/* Pricing: the quote form followed the plans with a 50px gap (the sections between them are switched off). */
.pricing-section + .contact-section { padding-top: var(--re-space); }
/* 404 used a 220px bottom padding instead of the spacer scale. */
._404-section { padding-bottom: var(--re-space); }

/* ---------- Text on photos ---------- */
/* Service cards: title + description sit on the photo; keep the dark band under the text longer. */
.service-image-overlay {
    background-image: linear-gradient(rgba(22, 58, 105, .92) 0%, rgba(22, 58, 105, .82) 38%, rgba(22, 58, 105, 0) 62%, rgba(22, 58, 105, .9) 100%);
}
.service-title, .service-text { text-shadow: 0 1px 2px rgba(10, 30, 45, .45); }

/* ---------- Media ---------- */
img { max-width: 100%; }
.service-image, .contact-image, .about-page-image, .blog-image, .project-image { object-fit: cover; }

/* ---------- Buttons / cards: longer EN strings wrap instead of overflowing ---------- */
.button, .w-button, .button-text, .pill-button { max-width: 100%; }
.pill-button { white-space: normal; }

/* ---------- Rich text (CMS content: blog posts, license, about, changelog) ----------
   Makes saved content look like it does in the editor. */
/* The global h3 rule is white (for dark sections), which hid rich-text H3s on white. */
.w-richtext h3, .w-richtext h4, .w-richtext h5, .w-richtext h6 { color: var(--primary-color, #163A69); }
.w-richtext table { border-collapse: collapse; width: 100%; margin: 16px 0 24px; }
.w-richtext th, .w-richtext td { border: 1px solid #d7dfe9; padding: 10px 12px; text-align: left; vertical-align: top; line-height: 1.6; }
.w-richtext thead th, .w-richtext tr:first-child th { background: #F4F8FF; font-weight: 600; }
@media screen and (max-width: 767px) {
    .w-richtext table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
/* body has line-height 100%, which cramps Thai list items. */
.w-richtext li { line-height: 1.75; margin-bottom: .4em; }

/* ---------- Rich-text layout blocks (inserted from the editor; markup contract: rt-media, rt-highlight, rt-cols-2, rt-figure) ---------- */
.w-richtext .rt-media, .w-richtext .rt-cols-2, .w-richtext .rt-figure, .w-richtext .rt-highlight { margin: 32px 0; }
.w-richtext .rt-media { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); gap: 32px; align-items: center; }
.w-richtext .rt-media-right { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
.w-richtext .rt-media-right .rt-media__img { order: 2; }
/* Webflow caps rich-text figures at 60% and .blog-description img carries a large bottom margin; blocks size their own media. */
.w-richtext .rt-media__img, .w-richtext .rt-figure { max-width: none; width: 100%; margin-left: 0; margin-right: 0; }
.w-richtext .rt-media__img { margin-top: 0; margin-bottom: 0; }
.w-richtext .rt-media__img img, .w-richtext .rt-figure img { display: block; width: 100%; height: auto; margin: 0; border-radius: 16px; object-fit: cover; }
.w-richtext .rt-media__body > :first-child, .w-richtext .rt-cols-2 > div > :first-child { margin-top: 0 !important; }
.w-richtext .rt-media__body > :last-child, .w-richtext .rt-cols-2 > div > :last-child { margin-bottom: 0 !important; }
.w-richtext .rt-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.w-richtext .rt-figure figcaption { margin-top: 10px; text-align: center; font-size: 14px; line-height: 1.6; color: #4A5A70; }
/* Callouts: text colours keep >= 4.5:1 on their tint. */
.w-richtext .rt-highlight { background: #EAF2FC; border-left: 4px solid #2868BE; border-radius: 12px; padding: 18px 22px; color: #163A69; }
.w-richtext .rt-highlight--warn { background: #FFF5E0; border-left-color: #D98A00; color: #5C3B00; }
.w-richtext .rt-highlight--success { background: #E8F6EE; border-left-color: #1E8E4F; color: #14532D; }
.w-richtext .rt-highlight p, .w-richtext .rt-highlight li { color: inherit !important; }
.w-richtext .rt-highlight p { margin: 0 0 .6em !important; }
.w-richtext .rt-highlight > :last-child { margin-bottom: 0 !important; }
.w-richtext .rt-media p, .w-richtext .rt-cols-2 p, .w-richtext .rt-highlight p { line-height: 1.7 !important; }
@media screen and (max-width: 767px) {
    .w-richtext .rt-media, .w-richtext .rt-media-right, .w-richtext .rt-cols-2 { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .w-richtext .rt-media-right .rt-media__img { order: 0; }
}
