/* Ai CMS 1.19.22.134 — scoped corporate header, journal and footer repairs.
   Applied after both existing theme stylesheets; does not modify store / SPA. */

/* Right-start menus: keep the brand at the right edge and the CTA at the left. */
body.theme-corporate1 .co-nav,
body.theme-corporate2 .ai2-nav{
  direction:rtl;
  text-align:right;
  justify-content:flex-start;
}
body.theme-corporate1 .co-nav > .corporate-menu-list,
body.theme-corporate2 .ai2-nav > .corporate-menu-list{
  direction:rtl;
  justify-content:flex-start;
  text-align:right;
}
body.theme-corporate1 .co-nav .corporate-menu-sub,
body.theme-corporate2 .ai2-nav .corporate-menu-sub{text-align:right}
@media (min-width:761px){
  body.theme-corporate1 .co-header-inner{justify-content:flex-start}
  body.theme-corporate1 .co-brand{flex:0 0 auto}
  body.theme-corporate1 .co-nav{margin-inline:0;min-width:0;flex:0 1 auto}
  body.theme-corporate1 .co-header-cta{margin-inline-start:auto;margin-inline-end:0}
}
@media (min-width:821px){
  body.theme-corporate2 .ai2-header-inner{justify-content:flex-start;gap:clamp(14px,2vw,30px)}
  body.theme-corporate2 .ai2-brand{margin-inline:0;flex:0 0 auto}
  body.theme-corporate2 .ai2-nav{margin-inline:0;flex:0 1 auto;min-width:0;gap:clamp(10px,1.35vw,22px)}
  body.theme-corporate2 .ai2-header-cta{margin-inline-start:auto;margin-inline-end:0;flex-shrink:0}
}
/* In the collapsed navigation do not let earlier auto margins reorder items. */
@media (max-width:820px){
  body.theme-corporate2 .ai2-nav{text-align:right;align-items:stretch}
  body.theme-corporate2 .ai2-nav > .corporate-menu-list{width:100%;align-items:stretch}
}
@media (max-width:760px){
  body.theme-corporate1 .co-nav{text-align:right;align-items:stretch}
  body.theme-corporate1 .co-nav > .corporate-menu-list{width:100%;align-items:stretch}
}

/* Corporate 2: narrow centered journal headings with readable RTL body copy. */
body.theme-corporate2 .ai2-blog-hero > .ai2-blog-wrap,
body.theme-corporate2 .ai2-article-hero > .ai2-blog-wrap{
  width:min(900px,calc(100% - 36px));
  margin-inline:auto;
  text-align:center;
}
body.theme-corporate2 .ai2-blog-crumb{justify-content:center;margin-bottom:clamp(15px,3vw,26px)}
body.theme-corporate2 .ai2-blog-hero h1,
body.theme-corporate2 .ai2-article-hero h1{
  font-size:clamp(23px,2.65vw,36px);
  line-height:1.65;
  letter-spacing:0;
  margin:12px auto 14px;
  max-width:820px;
  text-align:center;
  overflow-wrap:break-word;
}
body.theme-corporate2 .ai2-blog-hero p,
body.theme-corporate2 .ai2-article-hero p{
  font-size:clamp(13px,1.15vw,14px);
  line-height:2;
  max-width:700px;
  margin-inline:auto;
  text-align:center;
}
body.theme-corporate2 .ai2-article-meta{justify-content:center}
body.theme-corporate2 .ai2-article-wrap{width:min(860px,calc(100% - 36px));margin-inline:auto;margin-top:-66px}
body.theme-corporate2 .ai2-article-surface{min-width:0;text-align:right}
body.theme-corporate2 .ai2-article-content{
  min-width:0;
  font-size:clamp(14px,1.2vw,15px);
  line-height:2.15;
  text-align:right;
  overflow-wrap:anywhere;
}
body.theme-corporate2 .ai2-article-content :is(h2,h3,h4){line-height:1.65;overflow-wrap:break-word}
body.theme-corporate2 .ai2-article-content h2{font-size:clamp(19px,2vw,23px)}
body.theme-corporate2 .ai2-article-content h3{font-size:clamp(17px,1.65vw,20px)}
body.theme-corporate2 .ai2-article-content :is(img,video,iframe,svg){max-width:100%;height:auto}
body.theme-corporate2 .ai2-article-content :is(pre,table){max-width:100%;overflow-x:auto}
body.theme-corporate2 .ai2-blog-card-copy h3{font-size:clamp(15px,1.25vw,17px);line-height:1.75}
body.theme-corporate2 .ai2-blog-section-head h2{font-size:clamp(19px,2vw,24px)}
body.theme-corporate2 .ai2-article-cover img{max-width:100%;height:auto;max-height:420px;object-fit:cover}

/* Corporate 1: center journal titles and metadata, not the long article text. */
body.theme-corporate1 .co74-intro-copy{text-align:center}
body.theme-corporate1 .co74-intro-copy h1{
  font-size:clamp(25px,3vw,43px);
  line-height:1.55;
  margin-inline:auto;
}
body.theme-corporate1 .co74-intro-copy p{font-size:clamp(13px,1.1vw,15px);margin-inline:auto}
body.theme-corporate1 .co74-magazine-intro .co74-jump{justify-content:center}
body.theme-corporate1 .co74-breadcrumb{justify-content:center}
body.theme-corporate1 .co74-single-head{text-align:center}
body.theme-corporate1 .co74-single-head h1{
  font-size:clamp(23px,2.75vw,37px);
  line-height:1.7;
  max-width:800px;
  margin-inline:auto;
  overflow-wrap:break-word;
}
body.theme-corporate1 .co74-single-meta{justify-content:center}
body.theme-corporate1 .co74-single-intro{font-size:clamp(13px,1.25vw,16px);margin-inline:auto}
body.theme-corporate1 .co74-reading{font-size:clamp(14px,1.2vw,15px);line-height:2.15;text-align:right;max-width:780px;overflow-wrap:anywhere}
body.theme-corporate1 .co74-reading :is(img,video,iframe,svg){max-width:100%;height:auto}
body.theme-corporate1 .co74-archive-copy strong{font-size:clamp(15px,1.4vw,17px);line-height:1.8}
body.theme-corporate1 .co74-reading :is(pre,table){max-width:100%;overflow-x:auto}

/* Header logo and footer identity use exactly the same uploaded image. */
body.theme-corporate2 .ai2-footer-brand{display:inline-flex;align-items:center;max-width:100%;min-height:38px}
body.theme-corporate2 .ai2-footer-brand img{display:block;width:auto;height:auto;max-height:56px;max-width:min(190px,100%);object-fit:contain;object-position:right center}
body.theme-corporate2 .ai2-footer-brand strong{font-family:var(--cms-store-font,Tahoma,sans-serif);font-size:clamp(18px,2vw,24px);letter-spacing:normal;line-height:1.45;overflow-wrap:anywhere}

@media (max-width:850px){
  body.theme-corporate2 .ai2-blog-hero,
  body.theme-corporate2 .ai2-article-hero{padding-top:44px;padding-bottom:88px}
  body.theme-corporate2 .ai2-article-wrap{margin-top:-55px}
  body.theme-corporate1 .co74-intro-copy h1{font-size:clamp(24px,4vw,35px)}
}
@media (max-width:600px){
  body.theme-corporate2 .ai2-blog-hero,
  body.theme-corporate2 .ai2-article-hero{padding:28px 0 72px}
  body.theme-corporate2 .ai2-blog-hero > .ai2-blog-wrap,
  body.theme-corporate2 .ai2-article-hero > .ai2-blog-wrap{width:calc(100% - 30px)}
  body.theme-corporate2 .ai2-blog-hero h1,
  body.theme-corporate2 .ai2-article-hero h1{font-size:clamp(21px,5.9vw,28px);line-height:1.6}
  body.theme-corporate2 .ai2-article-wrap{width:calc(100% - 24px);margin-top:-40px}
  body.theme-corporate2 .ai2-article-surface{padding:clamp(15px,4vw,22px);border-radius:16px}
  body.theme-corporate2 .ai2-article-content{font-size:14px;line-height:2.1}
  body.theme-corporate2 .ai2-article-form-row{grid-template-columns:minmax(0,1fr)}
  body.theme-corporate2 .ai2-blog-section-head{flex-wrap:wrap}
  body.theme-corporate2 .ai2-blog-filters{gap:6px}
  body.theme-corporate2 .ai2-blog-card-copy{padding:17px}
  body.theme-corporate1 .co74-single-shell{width:calc(100% - 28px)}
  body.theme-corporate1 .co74-single-head h1{font-size:clamp(22px,6vw,28px)}
  body.theme-corporate1 .co74-intro-copy h1{font-size:clamp(24px,6.5vw,33px)}
  body.theme-corporate1 .co74-reading{font-size:14px;line-height:2.1}
  body.theme-corporate1 .co74-comment-section{min-width:0;padding:18px 15px}
}
@media (max-width:380px){
  body.theme-corporate2 .ai2-article-comment-title,
  body.theme-corporate1 .co74-comment-identity{align-items:flex-start;flex-direction:column}
  body.theme-corporate2 .ai2-article-cover{border-radius:14px}
}
