
/* HAI VU LIBRARY TOPICS V7
   Institutional – Academic – Premium
   Rebuilds only the "Tri thức Piano theo từng chủ đề" section.
*/

body.hv6-library .hv7-topics-section{
  padding-top:96px!important;
  padding-bottom:104px!important;
  background:#fbfaf6;
}

body.hv6-library .hv7-topics-wrap{
  width:min(1220px,calc(100% - 48px));
  margin-inline:auto;
}

body.hv6-library .hv7-topics-head{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:64px;
  align-items:end;
  margin-bottom:38px;
}

body.hv6-library .hv7-topics-kicker{
  display:block;
  margin-bottom:12px;
  color:#9a7040;
  font-size:12px;
  line-height:1.25;
  font-weight:650;
  letter-spacing:.045em;
}

body.hv6-library .hv7-topics-head h2{
  margin:0!important;
  max-width:680px!important;
  font-size:clamp(32px,3vw,40px)!important;
  line-height:1.16!important;
  letter-spacing:-.024em!important;
  font-weight:620!important;
}

body.hv6-library .hv7-topics-head p{
  margin:0!important;
  max-width:580px;
  color:#607380;
  font-size:17px!important;
  line-height:1.68!important;
}

/* 4-column desktop: less cramped than old 5-column/circle layout */
body.hv6-library .hv7-topic-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

/* Rectangular, restrained, lightly rounded */
body.hv6-library .hv7-topic-card{
  position:relative;
  min-height:196px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 34%;
  overflow:hidden;
  border:1px solid rgba(24,56,79,.12);
  border-radius:14px;
  background:#fff;
  color:#18384f;
  text-decoration:none;
  box-shadow:none;
  transition:border-color .18s ease, transform .18s ease;
}

body.hv6-library .hv7-topic-card:hover{
  border-color:rgba(18,63,91,.26);
  transform:translateY(-2px);
}

body.hv6-library .hv7-topic-copy{
  min-width:0;
  padding:22px 12px 20px 20px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

body.hv6-library .hv7-topic-no{
  margin-bottom:16px;
  color:#b6884d;
  font-size:18px;
  line-height:1;
  font-weight:500;
  font-variant-numeric:tabular-nums;
}

body.hv6-library .hv7-topic-card h3{
  margin:0 0 10px!important;
  max-width:170px;
  font-size:20px!important;
  line-height:1.22!important;
  font-weight:600!important;
  letter-spacing:-.012em!important;
}

body.hv6-library .hv7-topic-desc{
  margin:0!important;
  color:#687b87!important;
  font-size:14px!important;
  line-height:1.55!important;
}

body.hv6-library .hv7-topic-arrow{
  margin-top:auto;
  padding-top:16px;
  color:#9a7040;
  font-size:16px;
  line-height:1;
}

/* Quiet image / placeholder area. Existing illustration can be replaced later. */
body.hv6-library .hv7-topic-visual{
  position:relative;
  min-width:0;
  min-height:100%;
  overflow:hidden;
  background:
    linear-gradient(180deg,#f6f8f8 0 42%,#e7eef1 42% 100%);
  border-left:1px solid rgba(24,56,79,.07);
}

body.hv6-library .hv7-topic-visual::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(255,255,255,.22),rgba(255,255,255,0));
  pointer-events:none;
}

body.hv6-library .hv7-topic-visual img{
  width:100%!important;
  height:100%!important;
  display:block!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:0!important;
  opacity:.62;
  mix-blend-mode:multiply;
}

/* Last row with only two cards does not stretch awkwardly. */
body.hv6-library .hv7-topic-grid > .hv7-topic-card:nth-last-child(2):nth-child(4n+1){
  grid-column:auto;
}

@media(max-width:1080px){
  body.hv6-library .hv7-topic-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:820px){
  body.hv6-library .hv7-topics-head{
    grid-template-columns:1fr;
    gap:18px;
    margin-bottom:30px;
  }

  body.hv6-library .hv7-topic-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:600px){
  body.hv6-library .hv7-topics-section{
    padding-top:64px!important;
    padding-bottom:68px!important;
  }

  body.hv6-library .hv7-topics-wrap{
    width:min(100% - 32px,1220px);
  }

  body.hv6-library .hv7-topic-grid{
    grid-template-columns:1fr;
    gap:12px;
  }

  body.hv6-library .hv7-topic-card{
    min-height:178px;
    grid-template-columns:minmax(0,1fr) 32%;
    border-radius:12px;
  }

  body.hv6-library .hv7-topic-card h3{
    font-size:19px!important;
  }
}
