/* ===== Club Vitek — Biblioteca de documentos ===== */

/* ---- Cards de productos ---- */
.cv-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:28px;
  align-items:stretch;
}

@media (max-width: 980px){
  .cv-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .cv-grid{ grid-template-columns:1fr; }
}

.cv-card{
  background:#fff;
  border:1px solid #e7edf5;
  border-radius:14px;
  padding:28px 22px;
  text-align:center;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}

.cv-icon{
  width: 100%;
  height: 120px;
  margin: 0 auto 18px;
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cv-icon img{
  width: 80%;
  height: auto;
  max-height: 90px;
  object-fit: contain;
}

.cv-icon-fallback{
  width:60%;
  height:60%;
  border-radius:12px;
  background:#eef3fb;
}

.cv-title{
  margin:0 0 10px;
  font-size:20px;
  color:#0b2d57;
  font-weight:700;
}

.cv-desc{
  margin:0 auto 18px;
  max-width:280px;
  font-size:13px;
  color:#6b7a90;
  line-height:1.4;
}

.cv-list{
  margin:18px 0 18px;
  text-align:left;
}

.cv-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  background:#f3f7ff;
  border-radius:8px;
  padding:10px 12px;
  margin:8px 0;
  text-decoration:none;
}

.cv-row:hover{
  background:#eaf1ff;
}

.cv-row-text{
  color:#0b2d57;
  font-size:13px;
  font-weight:600;
}

.cv-row-ico{
  color:#0b2d57;
  opacity:.8;
}

.cv-empty{
  justify-content:center;
  color:#6b7a90;
}

.cv-btn{
  display:block;
  margin-top:18px;
  background:#0b2d57;
  color:#fff !important;
  text-decoration:none;
  padding:12px 14px;
  border-radius:8px;
  font-weight:700;
  transition: background .18s ease;
}

.cv-btn:hover{
  background:#1a4a8a;
  color:#fff !important;
  text-decoration:none;
}

/* ---- Breadcrumb y cabecera compartida ---- */
.cv-bc{
  font-size: 12px;
  color:#7b8aa0;
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom: 10px;
  flex-wrap:wrap;
}

.cv-bc a{ color:#7b8aa0; text-decoration:none; }
.cv-bc a:hover{ text-decoration:underline; }

.cv-top-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}

.cv-h2{
  margin:0;
  font-size: 22px;
  font-weight: 800;
  color:#0b2d57;
}

.cv-search input{
  width: 260px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #e3ebf6;
  border-radius: 10px;
  outline: none;
}
.cv-search input:focus{
  border-color:#b7cff5;
}

/* ---- Carpetas por producto ---- */
.cv-folders-wrap{
  margin: 10px 0 30px;
}

.cv-folders-top{
  margin-bottom: 18px;
}

.cv-folders-grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px;
  align-items:start;
}

@media (max-width: 1100px){
  .cv-folders-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px){
  .cv-folders-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .cv-folders-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cv-folder{
  text-decoration:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.cv-folder-name{
  text-align:center;
  font-size: 12px;
  font-weight: 700;
  color:#1a2b44;
  line-height: 1.25;
  max-width: 140px;
}

.cv-folder-ico{
  width: 72px;
  height: 72px;
  border-radius: 12px;
  position: relative;
  display:block;
}

.cv-folder-ico:before{
  content:"";
  position:absolute;
  width: 34px;
  height: 16px;
  top: 16px;
  left: 18px;
  border-radius: 8px;
  opacity: .95;
}

.cv-folder-ico:after{
  content:"";
  position:absolute;
  width: 44px;
  height: 28px;
  top: 26px;
  left: 14px;
  border-radius: 8px;
}

.cv-folder--orange .cv-folder-ico{ background:#fff2ea; }
.cv-folder--orange .cv-folder-ico:before{ background:#ffb784; }
.cv-folder--orange .cv-folder-ico:after{ background:#ff8a3d; }

.cv-folder--blue .cv-folder-ico{ background:#eaf2ff; }
.cv-folder--blue .cv-folder-ico:before{ background:#7db2ff; }
.cv-folder--blue .cv-folder-ico:after{ background:#1f6fe5; }

.cv-folder:hover .cv-folder-ico{
  transform: translateY(-2px);
  transition: transform .15s ease;
}

/* ---- Archivos por carpeta ---- */
.cv-files-wrap{
  margin: 10px 0 30px;
}

.cv-files-top{
  margin-bottom: 18px;
}

.cv-files-grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 26px;
  align-items:start;
}

@media (max-width: 1100px){
  .cv-files-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px){
  .cv-files-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .cv-files-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cv-file{
  text-decoration:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.cv-file-name{
  text-align:center;
  font-size: 12px;
  font-weight: 700;
  color:#1a2b44;
  line-height: 1.25;
  max-width: 160px;
}

.cv-file-ico{
  width: 72px;
  height: 72px;
  border-radius: 12px;
  display:block;
  position:relative;
}

/* PDF (naranja) */
.cv-file-ico--pdf{ background:#fff2ea; }
.cv-file-ico--pdf:before{
  content:"";
  position:absolute;
  width:40px;height:46px;
  left:16px; top:13px;
  border-radius:10px;
  background:#ff8a3d;
}
.cv-file-ico--pdf:after{
  content:"";
  position:absolute;
  width:22px;height:6px;
  left:25px; top:26px;
  border-radius:6px;
  background:#ffd1b0;
  opacity:.9;
}

/* Video (azul) */
.cv-file-ico--video{ background:#eaf2ff; }
.cv-file-ico--video:before{
  content:"";
  position:absolute;
  width:40px;height:46px;
  left:16px; top:13px;
  border-radius:10px;
  background:#1f6fe5;
}
.cv-file-ico--video:after{
  content:"";
  position:absolute;
  width:0;height:0;
  left:33px; top:28px;
  border-top:7px solid transparent;
  border-bottom:7px solid transparent;
  border-left:12px solid #b9d4ff;
}

.cv-file:hover .cv-file-ico{
  transform: translateY(-2px);
  transition: transform .15s ease;
}

/* ---- Modal Viewer ---- */
html.cv-modal-open,
body.cv-modal-open{
  overflow: hidden !important;
}

#cv-modal.cv-modal{
  position: fixed !important;
  inset: 0 !important;
  display: none;
  z-index: 999999 !important;
}

#cv-modal.cv-modal[aria-hidden="false"]{
  display: block;
}

#cv-modal .cv-modal__backdrop{
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0,0,0,.60) !important;
}

#cv-modal .cv-modal__dialog{
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(1100px, 92vw) !important;
  height: min(740px, 86vh) !important;
  background: #fff !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.45) !important;
}

#cv-modal .cv-modal__full,
#cv-modal .cv-modal__close{
  position: absolute !important;
  top: 14px !important;
  z-index: 99999999 !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 10px !important;
  border: none !important;
  background: rgba(255,255,255,.85) !important;
  backdrop-filter: blur(6px);
  color: #0b2d57 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 0 12px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.12) !important;
  cursor: pointer !important;
  transition: all .18s ease !important;
}

#cv-modal .cv-modal__full{
  right: 60px !important;
}

#cv-modal .cv-modal__close{
  right: 14px !important;
  width: 36px !important;
  padding: 0 !important;
}

#cv-modal .cv-modal__close::before,
#cv-modal .cv-modal__close::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  background: #0b2d57;
  border-radius: 2px;
}

#cv-modal .cv-modal__close::before{
  transform: translate(-50%, -50%) rotate(45deg);
}

#cv-modal .cv-modal__close::after{
  transform: translate(-50%, -50%) rotate(-45deg);
}

#cv-modal .cv-modal__full:hover,
#cv-modal .cv-modal__close:hover{
  background: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.18) !important;
}

#cv-modal .cv-modal__body{
  position: absolute !important;
  inset: 0 !important;
  padding-top: 60px !important;
  z-index: 1 !important;
}

#cv-modal .cv-iframe{
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block !important;
}

@media (max-width: 600px){
  #cv-modal .cv-modal__dialog{
    width: 94vw !important;
    height: 88vh !important;
    border-radius: 12px !important;
  }
}

/* ---- Visor pantalla completa ---- */
.cv-fullscreen{
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

.cv-fullscreen-title{
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 800;
  color: #0b2d57;
}

.cv-fullscreen-video iframe{
  width: 100%;
  height: 70vh;
}
