/*
 * Older page templates (About, Contact, Live Demo, Blogs, Success Stories, Newsletter, Glossary, Privacy, Calculator…):
 * fixes so they line up and read like the new designs. Loaded by template-parts/old-page-base.php; every rule is scoped
 * to body.cd-old (and a cd-page-* class for page-specific fixes) so it beats each template's own inline styles.
 *
 * Shared measures (the same as the new header bar):
 *   content column  = clamp(1152px, 85%, 1280px) wide, 40px side padding
 *   brand orange    = #ff5e1a (hover #e8470f), ink #151515, muted #5f534c
 */
body.cd-old{--op-col:clamp(1152px,85%,1280px);--op-orange:#ff5e1a;--op-orange-2:#e8470f;--op-ink:#151515;--op-muted:#5f534c;color:var(--op-ink)}

/* Primary buttons: the new design's orange button (same size, radius and weight as .cd-button). */
body.cd-old :is(.btn,.btn-video,.contact-button,.submit-btn,.cta-button,.cta-btn,.primary-btn,.hero-btn,.book-btn){display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:11px 22px;border:1px solid transparent;border-radius:8px;background:var(--op-orange);color:#fff;font-size:15px;font-weight:600;letter-spacing:0;line-height:1.3;text-decoration:none;box-shadow:none;transition:background .15s ease-out,transform .15s ease-out}
body.cd-old :is(.btn,.btn-video,.contact-button,.submit-btn,.cta-button,.cta-btn,.primary-btn,.hero-btn,.book-btn):hover{background:var(--op-orange-2);color:#fff;transform:translateY(-1px)}
body.cd-old :is(.btn,.btn-video,.contact-button,.submit-btn,.cta-button,.cta-btn,.primary-btn,.hero-btn,.book-btn) svg path{fill:currentColor}

/* Headings: new-design weight and tighter tracking (colours stay per section, some sit on dark bands). */
body.cd-old main :is(h1,h2),body.cd-old>section :is(h1,h2){font-weight:700;letter-spacing:-.02em}

/* ---------- About Us ---------- */
body.cd-page-about-us .buttons-container{margin-bottom:0}
body.cd-page-about-us .btn-video{margin-bottom:91px}
body.cd-page-about-us .rpa-heading{color:var(--op-ink);font-weight:700}
body.cd-page-about-us .rpa-statistics p{font-size:15px;line-height:1.6;color:var(--op-muted);font-weight:400}
body.cd-page-about-us :is(.left-column,.right-column,.bottom-text){padding:22px 24px;border:1px solid #f3e4da;border-radius:14px;background:#fff8f5}
/* Vision / Mission and Core Values sat narrower / wider than the rest of the page: back on the shared column. */
body.cd-page-about-us .vm-container{max-width:var(--op-col)}
body.cd-page-about-us .core-values-section{padding:80px calc((100% - min(100%, var(--op-col))) / 2 + 40px)}
body.cd-page-about-us .cv-container{max-width:none}
body.cd-page-about-us .consultation-section{padding-block:40px 80px}

/* Old templates set body letter-spacing (0.8px–1px); the new designs use the font's own spacing. */
body.cd-old{letter-spacing:normal}

/* ---------- Blogs, Success Stories, Newsletter (listing pages) ---------- */
/* Intro, featured row and grid sat 60px wider than the header: back on the shared column. */
body.cd-old :is(.blog-intro-section,.featured-posts-section,.blog-grid-section){width:100%;max-width:var(--op-col);margin-inline:auto;padding-inline:40px}
body.cd-old .blog-intro h1{letter-spacing:-.03em}
body.cd-old .blog-intro p{max-width:46em;color:var(--op-muted);font-size:17px;line-height:1.65}
body.cd-old .search-input{border:1px solid #f0dfd4;border-radius:10px;font-family:inherit}

/* ---------- Privacy Policy ---------- */
/* Hero: the new pages' light hero (white into a soft orange glow) instead of the old dark band. */
body.cd-page-privacy-policy .privacy-policy .hero{min-height:0;padding:72px 40px 64px;background:linear-gradient(180deg,#fff 40%,#fff0e6 100%);color:var(--op-ink)}
body.cd-page-privacy-policy .privacy-policy .hero h1{font-size:44px;line-height:1.25;letter-spacing:-.03em;color:var(--op-ink)}
body.cd-page-privacy-policy .privacy-policy .policy-content{padding:56px 0 88px;background:#fff8f5}
body.cd-page-privacy-policy .privacy-policy .privacy-container{max-width:var(--op-col);padding:0 40px;background:transparent}
body.cd-page-privacy-policy .privacy-policy .policy-content article{padding:48px 56px;border:1px solid #f3e4da;border-radius:20px;background:#fff;font-size:16px;color:#3d3430}
body.cd-page-privacy-policy .privacy-policy .policy-content h2{font-size:28px;letter-spacing:-.02em;margin:40px 0 14px}
body.cd-page-privacy-policy .privacy-policy .policy-content :is(h2,h3,h4):first-child{margin-top:0}
body.cd-page-privacy-policy .privacy-policy .policy-content h3{font-size:20px;margin:28px 0 10px}
body.cd-page-privacy-policy .privacy-policy .policy-content :is(h2,h3,h4){color:var(--op-ink)}
body.cd-page-privacy-policy .privacy-policy .policy-content a{color:#df4504}
/* A WordPress block style squeezed these sub-headings to a 10px line height, so wrapped lines overlapped. */
body.cd-page-privacy-policy .wp-block-group__inner-container h3{line-height:1.35}
@media (max-width:767px){
    body.cd-page-privacy-policy .privacy-policy .hero{padding:48px 20px 40px}
    body.cd-page-privacy-policy .privacy-policy .hero h1{font-size:32px}
    body.cd-page-privacy-policy .privacy-policy .privacy-container{padding:0 16px}
    body.cd-page-privacy-policy .privacy-policy .policy-content article{padding:28px 20px}
}

/* ---------- Contact Us ---------- */
body.cd-page-contact-us .contact-title{font-size:40px;letter-spacing:-.03em}
body.cd-page-contact-us .contact-subtitle{color:var(--op-muted);font-size:16px;margin-bottom:36px;text-wrap:balance}
/* Form / email / WhatsApp switch: soft rounded tiles instead of heavy black squares. */
body.cd-page-contact-us .contact-tabs{gap:14px}
body.cd-page-contact-us .tab-btn{width:76px;height:52px;padding:0;border:1px solid #eadcd2;border-radius:12px;background:#fff;display:grid;place-items:center;transition:border-color .15s,background .15s}
body.cd-page-contact-us .tab-btn:hover{border-color:var(--op-orange)}
body.cd-page-contact-us .tab-btn .e-n-tab-icon svg{width:24px;height:24px}
body.cd-page-contact-us .tab-btn .e-n-tab-icon svg path{fill:#3d3430}
body.cd-page-contact-us .tab-btn.active{border-color:var(--op-orange);background:var(--op-orange)}
body.cd-page-contact-us .tab-btn.active .e-n-tab-icon svg path{fill:#fff}
/* Fields: the new contact form's boxed inputs (the floating labels sit on the white field background). */
body.cd-page-contact-us .connect-section :is(input,textarea){padding:15px 16px;border:1px solid #eadcd2;border-radius:10px;background:#fff;font-weight:500;letter-spacing:0;transition:border-color .15s}
body.cd-page-contact-us .connect-section :is(input,textarea):focus{border-color:var(--op-orange)}
body.cd-page-contact-us .connect-section label{left:12px;padding:0 4px;color:#7a6a60;font-weight:500}
body.cd-page-contact-us .submit-btn{width:100%;min-height:50px;font-size:16px}
body.cd-page-contact-us .submit-btn a{color:#fff}

/* ---------- Book a meeting (online-meeting, scheduler plugin) ---------- */
/* The scheduler plugin's blue accent becomes the brand orange; the card gets breathing room under the header. */
body.cd-old{--wpts-color-primary:#ff5e1a;--wpts-color-primary-light:#fff0e9;--wpts-color-primary-dark:#e8470f}
body.cd-page-online-meeting [class*="min-h-[calc(100dvh-56px)]"]{padding-block:56px 72px}

/* One font everywhere: some old pages also load Bootstrap, whose system-font stack would otherwise win. */
body.cd-old{--bs-body-font-family:'Miranda Sans',Arial,sans-serif;--bs-font-sans-serif:'Miranda Sans',Arial,sans-serif;font-family:'Miranda Sans',Arial,sans-serif}
body.cd-old :is(h1,h2,h3,h4,h5,h6,button,input,select,textarea,label){font-family:inherit}

/* ---------- Efficiency calculator ---------- */
/* The calculator's blue accent becomes the brand orange, and its panel sits on the shared column. */
body.cd-page-calculator{--primary-color:#ff5e1a;--primary-light:#fff0e9;--primary-dark:#e8470f}
body.cd-page-calculator .calculator-container{max-width:calc(var(--op-col) - 80px);margin:48px auto 72px;border:1px solid #f3e4da;border-radius:20px;background:linear-gradient(180deg,#fff,#fff8f5);box-shadow:none}
@media (max-width:1231px){body.cd-page-calculator .calculator-container{margin-inline:40px}}
@media (max-width:767px){body.cd-page-calculator .calculator-container{margin:32px 16px 48px;padding:24px 18px}}

/* ---------- Single blog / newsletter / success story ---------- */
/* The article sat 22px inside the header edge, and the post text was squeezed beside a wide newsletter box. */
body.cd-old .blog-container{width:100%;max-width:var(--op-col);margin-inline:auto;padding:64px 40px 72px}
body.cd-old .single-post .post-title{font-size:44px;line-height:1.2;letter-spacing:-.03em;margin-block:14px 18px}
@media (min-width:1024px){
    body.cd-old .single-post .split{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:56px;align-items:start}
    body.cd-old .single-post .newsletter-signup{position:sticky;top:110px}
}
body.cd-old .single-post .post-content{font-size:17px;line-height:1.75;color:#3d3430}
body.cd-old .single-post .post-content :is(h2,h3){color:var(--op-ink);line-height:1.3;margin:1.6em 0 .6em}
body.cd-old .single-post .post-content a{color:#df4504}
body.cd-old .newsletter-signup{border:1px solid #f3e4da;border-radius:20px;background:#fff8f5}
body.cd-old .newsletter-form input{border:1px solid #eadcd2;border-radius:10px;font-family:inherit}
body.cd-old .subscribe-button{border-radius:10px;background:var(--op-orange);color:#fff;font-family:inherit;transition:background .15s}
body.cd-old .subscribe-button:hover{background:var(--op-orange-2)}
@media (max-width:767px){
    body.cd-old .blog-container{padding:40px 16px 48px}
    body.cd-old .single-post .post-title{font-size:30px}
}
