
/* =========================================================
   V22.7 — Homepage visual repair
   1) Restore institute image in About section.
   2) Isolate homepage gallery from public-gallery CSS.
   ========================================================= */

/* Restore and lock the institute visual card. */
body.rebuild-v1 .about .split{
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr) !important;
  align-items:center !important;
}

body.rebuild-v1 .about .visual-card-photo{
  display:block !important;
  position:relative !important;
  min-height:430px !important;
  opacity:1 !important;
  visibility:visible !important;
  background:
    linear-gradient(135deg,rgba(8,36,79,.10),rgba(31,103,210,.03)),
    url("campus.jpg") center/cover no-repeat !important;
  border-radius:26px !important;
  overflow:hidden !important;
}

body.rebuild-v1 .about .visual-card-photo>img{
  display:block !important;
  position:absolute !important;
  z-index:3 !important;
  width:150px !important;
  height:150px !important;
  right:50% !important;
  top:50% !important;
  transform:translate(50%,-54%) !important;
  object-fit:contain !important;
  padding:9px !important;
  background:rgba(255,255,255,.96) !important;
  border:4px solid rgba(255,255,255,.92) !important;
  border-radius:50% !important;
}

body.rebuild-v1 .about .visual-card-photo .visual-caption{
  z-index:4 !important;
}

/* Homepage gallery — fully namespaced, no collision with /gallery page. */
body.rebuild-v1 .home-gallery-grid{
  display:grid !important;
  grid-template-columns:1.35fr 1fr 1fr !important;
  grid-template-rows:190px 190px !important;
  gap:14px !important;
  min-height:0 !important;
}

body.rebuild-v1 .home-gallery-item{
  position:relative !important;
  display:block !important;
  min-height:0 !important;
  height:auto !important;
  overflow:hidden !important;
  border-radius:20px !important;
  background-size:cover !important;
  background-position:center !important;
  text-decoration:none !important;
  box-shadow:0 10px 26px rgba(5,37,81,.08) !important;
}

body.rebuild-v1 .home-gallery-item::after{
  content:"" !important;
  position:absolute !important;
  inset:0 !important;
  background:linear-gradient(180deg,transparent 45%,rgba(4,22,47,.66)) !important;
}

body.rebuild-v1 .home-gallery-item span{
  position:absolute !important;
  z-index:2 !important;
  right:16px !important;
  bottom:14px !important;
  color:#fff !important;
  font-size:13px !important;
  font-weight:800 !important;
}

body.rebuild-v1 .home-gallery-large{
  grid-row:span 2 !important;
}

body.rebuild-v1 .home-gallery-video span{
  font-size:18px !important;
}

body.rebuild-v1 .gallery{
  padding-top:50px !important;
  padding-bottom:50px !important;
}

/* Desktop visual balance */
@media(min-width:901px){
  body.rebuild-v1 .about .visual-card-photo{
    min-height:440px !important;
  }
}

/* Tablet */
@media(max-width:900px){
  body.rebuild-v1 .about .split{
    grid-template-columns:1fr !important;
  }

  body.rebuild-v1 .about .visual-card-photo{
    min-height:320px !important;
  }

  body.rebuild-v1 .home-gallery-grid{
    grid-template-columns:1fr 1fr !important;
    grid-template-rows:210px 180px 180px !important;
  }

  body.rebuild-v1 .home-gallery-large{
    grid-column:span 2 !important;
    grid-row:auto !important;
  }
}

/* Mobile */
@media(max-width:620px){
  body.rebuild-v1 .about .visual-card-photo{
    min-height:270px !important;
  }

  body.rebuild-v1 .about .visual-card-photo>img{
    width:120px !important;
    height:120px !important;
  }

  body.rebuild-v1 .home-gallery-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    grid-template-rows:none !important;
  }

  body.rebuild-v1 .home-gallery-item,
  body.rebuild-v1 .home-gallery-large{
    grid-column:auto !important;
    grid-row:auto !important;
    min-height:210px !important;
  }
}


/* V22.8 — real institute photo emphasis */
body.rebuild-v1 .about .visual-card-photo{
  background-position:center 48% !important;
  box-shadow:0 18px 42px rgba(5,37,81,.12) !important;
}

body.rebuild-v1 .about .visual-card-photo::after{
  content:"" !important;
  position:absolute !important;
  inset:0 !important;
  z-index:1 !important;
  background:linear-gradient(180deg,rgba(2,25,56,.03),rgba(2,25,56,.16)) !important;
  pointer-events:none !important;
}

body.rebuild-v1 .about .visual-card-photo>img{
  z-index:3 !important;
  width:160px !important;
  height:160px !important;
}

body.rebuild-v1 .about .visual-card-photo .visual-caption{
  z-index:4 !important;
  max-width:300px !important;
}

@media(max-width:900px){
  body.rebuild-v1 .about .visual-card-photo{
    min-height:360px !important;
  }
}

@media(max-width:620px){
  body.rebuild-v1 .about .visual-card-photo{
    min-height:300px !important;
  }
}


/* V22.9 — Clean institute photo: remove overlaid logo */
body.rebuild-v1 .about .visual-card-photo>img{
  display:none !important;
}

body.rebuild-v1 .about .visual-card-photo{
  background-position:center center !important;
}

body.rebuild-v1 .about .visual-card-photo::after{
  background:linear-gradient(180deg,rgba(2,25,56,.02),rgba(2,25,56,.10)) !important;
}

/* Keep only the small information caption without covering the building. */
body.rebuild-v1 .about .visual-card-photo .visual-caption{
  right:18px !important;
  bottom:18px !important;
  max-width:260px !important;
  background:rgba(255,255,255,.94) !important;
  backdrop-filter:blur(8px);
  border-radius:14px !important;
  padding:14px 16px !important;
}
