/* =========================================================
   MCARE V3.5 — MOBILE-FIRST + AGRI-BLOG + FORM ALIGNMENT
   Loaded after the legacy stylesheet to neutralise old rules.
   ========================================================= */
:root{
  --m35-ink:#14362b;
  --m35-green:#2f7446;
  --m35-green-dark:#0f3c2f;
  --m35-leaf:#83bd45;
  --m35-citrus:#d4a73f;
  --m35-teal:#2f817b;
  --m35-cream:#f8f4e8;
  --m35-mist:#f3f7f1;
  --m35-line:#dce8df;
  --m35-white:#fff;
  --m35-shadow:0 18px 50px rgba(15,60,47,.11);
}

html{overflow-x:hidden}
html.mc-menu-open,html.mc-menu-open body{overflow:hidden!important}
body.mcare-site{width:100%;max-width:100%;overflow-x:hidden!important;background:#fff!important}
body.mcare-site .mc-page-content,
body.mcare-site .mc-page-content>*{max-width:100%}
body.mcare-site img,body.mcare-site video,body.mcare-site iframe{max-width:100%;height:auto}

/* Header and mobile drawer */
html body.mcare-site .mc-header{isolation:isolate}
html body.mcare-site .mc-header__inner{min-height:72px!important}
html body.mcare-site .mc-brand{width:90px!important;height:66px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important}
html body.mcare-site .mc-brand img{width:auto!important;height:60px!important;max-width:86px!important;max-height:60px!important;object-fit:contain!important;margin:0!important}
.mc-menu-backdrop{display:none}
.mc-menu-toggle{position:relative;z-index:1002}
.mc-menu-toggle span:not(.screen-reader-text),.mc-menu-toggle:before,.mc-menu-toggle:after{transition:transform .2s ease,opacity .2s ease}
.mc-menu-toggle[aria-expanded="true"] span:not(.screen-reader-text){opacity:0}
.mc-menu-toggle[aria-expanded="true"]:before{transform:translateY(7px) rotate(45deg)}
.mc-menu-toggle[aria-expanded="true"]:after{transform:translateY(-7px) rotate(-45deg)}

/* Strong title readability across sliders and inner pages */
html body.mcare-site .mc-slider .mc-slide h1,
html body.mcare-site .mc-page-hero h1,
html body.mcare-site .mc-course-hero h1{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
  text-wrap:balance;
  text-shadow:0 4px 26px rgba(0,0,0,.42)!important;
}
html body.mcare-site .mc-slider .mc-slide p,
html body.mcare-site .mc-page-hero p,
html body.mcare-site .mc-course-hero .mc-lead{
  color:#f6fbf8!important;
  opacity:1!important;
}

/* Slider — desktop/tablet */
html body.mcare-site .mc-slide__copy{
  max-width:720px!important;
  padding:32px 34px 34px!important;
  border-radius:26px!important;
  background:linear-gradient(135deg,rgba(7,42,31,.86),rgba(9,48,36,.50))!important;
  border:1px solid rgba(255,255,255,.24)!important;
  backdrop-filter:blur(8px)!important;
}
html body.mcare-site .mc-slide__bg{filter:saturate(1.05) contrast(1.02)}
html body.mcare-site .mc-slide h1{font-size:clamp(2.55rem,5vw,4.65rem)!important;line-height:1.02!important}
html body.mcare-site .mc-slide p{font-size:clamp(1rem,1.55vw,1.2rem)!important;line-height:1.65!important}
.mc-slide__progress{height:4px!important;background:rgba(255,255,255,.16)!important}
.mc-slide__progress span{background:linear-gradient(90deg,var(--m35-leaf),#d8eb75)!important}

/* Generic WP/WPBakery containment */
body.mcare-site .vc_row,
body.mcare-site .wpb_row,
body.mcare-site .vc_column_container,
body.mcare-site .wpb_column,
body.mcare-site .vc_column-inner,
body.mcare-site .wpb_wrapper,
body.mcare-site .content-block,
body.mcare-site .content-block-background{max-width:100%!important;min-width:0!important}
body.mcare-site .wpb_wrapper:after{content:"";display:table;clear:both}
body.mcare-site table{max-width:100%}
body.mcare-site .mc-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* Modern article archive / Agri-Blog */
.mc-blog-shell{padding:72px 0 88px;background:linear-gradient(180deg,#fff 0%,var(--m35-mist) 100%)}
.mc-blog-intro{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.55fr);gap:42px;align-items:end;margin-bottom:38px}
.mc-blog-intro p{margin:0;max-width:610px}
.mc-articles-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px}
.mc-article-card{min-width:0;display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid var(--m35-line);border-radius:22px;box-shadow:0 9px 28px rgba(15,60,47,.07);transition:transform .25s ease,box-shadow .25s ease}
.mc-article-card:hover{transform:translateY(-6px);box-shadow:var(--m35-shadow)}
.mc-article-card__media{display:block;position:relative;aspect-ratio:16/10;overflow:hidden;background:#eaf1eb}
.mc-article-card__media:after{content:"";position:absolute;inset:auto 0 0;height:34%;background:linear-gradient(transparent,rgba(9,48,36,.24))}
.mc-article-card__media img{width:100%!important;height:100%!important;object-fit:cover!important;transition:transform .45s ease}
.mc-article-card:hover .mc-article-card__media img{transform:scale(1.055)}
.mc-article-card__body{display:flex;flex:1;flex-direction:column;padding:25px 25px 27px}
.mc-article-card__meta{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px;color:#6a7c72;font-size:.75rem;font-weight:750}
.mc-article-card__meta span{color:var(--m35-green);letter-spacing:.08em;text-transform:uppercase}
.mc-article-card__title{font-size:clamp(1.25rem,1.8vw,1.55rem)!important;line-height:1.22!important;margin-bottom:12px!important}
.mc-article-card__title a{color:var(--m35-ink)!important}
.mc-article-card__body p{font-size:.94rem;color:#5a6e63}
.mc-article-card__link{display:inline-flex;align-items:center;gap:8px;margin-top:auto;padding-top:9px;color:var(--m35-green)!important;font-weight:850}
.mc-article-card__link svg{width:18px;height:18px}
.mc-pagination{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:40px}
.mc-pagination .page-numbers{display:grid;place-items:center;min-width:42px;height:42px;padding:0 12px;border-radius:999px;background:#fff;border:1px solid var(--m35-line);color:var(--m35-ink)!important;font-weight:800}
.mc-pagination .current,.mc-pagination a:hover{background:var(--m35-green);border-color:var(--m35-green);color:#fff!important}

/* Single article */
.mc-article-hero{position:relative;min-height:480px;display:flex;align-items:flex-end;overflow:hidden;background:var(--m35-green-dark);color:#fff}
.mc-article-hero__bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.64}
.mc-article-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(6,36,27,.18),rgba(6,36,27,.94) 92%)}
.mc-article-hero__inner{position:relative;z-index:2;padding:100px 0 58px;max-width:920px}
.mc-article-hero__category{display:inline-flex;padding:7px 12px;border-radius:999px;background:rgba(131,189,69,.18);border:1px solid rgba(190,230,142,.48);color:#e8ffc4;font-size:.76rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.mc-article-hero h1{color:#fff!important;-webkit-text-fill-color:#fff!important;font-size:clamp(2.5rem,5.5vw,4.7rem)!important;line-height:1.04!important;margin:16px 0!important;text-wrap:balance;text-shadow:0 4px 26px rgba(0,0,0,.35)}
.mc-article-hero__meta{display:flex;flex-wrap:wrap;gap:12px 20px;color:#e7f1eb;font-size:.9rem}
.mc-article-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:58px;align-items:start;padding:70px 0 86px}
.mc-article-content{min-width:0;font-size:1.06rem;line-height:1.82;color:#3f554a}
.mc-article-content>p:first-of-type{font-size:1.2rem;line-height:1.7;color:#314b3f}
.mc-article-content h2{margin-top:46px!important;font-size:clamp(1.75rem,3vw,2.55rem)!important}
.mc-article-content h3{margin-top:34px!important;font-size:clamp(1.35rem,2vw,1.75rem)!important}
.mc-article-content img{display:block;width:auto;max-width:100%;height:auto;border-radius:18px;margin:30px auto;box-shadow:0 12px 34px rgba(15,60,47,.10)}
.mc-article-content figure{max-width:100%;margin:32px 0}
.mc-article-content figcaption{text-align:center;color:#708077;font-size:.82rem;margin-top:8px}
.mc-article-content blockquote{margin:34px 0;padding:24px 27px;border-left:5px solid var(--m35-leaf);border-radius:0 18px 18px 0;background:var(--m35-mist);color:#28483a;font-size:1.12rem}
.mc-article-content ul,.mc-article-content ol{padding-left:1.35em}
.mc-article-content li{margin:.5em 0}
.mc-article-content table{width:100%;border-collapse:collapse;font-size:.92rem}
.mc-article-content th,.mc-article-content td{padding:13px;border:1px solid var(--m35-line);text-align:left;vertical-align:top}
.mc-article-content th{background:var(--m35-green-dark);color:#fff}
.mc-article-sidebar{position:sticky;top:102px;display:grid;gap:18px}
.mc-article-aside{padding:25px;border-radius:20px;background:linear-gradient(145deg,var(--m35-green-dark),#1f6448);color:#e9f4ed;box-shadow:var(--m35-shadow)}
.mc-article-aside h2,.mc-article-aside h3{color:#fff!important;-webkit-text-fill-color:#fff!important}
.mc-article-aside p{font-size:.92rem}
.mc-article-aside .mc-button{width:100%}
.mc-article-share{padding:22px;border:1px solid var(--m35-line);border-radius:18px;background:#fff}
.mc-article-share strong{display:block;margin-bottom:10px;color:var(--m35-ink)}
.mc-article-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:35px;padding-top:25px;border-top:1px solid var(--m35-line)}
.mc-article-tags a{padding:7px 11px;border-radius:999px;background:var(--m35-mist);color:var(--m35-green)!important;font-size:.8rem;font-weight:750}
.mc-related{padding:68px 0;background:var(--m35-mist)}
.mc-empty-state{padding:50px;border-radius:20px;background:#fff;text-align:center;border:1px solid var(--m35-line)}

/* Registration forms — checkbox and text on exactly the same line level */
html body.mcare-site .mc-checkbox{
  display:grid!important;
  grid-template-columns:20px minmax(0,1fr)!important;
  column-gap:12px!important;
  align-items:start!important;
  margin:4px 0 3px!important;
}
html body.mcare-site .mc-checkbox>input[type="checkbox"]{
  grid-column:1!important;
  width:19px!important;height:19px!important;
  min-width:19px!important;max-width:19px!important;
  margin:3px 0 0!important;padding:0!important;
  align-self:start!important;
  accent-color:var(--m35-green);
}
html body.mcare-site .mc-checkbox>label{
  grid-column:2!important;
  display:block!important;
  margin:0!important;padding:0!important;
  line-height:1.48!important;
  font-size:.9rem!important;font-weight:600!important;
  color:var(--m35-ink)!important;
}
/* Compatibility with V3.3 wrapper label markup */
html body.mcare-site .mc-checkbox>label:only-child{
  grid-column:1/-1!important;
  display:grid!important;
  grid-template-columns:20px minmax(0,1fr)!important;
  column-gap:12px!important;
  align-items:start!important;
}
html body.mcare-site .mc-checkbox>label:only-child input[type="checkbox"]{
  width:19px!important;height:19px!important;min-width:19px!important;
  margin:3px 0 0!important;padding:0!important;align-self:start!important;
  accent-color:var(--m35-green);
}
html body.mcare-site .mc-checkbox span{display:block!important;margin:0!important;padding:0!important;line-height:1.48!important}
html body.mcare-site .mcare-privacy-group label{
  display:grid!important;grid-template-columns:20px minmax(0,1fr)!important;align-items:start!important;gap:12px!important
}
html body.mcare-site .mcare-privacy-group input[type="checkbox"]{width:19px!important;height:19px!important;margin:3px 0 0!important}
html body.mcare-site .mcare-privacy-group span{line-height:1.48!important}

/* Tablet */
@media(max-width:1024px){
  .mc-articles-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mc-article-layout{grid-template-columns:minmax(0,1fr) 260px;gap:36px}
  .mc-blog-intro{grid-template-columns:1fr}
}

/* Real mobile layout */
@media(max-width:920px){
  :root{--mc-container:min(100% - 34px,1200px)}
  body.mcare-site.admin-bar .mc-header{top:46px!important}
  .mc-topbar{display:none!important}
  html body.mcare-site .mc-header__inner{min-height:62px!important}
  html body.mcare-site .mc-brand{width:70px!important;height:58px!important}
  html body.mcare-site .mc-brand img{height:53px!important;max-width:67px!important;max-height:53px!important}
  .mc-menu-toggle{display:block!important;width:43px!important;height:43px!important;margin-left:auto!important}
  .mc-header__cta{display:none!important}
  .mc-menu-backdrop{display:block;position:fixed;z-index:998;inset:62px 0 0;background:rgba(5,30,23,.46);opacity:0;visibility:hidden;transition:.22s ease;backdrop-filter:blur(2px)}
  body.admin-bar .mc-menu-backdrop{inset:108px 0 0}
  .mc-menu-backdrop.is-open{opacity:1;visibility:visible}
  html body.mcare-site .mc-navigation{
    display:block!important;
    position:fixed!important;
    z-index:1001!important;
    top:62px!important;right:0!important;bottom:0!important;left:auto!important;
    width:min(88vw,370px)!important;
    padding:18px 18px 34px!important;
    overflow-y:auto!important;
    background:#fff!important;
    border:0!important;border-left:1px solid var(--m35-line)!important;
    border-radius:0!important;
    box-shadow:-20px 0 50px rgba(7,45,31,.18)!important;
    transform:translateX(105%)!important;
    visibility:hidden!important;
    transition:transform .25s ease,visibility .25s ease!important;
  }
  body.admin-bar .mc-navigation{top:108px!important}
  html body.mcare-site .mc-navigation.is-open{transform:translateX(0)!important;visibility:visible!important}
  html body.mcare-site .mc-navigation ul{display:block!important;width:100%!important}
  html body.mcare-site .mc-navigation li{display:block!important;width:100%!important;border-bottom:1px solid #edf2ee!important}
  html body.mcare-site .mc-navigation li:last-child{border-bottom:0!important}
  html body.mcare-site .mc-navigation a{display:flex!important;justify-content:space-between!important;padding:14px 6px!important;font-size:1rem!important;color:var(--m35-ink)!important}
  html body.mcare-site .mc-navigation .sub-menu{display:block!important;position:static!important;min-width:0!important;padding:0 0 8px 14px!important;border:0!important;box-shadow:none!important;background:transparent!important}
  html body.mcare-site .mc-navigation .sub-menu li{border-bottom:0!important}
  html body.mcare-site .mc-navigation .sub-menu a{padding:8px 6px!important;font-size:.91rem!important;color:#5a6e63!important}
  html body.mcare-site .mc-lang-switch{margin:14px 0 0!important;padding:8px 10px!important;width:max-content!important}

  /* All major grids collapse deliberately */
  .mc-grid--2,.mc-grid--3,.mc-grid--4,
  .mc-split,.mc-split--reverse,.mc-contact-layout,.mc-form-shell,.mc-spotlight-grid,.mc-training-feature,
  .mc-course-highlights,.mc-speakers,.mc-stat-row,.mc-priority-strip__grid,
  .mc-footer__main{grid-template-columns:1fr!important}
  .mc-section-head,.mc-cta-band{display:block!important}
  .mc-section-head>p{margin-top:14px!important}
  .mc-image-panel{min-height:310px!important;order:0!important}
  .mc-training-feature__image{min-height:280px!important}
  .mc-training-feature__content{padding:28px!important}

  /* WPBakery columns become full width */
  body.mcare-site .vc_row{margin-left:0!important;margin-right:0!important}
  body.mcare-site .vc_column_container,
  body.mcare-site .wpb_column{float:none!important;width:100%!important;display:block!important}
  body.mcare-site .vc_column-inner{padding-left:0!important;padding-right:0!important}

  /* Slider becomes an actual mobile hero */
  html body.mcare-site .mc-slide,
  html body.mcare-site .mc-slide__content{min-height:600px!important}
  html body.mcare-site .mc-slide__content{align-items:flex-end!important;padding:88px 0 58px!important}
  html body.mcare-site .mc-slide__bg{object-position:60% center!important}
  html body.mcare-site .mc-slide--bpe .mc-slide__bg{object-position:66% center!important}
  html body.mcare-site .mc-slide--regulatory .mc-slide__bg{object-position:62% center!important}
  html body.mcare-site .mc-slide__overlay{background:linear-gradient(180deg,rgba(7,39,29,.15) 0%,rgba(7,39,29,.58) 45%,rgba(7,39,29,.97) 100%)!important}
  html body.mcare-site .mc-slide__copy{width:100%!important;max-width:none!important;padding:24px 21px 25px!important;border-radius:22px!important;background:rgba(7,42,31,.80)!important}
  html body.mcare-site .mc-slide h1{font-size:clamp(2.15rem,8.8vw,3.25rem)!important;line-height:1.03!important;margin:14px 0!important}
  html body.mcare-site .mc-slide p{font-size:1rem!important;line-height:1.55!important}
  .mc-slide__facts{display:flex!important;gap:7px!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding-bottom:2px!important;scrollbar-width:none}
  .mc-slide__facts::-webkit-scrollbar{display:none}
  .mc-slide__facts span{flex:0 0 auto!important;font-size:.76rem!important;padding:6px 9px!important}
  .mc-slide__arrows{display:none!important}
  .mc-slide__nav{bottom:18px!important}
  .mc-actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;margin-top:20px!important}
  .mc-actions .mc-button{width:100%!important;min-height:48px!important;text-align:center!important}

  /* Inner page heroes */
  html body.mcare-site .mc-page-hero{min-height:310px!important}
  html body.mcare-site .mc-page-hero__inner{min-height:310px!important;display:flex!important;flex-direction:column!important;justify-content:flex-end!important;padding:72px 0 38px!important}
  html body.mcare-site .mc-page-hero__bg{opacity:.72!important;object-position:center!important}
  html body.mcare-site .mc-page-hero:after{background:linear-gradient(180deg,rgba(8,43,32,.20),rgba(8,43,32,.95))!important}
  html body.mcare-site .mc-page-hero h1{font-size:clamp(2rem,9vw,3.15rem)!important;line-height:1.04!important}
  html body.mcare-site .mc-page-hero p{font-size:1rem!important;line-height:1.55!important}
  .mc-breadcrumbs{font-size:.75rem!important;margin-bottom:10px!important}

  /* Course pages */
  .mc-course-hero__inner{min-height:600px!important;align-items:flex-end!important;padding:92px 0 60px!important}
  .mc-course-hero:after,.mc-course-hero--regulatory:after{background:linear-gradient(180deg,rgba(7,39,29,.18),rgba(7,39,29,.97))!important}
  .mc-course-hero h1{font-size:clamp(2.2rem,9vw,3.3rem)!important;line-height:1.03!important}
  .mc-course-facts{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:8px!important;scrollbar-width:none}
  .mc-course-facts span{flex:0 0 auto!important}
  .mc-anchor-nav{top:62px!important}
  body.admin-bar .mc-anchor-nav{top:108px!important}
  .mc-anchor-nav__inner{overflow-x:auto!important;scrollbar-width:none!important}
  .mc-anchor-nav a{font-size:.79rem!important;padding:12px 10px!important}
  .mc-programme{display:none!important}
  .mc-programme-mobile{display:grid!important;gap:14px!important}
  .mc-programme-card{padding:20px!important;border-radius:18px!important;background:#fff!important;border:1px solid var(--m35-line)!important;box-shadow:0 8px 24px rgba(15,60,47,.06)!important}

  /* Forms */
  .mc-form-shell{padding:14px!important;gap:16px!important;border-radius:20px!important}
  .mc-form-intro{padding:23px!important;border-radius:17px!important}
  .mc-form-grid{grid-template-columns:1fr!important;gap:13px!important}
  .mc-field--full{grid-column:auto!important}
  .mc-field input,.mc-field select,.mc-field textarea{font-size:16px!important;min-height:48px!important}
  .mc-field textarea{min-height:130px!important}
  .mc-field .mc-button{width:100%!important}

  /* Articles */
  .mc-articles-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mc-article-layout{grid-template-columns:1fr!important;gap:34px!important;padding:52px 0 68px!important}
  .mc-article-sidebar{position:static!important;grid-template-columns:repeat(2,minmax(0,1fr))}
  .mc-article-hero{min-height:440px!important}
  .mc-article-hero__inner{padding:94px 0 42px!important}
  .mc-article-hero h1{font-size:clamp(2.2rem,8vw,3.55rem)!important}
  .mc-article-content{font-size:1rem!important}

  /* Footer */
  .mc-footer__main{gap:26px!important;padding:38px 0 26px!important}
  .mc-footer__brand p{max-width:100%!important}
  .mc-footer__bottom{display:block!important;text-align:center!important}
  .mc-footer__bottom a{display:inline-block!important;margin-top:8px!important}
  .mc-sticky-register{left:12px!important;right:12px!important;bottom:10px!important;justify-content:center!important;width:auto!important}
}

@media(max-width:640px){
  :root{--mc-container:min(100% - 26px,1200px)}
  body.mcare-site{font-size:15.5px!important}
  .mc-section{padding:52px 0!important}
  .mc-section--tight{padding:38px 0!important}
  .mc-card,.mc-course-highlight{padding:22px!important;border-radius:18px!important}
  .mc-articles-grid{grid-template-columns:1fr!important;gap:20px!important}
  .mc-article-card__body{padding:22px!important}
  .mc-article-sidebar{grid-template-columns:1fr!important}
  .mc-article-hero{min-height:410px!important}
  .mc-article-hero__inner{padding:88px 0 35px!important}
  .mc-article-hero h1{font-size:clamp(2rem,10vw,3rem)!important}
  .mc-article-content>p:first-of-type{font-size:1.08rem!important}
  .mc-article-content h2{font-size:clamp(1.65rem,8vw,2.25rem)!important}
  .mc-article-content h3{font-size:clamp(1.3rem,6vw,1.65rem)!important}
  .mc-article-content table{display:block!important;overflow-x:auto!important;white-space:nowrap!important}
  .mc-blog-shell{padding:52px 0 68px!important}
  .mc-blog-intro{margin-bottom:28px!important}
  .mc-cta-band{padding:25px!important;border-radius:19px!important}
}

@media(max-width:420px){
  :root{--mc-container:min(100% - 22px,1200px)}
  html body.mcare-site .mc-slide,
  html body.mcare-site .mc-slide__content{min-height:570px!important}
  html body.mcare-site .mc-slide__content{padding-bottom:52px!important}
  html body.mcare-site .mc-slide__copy{padding:21px 17px 22px!important}
  html body.mcare-site .mc-slide h1{font-size:clamp(2rem,10.5vw,2.75rem)!important}
  .mc-slide__badge{font-size:.67rem!important}
  .mc-page-hero__inner{padding-left:0!important;padding-right:0!important}
  .mc-checkbox{column-gap:10px!important}
}
