.cv-cards-grid{
  display: grid;
  gap: 18px;
  align-items: start; 

}

.cv-cols-1{ grid-template-columns: 1fr; }
.cv-cols-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cv-cols-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cv-cols-4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px){
  .cv-cols-3, .cv-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .cv-cols-2, .cv-cols-3, .cv-cols-4 { grid-template-columns: 1fr; }
}

.cv-card{
  background: #001e57;
  border-radius: 22px 22px 44px 44px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}

.cv-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 38px rgba(0,0,0,.14);
}

/* CLOSED STATE: 3 lines only */
.cv-main{
  padding: 18px 18px 14px;
}

.cv-line{
  margin: 0;
  line-height: 1.15;
}

.cv-line-1{
  font-size: 20px;
  font-weight: 800;
}

.cv-line-2{
  margin-top: 6px;
  font-size: 13px;
  opacity: .75;
}

.cv-line-3{
  margin-top: 10px;
  font-size: 14px;
  opacity: .95;
}

.cv-hint{
  margin-top: 12px;
  font-size: 12px;
  opacity: .55;
}

/* OPEN STATE: height controlled by JS */
.cv-extra{
  height: 0px;
  opacity: 0;
  overflow: hidden;
  padding: 0 18px;
  transition: height .35s ease, opacity .25s ease, padding .35s ease;
  will-change: height;
}

.cv-card.active .cv-extra{
  opacity: 1;
  padding: 0 18px 18px;
}

/* Inner layout: photo left, text right */
.cv-extra-inner{
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 12px;
}

.cv-photo{
  width: 180px;
  max-width: 40%;
  height: auto;
  border-radius: 16px;
  display: block;
  flex: 0 0 auto;
  margin-top: 20px;
}

.cv-photo-placeholder{
  width: 180px;
  max-width: 40%;
  border-radius: 16px;
  background: rgba(0,0,0,.04);
  padding: 18px;
  opacity: .6;
  flex: 0 0 auto;
}

.cv-full{
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.5;
}

.cv-full-empty{ opacity: .65; }

/* Mobile: photo top, text bottom */
@media (max-width: 560px){
  .cv-extra-inner{ flex-direction: column; }
  .cv-photo, .cv-photo-placeholder{ width: 100%; max-width: 100%; }
}
