/*
Theme Name: Optipharm
Theme URI: https://www.optipharm.co.ke
Author: Optipharm
Description: Corporate theme for Optipharm (Optipharm Therapeutics and Optipharm Healthcare). Converted from the approved static prototype. Includes demo content, a secure enquiry form with spam protection, and legacy .html redirects.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: Proprietary
Text Domain: optipharm
*/

/* ---- Base (from approved prototype) ---- */

:root{--blue:#12679a;--deep:#0d4d73;--green:#16815d;--mint:#eaf7f2;--sky:#eef7fb;--ink:#173142;--muted:#607582;--line:#dce7ec;--white:#fff;--bg:#f8fbfc}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,Arial,Helvetica,sans-serif;color:var(--ink);background:var(--white);line-height:1.65}a{color:inherit;text-decoration:none}.container{width:min(1160px,92%);margin:auto}
header{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.97);border-bottom:1px solid var(--line);backdrop-filter:blur(10px)}
.nav{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:10px;min-width:185px}.mark{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,var(--blue),var(--green));color:#fff;font-weight:900;font-size:22px}.brand strong{display:block;font-size:20px;letter-spacing:-.5px;color:var(--deep)}.brand small{display:block;font-size:9px;letter-spacing:2.3px;font-weight:800;color:var(--green)}
nav{display:flex;align-items:center;gap:15px;font-size:12px;font-weight:750}nav a{padding:8px 0;white-space:nowrap}nav a:hover{color:var(--green)}.nav-partnerships{color:var(--green);font-weight:900;position:relative}.nav-partnerships:after{content:"";position:absolute;left:0;right:0;bottom:1px;height:2px;background:linear-gradient(90deg,var(--green),var(--blue))}.ask,.btn{display:inline-flex!important;align-items:center;justify-content:center;border-radius:999px;padding:11px 17px!important;font-weight:850}.ask,.primary{background:var(--green);color:#fff!important}.secondary{border:1px solid var(--line);background:#fff;color:var(--deep)}
.hero{padding:90px 0 84px;background:radial-gradient(circle at 90% 20%,#dff3ea,transparent 35%),linear-gradient(125deg,#f6fbfd,#edf8f4)}.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:65px;align-items:center}.kicker,.section-kicker{font-size:11px;letter-spacing:2.2px;font-weight:900;color:var(--green)}h1{font-size:clamp(46px,6vw,78px);line-height:1.01;letter-spacing:-3px;margin:12px 0 20px;color:var(--deep)}h2{font-size:clamp(31px,4vw,46px);line-height:1.1;letter-spacing:-1.5px;color:var(--deep);margin:10px 0 18px}h3{line-height:1.2;color:var(--deep)}.lead{font-size:19px;color:var(--muted);max-width:800px}.hero-copy p{font-size:19px;color:var(--muted);max-width:680px}.buttons{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}.hero-art{min-height:390px;border-radius:34px;background:linear-gradient(145deg,#0e557c,#15906a);position:relative;overflow:hidden;box-shadow:0 25px 60px rgba(13,77,115,.16)}.hero-art:before{content:"";position:absolute;width:330px;height:330px;border:1px solid rgba(255,255,255,.24);border-radius:50%;top:-85px;right:-65px}.hero-art:after{content:"";position:absolute;width:220px;height:220px;border:1px solid rgba(255,255,255,.18);border-radius:50%;bottom:-80px;left:-60px}.art-card{position:absolute;left:35px;right:35px;bottom:35px;padding:24px;border-radius:22px;background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.18)}.art-card strong{display:block;font-size:22px;margin-bottom:6px}
section{padding:76px 0}.soft{background:var(--bg)}.mint{background:var(--mint)}.center{text-align:center}.center .lead{margin-left:auto;margin-right:auto}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:35px}.card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:27px;box-shadow:0 8px 24px rgba(20,65,90,.035)}.card p{color:var(--muted);font-size:14px;margin-bottom:0}.num{font-size:12px;font-weight:900;color:var(--green);letter-spacing:1px}.wide{grid-column:span 2}.split{display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:start}.list{display:grid;gap:12px;margin-top:22px}.list div{padding:15px 17px;border-left:3px solid var(--green);background:#fff;border-radius:0 12px 12px 0}.path{display:flex;flex-wrap:wrap;gap:8px;margin-top:28px}.path span{padding:10px 13px;background:#fff;border:1px solid var(--line);border-radius:999px;font-size:12px;font-weight:800}.alert{border:1px solid #cfe4ee;border-left:5px solid var(--blue);background:#f6fbfd;border-radius:15px;padding:20px;margin-top:24px}.academy{margin-top:35px;padding:28px;border-radius:24px;background:linear-gradient(135deg,var(--deep),var(--green));color:#fff}.academy strong{letter-spacing:1px}.academy p{max-width:820px;color:#e7f4ef}.footer{background:#103d58;color:#dcebf2;padding:55px 0 20px}.foot-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:35px}.footer h4{color:#fff;margin-top:0}.footer a{display:block;font-size:13px;margin:7px 0;color:#dcebf2}.foot-brand{font-size:23px;font-weight:900;color:#fff}.foot-brand small{font-size:9px;letter-spacing:2px;margin-left:6px;color:#8fd2b7}.copyright{border-top:1px solid rgba(255,255,255,.15);margin-top:35px;padding-top:18px;font-size:11px;color:#aac4d0}
.pagehero{padding:70px 0;background:linear-gradient(120deg,#f6fbfd,#eef8f4)}.pagehero p{max-width:820px;color:var(--muted);font-size:18px}.section-title{margin-top:0}
.formbox{max-width:800px;padding:30px;background:#fff;border:1px solid var(--line);border-radius:22px}.field{margin:14px 0}.field label{display:block;font-size:12px;font-weight:850;margin-bottom:6px}.field input,.field textarea,.field select{width:100%;padding:13px;border:1px solid #cbdbe3;border-radius:11px;font:inherit}.field textarea{min-height:145px}.note{font-size:12px;color:var(--muted)}
@media(max-width:1050px){nav{gap:10px;font-size:11px}.nav-partnerships:after{display:none}.hero-grid,.split{grid-template-columns:1fr}.hero-art{min-height:300px}.cards{grid-template-columns:repeat(2,1fr)}.foot-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.nav{min-height:68px}.brand{min-width:0}.brand strong{font-size:18px}nav a:not(.ask){display:none}.nav{justify-content:space-between}nav{display:flex}.hero{padding:60px 0}h1{letter-spacing:-2px}.cards{grid-template-columns:1fr}.wide{grid-column:auto}.foot-grid{grid-template-columns:1fr}section{padding:58px 0}.hero-art{min-height:270px}}

/* Unified navigation: accessible mobile menu without javascript */
@media(max-width:700px){.nav{align-items:flex-start;flex-direction:column;padding:14px 0}.nav nav{display:flex;flex-wrap:wrap;gap:6px 13px}.nav nav a:not(.ask){display:inline-flex!important;white-space:normal;font-size:12px}.nav nav .ask{font-size:11px}}
/* Unified Optipharm identity */
.brand small{font-size:9px;letter-spacing:1.1px}.entity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin-top:34px}.entity-card{background:white;border:1px solid var(--line);border-radius:25px;overflow:hidden;box-shadow:0 12px 30px rgba(20,65,90,.07);display:flex;flex-direction:column}.entity-art{min-height:170px;padding:28px;display:flex;align-items:flex-end;color:white}.entity-art.health{background:linear-gradient(135deg,#12679a,#54a8ca)}.entity-art.therap{background:linear-gradient(135deg,#12694e,#49a984)}.entity-art span{font-size:38px;font-weight:900;letter-spacing:-1.2px}.entity-body{padding:30px;display:flex;flex:1;flex-direction:column}.entity-body p{color:var(--muted)}.entity-body .btn{align-self:flex-start;margin-top:auto}.unified-hero{padding:75px 0 90px;background:linear-gradient(130deg,#f0f8fc,#f1f9f4)}.unified-hero h1{font-size:clamp(52px,8vw,100px);letter-spacing:-4px}.unified-hero .lead{max-width:730px}.entity-tag{font-size:11px;letter-spacing:1.8px;font-weight:900;color:var(--green)}@media(max-width:700px){.entity-grid{grid-template-columns:1fr}.unified-hero h1{letter-spacing:-2px}.entity-art{min-height:120px}}
.corporate-mark{width:42px;height:42px;display:block;flex-shrink:0}.brand small{letter-spacing:.35px;font-size:8px;max-width:235px}@media(max-width:700px){.brand small{font-size:7px}}

html{scroll-behavior:smooth}#healthcare-contact{scroll-margin-top:24px}

.contact-highlight{border-top:5px solid var(--green);background:linear-gradient(135deg,#eaf7f2,#eef7fb)!important}
.contact-highlight .container{max-width:950px;padding:20px 0}
.contact-highlight h2{margin-top:8px}
.contact-status{padding:16px 20px;background:white;border:1px solid #cbdbe3;border-radius:14px;max-width:760px}
.pagehero .buttons .btn{box-shadow:0 8px 24px rgba(15,93,75,.16)}
@media(max-width:700px){.pagehero .buttons .btn{width:100%}}

.healthcare-bottom-cta{display:block!important;background:#e8f4f1!important;padding:52px 18px!important;text-align:center;border-top:3px solid #177f69}
.healthcare-bottom-cta .container{max-width:900px;margin:auto}
.healthcare-bottom-cta h2{margin:0 0 12px;color:#104f47;font-size:clamp(24px,3vw,34px)}
.healthcare-bottom-cta p{font-size:17px;margin:0 auto 24px;max-width:670px}
a.healthcare-contact-button{display:inline-block!important;background:#147c68!important;color:#fff!important;padding:16px 27px!important;border-radius:9px!important;font-size:17px!important;font-weight:700!important;text-decoration:none!important;min-height:50px}
a.healthcare-contact-button:hover,a.healthcare-contact-button:focus{background:#0b5a4c!important;outline:3px solid #a2dfcf}
@media(max-width:700px){a.healthcare-contact-button{width:100%;box-sizing:border-box;text-align:center}}
.shared-optipharm-details,.business-enquiry{max-width:760px;margin:20px 0;padding:20px 24px;background:#fff;border:1px solid #d3e3e5;border-radius:12px}.shared-optipharm-details h3,.business-enquiry h3{margin:0 0 12px}.shared-optipharm-details p{margin:8px 0}
/* ---- About ---- */
.about-intro{padding:54px 0 58px}
.about-intro h1{font-size:clamp(34px,4.5vw,55px);letter-spacing:-1.8px;max-width:900px}
.about-intro .lead{max-width:850px;margin-bottom:12px}
.about-intro .container{max-width:1160px}
/* Corporate promise stays directly beneath the About introduction. */
.about-promise{margin-top:30px;padding:4px 0 4px 22px;border-left:5px solid var(--green);display:flex;flex-direction:column;gap:2px;line-height:1.2;font-weight:850;font-size:clamp(27px,3.3vw,42px);letter-spacing:-.8px}
.about-promise span:first-child{color:var(--deep)}
.about-promise span:last-child{color:var(--green)}
/* ---- Contact form ---- */
#enquiry-form form{display:grid;gap:10px}
#enquiry-form label{font-weight:700;margin-top:8px}
#enquiry-form input,#enquiry-form select,#enquiry-form textarea{width:100%;box-sizing:border-box;padding:12px;border:1px solid #a6bac2;border-radius:8px;font:inherit;background:white}
#enquiry-form button{padding:14px;border-radius:8px;background:#246f65;color:white;border:0;font-weight:700}
#enquiry-form button:disabled{opacity:.6;cursor:not-allowed}
/* ---- Home ---- */

.unified-hero{padding:35px 0 56px;background:linear-gradient(125deg,#f8fcfd,#f3faf6)}
.home-top{display:flex;align-items:center;justify-content:center;gap:17px;margin:0 auto 20px}.home-mark{width:77px;height:77px;object-fit:contain}.home-top h1{font-size:clamp(36px,5vw,57px);margin:0;color:#143f67;letter-spacing:-2px}.home-tagline{font-size:13px;letter-spacing:.7px;color:#315e73;margin:0}.home-prompt{text-align:center;font-size:clamp(24px,3vw,34px);margin:12px 0 0}.home-sub{text-align:center;color:#526c78;margin:0 0 22px}.home-choices{display:grid;grid-template-columns:1fr 1fr;gap:22px}.choice{background:#fff;border:1px solid #d7e5e8;border-radius:22px;padding:24px 26px 28px;display:flex;flex-direction:column;align-items:flex-start;min-height:350px;box-shadow:0 12px 30px #16445b0d}.distribution{border-top:6px solid #19845e}.healthcare{border-top:6px solid #176ca7}.choice-heading{font-size:clamp(19px,2.4vw,28px);font-weight:900;letter-spacing:-.6px;color:#166143;margin-bottom:13px}.healthcare .choice-heading{color:#135e9c}.choice-logo{width:100%;max-width:370px;height:142px;object-fit:contain;object-position:left center}.choice p{color:#435d6b;font-size:16px;max-width:450px;line-height:1.6;margin:10px 0 20px}.choice-btn{margin-top:auto;color:white!important;font-weight:800;border-radius:40px;padding:12px 22px}.choice-btn.green{background:#14764e}.choice-btn.blue{background:#126b9d}@media(max-width:720px){.home-top{justify-content:flex-start}.home-mark{width:55px;height:55px}.home-choices{grid-template-columns:1fr}.choice{min-height:0}.choice-logo{height:110px}.unified-hero{padding:24px 0 42px}}

/* ---------- WordPress adaptations ---------- */
.skip-link{position:absolute;left:-9999px;top:0;background:#fff;color:var(--deep);padding:10px 16px;z-index:100;font-weight:800}
.skip-link:focus{left:8px;top:8px}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.page-logo{display:block;height:auto;margin:22px 0}
.page-logo-healthcare{width:min(440px,85%)}
.page-logo-therapeutics{width:min(380px,85%)}
.page-photo{padding:44px 0 0}
.page-photo img{display:block;width:100%;max-height:460px;object-fit:cover;border-radius:22px}
.entry-plain{padding:60px 0}
.entry-plain .container{max-width:860px}
.form-hp{position:absolute!important;left:-9999px!important;height:0;width:0;overflow:hidden}
.enquiry-notice{padding:14px 18px;border-radius:12px;margin:0 0 14px;font-size:15px}
.enquiry-notice.is-success{background:#eaf7f2;border:1px solid #9fd4bd;color:#0f5a40}
.enquiry-notice.is-error{background:#fdf0ef;border:1px solid #e3b1ac;color:#8a2b22}
#enquiry-form .cf-turnstile{margin:6px 0}
.footer a:focus-visible{outline-color:#fff}
.alignleft{float:left;margin-right:1em}.alignright{float:right;margin-left:1em}.aligncenter{display:block;margin:auto}
.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* ---------- v1.1: builder, options, widgets ---------- */
.brand-compact{min-width:0}
.choice.no-logo{min-height:0}
.cards-btn{margin-top:30px}
.cards.cols-2{grid-template-columns:repeat(2,1fr)}
@media(min-width:1051px){.cards.cols-4{grid-template-columns:repeat(4,1fr)}}
@media(max-width:700px){.cards.cols-2{grid-template-columns:1fr}}
section.sp-no-top{padding-top:0}
section.sp-no-bottom{padding-bottom:0}
section.sp-none{padding-top:0;padding-bottom:0}
.entry-rich{max-width:860px}
.entry-rich img{max-width:100%;height:auto}
.page-photo{padding:0}
.page-photo img{width:100%;object-fit:cover}
.footer .widget ul{list-style:none;margin:0;padding:0}
.footer .widget li{margin:0}
.footer .widget p{margin:0 0 .8em}
.footer .widget_text a,.footer .widget_custom_html a{display:inline}
.footer .widget+.widget{margin-top:18px}
.above-footer{background:var(--bg);border-top:1px solid var(--line);padding:36px 0}
.above-footer h3{margin-top:0}
.home-top.no-mark{text-align:center}
@media(max-width:720px){.home-top.no-mark{justify-content:center}}
