/* DN Logo Center Fix V3 */

/* Logo container: always center, no left/right shift */
.dnafp21-logo,
.dnafp-logo,
.dn-logo-wrap,
.dnafp-header-logo,
.dnfp-logo,
[class*="logo-wrap"],
[class*="header-logo"]{
  width:100%!important;
  max-width:100%!important;
  height:var(--dn-logo-height,145px)!important;
  min-height:var(--dn-logo-height,145px)!important;
  margin:var(--dn-logo-top,8px) auto var(--dn-logo-bottom,6px)!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  overflow:hidden!important;
  background:#fff!important;
  border:0!important;
  box-sizing:border-box!important;
}

/* Logo image: fixed max width, centered, never overflow */
.dnafp21-logo img,
.dnafp-logo img,
.dn-logo-wrap img,
.dnafp-header-logo img,
.dnfp-logo img,
[class*="logo-wrap"] img,
[class*="header-logo"] img{
  width:var(--dn-logo-width,980px)!important;
  max-width:96%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  display:block!important;
  margin-left:auto!important;
  margin-right:auto!important;
  float:none!important;
  transform:none!important;
}

/* Prevent large logo letters from spilling outside paper */
.dnafp21-header,
.dnafp-header,
.dn-front-header,
[class*="front-header"]{
  overflow:hidden!important;
  box-sizing:border-box!important;
}

/* Header top/right ad box alignment */
.dnafp21-ad,
.dnafp-ad,
.dn-reporter-box,
[class*="vilakarulu"],
[class*="reporter-box"]{
  text-align:center!important;
}

/* If old CSS forced left alignment, override it */
.dnafp21-logo *,
.dnafp-logo *,
.dn-logo-wrap *,
.dnafp-header-logo *,
.dnfp-logo *{
  float:none!important;
}

/* Mobile preview stability */
@media(max-width:850px){
  .dnafp21-logo,.dnafp-logo,.dn-logo-wrap,.dnafp-header-logo,.dnfp-logo{
    height:calc(var(--dn-logo-height,145px) * 1px / 1px)!important;
  }
}

/* Print stability */
@media print{
  .dnafp21-logo,.dnafp-logo,.dn-logo-wrap,.dnafp-header-logo,.dnfp-logo{
    height:var(--dn-logo-height,145px)!important;
  }
  .dnafp21-logo img,.dnafp-logo img,.dn-logo-wrap img,.dnafp-header-logo img,.dnfp-logo img{
    width:var(--dn-logo-width,980px)!important;
    max-width:96%!important;
  }
}
