
/* =========================================================
   V24.8 — Unified File Library
   CMS -> Homepage + Full Library
   ========================================================= */

/* Homepage cards now come from the CMS */
body.rebuild-v1 .home-files248{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:12px !important;
}

body.rebuild-v1 .home-files248--one{
  grid-template-columns:minmax(0,620px) !important;
  justify-content:center !important;
}

body.rebuild-v1 .home-files248--two{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  max-width:850px;
  margin-inline:auto;
}

body.rebuild-v1 .home-file248{
  min-height:92px !important;
  display:grid !important;
  grid-template-columns:58px minmax(0,1fr) 30px !important;
  gap:12px !important;
  align-items:center !important;
  padding:13px 14px !important;
  border:1px solid #dce6ef !important;
  border-radius:14px !important;
  background:#fff !important;
  color:inherit !important;
  text-decoration:none !important;
  box-shadow:0 7px 20px rgba(5,37,81,.035) !important;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease !important;
}

body.rebuild-v1 .home-file248:hover{
  transform:translateY(-2px) !important;
  border-color:#b9d2e9 !important;
  box-shadow:0 11px 25px rgba(5,37,81,.07) !important;
}

body.rebuild-v1 .home-file248__type{
  width:54px !important;
  height:54px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:12px !important;
  background:#edf5ff !important;
  color:#2663b1 !important;
  font-size:9px !important;
  font-weight:900 !important;
}

body.rebuild-v1 .home-file248__type.pdf{background:#fff0ef !important;color:#ba4239 !important}
body.rebuild-v1 .home-file248__type.doc,
body.rebuild-v1 .home-file248__type.docx{background:#edf5ff !important;color:#2863b2 !important}
body.rebuild-v1 .home-file248__type.xls,
body.rebuild-v1 .home-file248__type.xlsx{background:#eaf7ee !important;color:#287a49 !important}
body.rebuild-v1 .home-file248__type.zip,
body.rebuild-v1 .home-file248__type.rar{background:#fff4df !important;color:#a76b16 !important}

body.rebuild-v1 .home-file248__copy{
  min-width:0;
}

body.rebuild-v1 .home-file248__copy small,
body.rebuild-v1 .home-file248__copy strong,
body.rebuild-v1 .home-file248__copy span{
  display:block !important;
}

body.rebuild-v1 .home-file248__copy small{
  color:#0a63b8 !important;
  font-size:7px !important;
  font-weight:900 !important;
}

body.rebuild-v1 .home-file248__copy strong{
  margin-top:4px !important;
  color:#173a61 !important;
  font-size:12px !important;
  line-height:1.45 !important;
}

body.rebuild-v1 .home-file248__copy span{
  margin-top:4px !important;
  color:#8392a2 !important;
  font-size:7px !important;
}

body.rebuild-v1 .home-file248__download{
  width:28px !important;
  height:28px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:8px !important;
  background:#f1f6fb !important;
  color:#0a61b7 !important;
  font-size:12px !important;
}

body.rebuild-v1 .home-files248__empty{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:16px;
  border:1px dashed #cbd9e7;
  border-radius:14px;
  background:#fff;
}

body.rebuild-v1 .home-files248__empty>span{
  font-size:24px;
}

body.rebuild-v1 .home-files248__empty strong,
body.rebuild-v1 .home-files248__empty small{
  display:block;
}

body.rebuild-v1 .home-files248__empty strong{
  color:#294966;
  font-size:11px;
}

body.rebuild-v1 .home-files248__empty small{
  margin-top:3px;
  color:#8797a7;
  font-size:7.5px;
}

body.rebuild-v1 .home-files248__empty>a{
  color:#0a62b7;
  font-size:8px;
  font-weight:900;
  text-decoration:none;
}

/* Full library adapts cleanly to low item counts */
.files247-grid.files248-count-1{
  grid-template-columns:minmax(0,650px) !important;
  justify-content:center;
}

.files247-grid.files248-count-1 .file247{
  min-height:170px;
}

.files247-grid.files248-count-2{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}

@media(max-width:760px){
  body.rebuild-v1 .home-files248,
  body.rebuild-v1 .home-files248--one,
  body.rebuild-v1 .home-files248--two{
    grid-template-columns:1fr !important;
    max-width:none !important;
  }

  .files247-grid.files248-count-1,
  .files247-grid.files248-count-2{
    grid-template-columns:1fr !important;
  }
}

@media(max-width:520px){
  body.rebuild-v1 .home-file248{
    grid-template-columns:50px minmax(0,1fr) 28px !important;
    padding:11px !important;
  }

  body.rebuild-v1 .home-file248__type{
    width:48px !important;
    height:48px !important;
  }

  body.rebuild-v1 .home-files248__empty{
    grid-template-columns:40px 1fr;
  }

  body.rebuild-v1 .home-files248__empty>a{
    grid-column:1/-1;
  }
}
