/* ============================================================
   Tarjetas institucionales (inicio y módulos): sin 3D
   ============================================================ */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.mod-card {
    display: flex; flex-direction: column; flex: 1;
    background: #ffffff; color: inherit; text-decoration: none;
    border: 0.5px solid #e6dcc0; border-radius: 14px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(20, 40, 75, .06);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.mod-card:hover, .mod-card:focus-visible { border-color: var(--mod, #14284b); box-shadow: 0 4px 14px rgba(20, 40, 75, .10); outline: none; }
.mod-card-art {
    height: 104px; display: flex; align-items: center; justify-content: center;
    background: var(--mod, #14284b);
}
.mod-card-art .illus { height: 92px; width: auto; max-width: 86%; }
.mod-card-art .ico { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: #f7f0dc; }
.mod-card-art .ico svg { width: 26px; height: 26px; }
.mod-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.mod-card-eyebrow { margin: 0 0 4px; font-size: 11px; letter-spacing: .12em; color: #7a1e2b; font-weight: 500; text-transform: uppercase; }
.mod-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; color: #14284b; font-family: Georgia, serif; }
.mod-card p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: #5b6270; }
.mod-card-cta { margin-top: auto; font-size: 14px; font-weight: 500; color: #7a1e2b; }

.theme-night .mod-card { background: #1b2a44; border-color: rgba(201, 162, 39, .3); box-shadow: none; }
.theme-night .mod-card:hover, .theme-night .mod-card:focus-visible { border-color: #c9a227; }
.theme-night .mod-card h3 { color: #f7f0dc; }
.theme-night .mod-card p { color: #c9d0dc; }
.theme-night .mod-card-eyebrow, .theme-night .mod-card-cta { color: #e8c766; }

/* Inspiración PerúEduca: franja de color en la base y color al enfocar */
.mod-card { border-bottom: 4px solid var(--mod, #14284b); }
.mod-card-art .illus, .mod-card-art .ico { filter: grayscale(.35); transition: filter .25s ease, transform .25s ease; }
.mod-card:hover .mod-card-art .illus, .mod-card:focus-visible .mod-card-art .illus,
.mod-card:hover .mod-card-art .ico, .mod-card:focus-visible .mod-card-art .ico { filter: none; transform: scale(1.04); }
.theme-night .mod-card { border-bottom-color: var(--mod, #c9a227); }

/* Avatares propios (PNG transparente): área de ilustración en blanco */
.mod-card-art { background: #ffffff; }
.mod-card-art .illus { height: 100px; width: auto; max-width: 100%; object-fit: contain; }
.mod-card-art .ico { color: var(--mod, #14284b); }
.theme-night .mod-card-art { background: #ffffff; }

/* Versión final: grilla centrada, franja con nombre, descripción sin flechas */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 260px)); justify-content: center; gap: 22px; width: 100%; margin: 0 auto; }
.mod-card { width: 100%; max-width: 260px; margin: 0 auto; flex: none; border-bottom: 0.5px solid #e6dcc0; }
.mod-card-art { height: 150px; background: #ffffff; }
.mod-card-art .illus { height: 136px; width: auto; max-width: 92%; object-fit: contain; }
.mod-card-band { background: var(--mod, #14284b); color: #ffffff; text-align: center; padding: 10px 8px; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.mod-card-text { padding: 14px 16px 16px; text-align: center; }
.mod-card-text p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #5b6270; }
.theme-night .mod-card-text p { color: #c9d0dc; }
.theme-night .mod-card-art { background: #ffffff; }
.theme-night .mod-card-band { background: var(--mod, #c9a227); }

/* Tarjetas más grandes: web */
.mod-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  gap: 28px;
}
.mod-card {
  max-width: 340px;
  border-radius: 18px;
}
.mod-card-art {
  height: 240px;
  padding: 10px 0;
}
.mod-card-art .illus {
  height: 100%;
  width: 100%;
  object-fit: contain;
  transform: scale(1.12);
}
.mod-card-band {
  padding: 15px 10px;
  font-size: 17px;
}
.mod-card-text {
  padding: 20px 22px 24px;
}
.mod-card-text p {
  font-size: 16px;
  line-height: 1.6;
}

/* Celular */
@media (max-width: 600px) {
  .mod-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .mod-card {
    max-width: 100%;
    border-radius: 16px;
  }
  .mod-card-art {
    height: 210px;
  }
  .mod-card-art .illus {
    transform: scale(1.1);
  }
  .mod-card-band {
    padding: 14px 10px;
    font-size: 16px;
  }
  .mod-card-text {
    padding: 18px 18px 22px;
  }
  .mod-card-text p {
    font-size: 15px;
  }
}